diff --git a/apps/files/src/actions/moveOrCopyAction.ts b/apps/files/src/actions/moveOrCopyAction.ts index a47901d040a34..b8907586276da 100644 --- a/apps/files/src/actions/moveOrCopyAction.ts +++ b/apps/files/src/actions/moveOrCopyAction.ts @@ -28,8 +28,8 @@ import type { MoveCopyResult } from './moveOrCopyActionUtils' // eslint-disable-next-line n/no-extraneous-import import { AxiosError } from 'axios' import { basename, join } from 'path' +import { FilePickerClosed, getFilePickerBuilder, showError, showInfo, TOAST_PERMANENT_TIMEOUT } from '@nextcloud/dialogs' import { emit } from '@nextcloud/event-bus' -import { FilePickerClosed, getFilePickerBuilder, showError, showInfo } from '@nextcloud/dialogs' import { FileAction, FileType, NodeStatus, davGetClient, davRootPath, davResultToNode, davGetDefaultPropfind, getUniqueName } from '@nextcloud/files' import { translate as t } from '@nextcloud/l10n' import { openConflictPicker, hasConflict } from '@nextcloud/upload' @@ -59,6 +59,28 @@ const getActionForNodes = (nodes: Node[]): MoveCopyAction => { return MoveCopyAction.COPY } +/** + * Create a loading notification toast + * @param mode The move or copy mode + * @param source Name of the node that is copied / moved + * @param destination Destination path + * @return {() => void} Function to hide the notification + */ +function createLoadingNotification(mode: MoveCopyAction, source: string, destination: string): () => void { + const text = mode === MoveCopyAction.MOVE ? t('files', 'Moving "{source}" to "{destination}" …', { source, destination }) : t('files', 'Copying "{source}" to "{destination}" …', { source, destination }) + + let toast: ReturnType|undefined + toast = showInfo( + ` ${text}`, + { + isHTML: true, + timeout: TOAST_PERMANENT_TIMEOUT, + onRemove: () => { toast?.hideToast(); toast = undefined }, + }, + ) + return () => toast && toast.hideToast() +} + /** * Handle the copy/move of a node to a destination * This can be imported and used by other scripts/components on server @@ -99,6 +121,7 @@ export const handleCopyMoveNodeTo = async (node: Node, destination: Folder, meth // Set loading state Vue.set(node, 'status', NodeStatus.LOADING) + const actionFinished = createLoadingNotification(method, node.basename, destination.path) const queue = getQueue() return await queue.add(async () => { @@ -181,7 +204,8 @@ export const handleCopyMoveNodeTo = async (node: Node, destination: Folder, meth logger.debug(error as Error) throw new Error() } finally { - Vue.set(node, 'status', undefined) + Vue.set(node, 'status', '') + actionFinished() } }) } @@ -327,7 +351,7 @@ export const action = new FileAction({ if (result === false) { showInfo(nodes.length === 1 ? t('files', 'Cancelled move or copy of "{filename}".', { filename: nodes[0].displayname }) - : t('files', 'Cancelled move or copy operation') + : t('files', 'Cancelled move or copy operation'), ) return nodes.map(() => null) } diff --git a/apps/files/src/components/FileEntryMixin.ts b/apps/files/src/components/FileEntryMixin.ts index 51e597c8fc5c3..7b0d875c88049 100644 --- a/apps/files/src/components/FileEntryMixin.ts +++ b/apps/files/src/components/FileEntryMixin.ts @@ -87,8 +87,9 @@ export default defineComponent({ uniqueId() { return hashCode(this.source.source) }, + isLoading() { - return this.source.status === NodeStatus.LOADING + return this.source.status === NodeStatus.LOADING || this.loading !== '' }, /** diff --git a/apps/files/src/views/FilesList.vue b/apps/files/src/views/FilesList.vue index da68f862e2620..3dc2c1a34521a 100644 --- a/apps/files/src/views/FilesList.vue +++ b/apps/files/src/views/FilesList.vue @@ -660,6 +660,13 @@ export default defineComponent({ \n * ```\n */\n navigationClasses: {\n type: [String, Array, Object],\n required: false,\n default: \"\"\n },\n /**\n * aria-label for the dialog navigation.\n * Use it when you want to provide a more meaningful label than the dialog name.\n *\n * By default, navigation is labeled by the dialog name.\n */\n navigationAriaLabel: {\n type: String,\n required: false,\n default: \"\"\n },\n /**\n * aria-labelledby for the dialog navigation.\n * Use it when you have an implicit navigation label (e.g. a heading).\n *\n * By default, navigation is labeled by the dialog name.\n */\n navigationAriaLabelledby: {\n type: String,\n required: false,\n default: \"\"\n },\n /**\n * Optionally pass additionaly classes which will be set on the content wrapper for custom styling\n * @default ''\n */\n contentClasses: {\n type: [String, Array, Object],\n required: false,\n default: \"\"\n },\n /**\n * Optionally pass additionaly classes which will be set on the dialog itself\n * (the default `class` attribute will be set on the modal wrapper)\n * @default ''\n */\n dialogClasses: {\n type: [String, Array, Object],\n required: false,\n default: \"\"\n }\n },\n emits: [\"closing\", \"update:open\", \"submit\"],\n setup(props, { emit, slots }) {\n const wrapper = ref();\n const { width: dialogWidth } = useElementSize(wrapper, { width: 900 });\n const isNavigationCollapsed = computed(() => dialogWidth.value < 876);\n const hasNavigation = computed(() => (slots == null ? void 0 : slots.navigation) !== void 0);\n const navigationId = GenRandomId();\n const navigationAriaLabelAttr = computed(() => props.navigationAriaLabel || void 0);\n const navigationAriaLabelledbyAttr = computed(() => {\n if (props.navigationAriaLabel) {\n return void 0;\n }\n return props.navigationAriaLabelledby || navigationId;\n });\n const dialogElement = ref();\n const dialogTagName = computed(() => props.isForm && !hasNavigation.value ? \"form\" : \"div\");\n const dialogListeners = computed(\n () => dialogTagName.value === \"form\" ? {\n /**\n * @param {SubmitEvent} event Form submit event\n */\n submit(event) {\n event.preventDefault();\n emit(\"submit\", event);\n }\n } : {}\n );\n const showModal = ref(true);\n const handleButtonClose = () => {\n if (dialogTagName.value === \"form\" && !dialogElement.value.reportValidity()) {\n return;\n }\n handleClosing();\n window.setTimeout(() => handleClosed(), 300);\n };\n const handleClosing = () => {\n showModal.value = false;\n emit(\"closing\");\n };\n const handleClosed = () => {\n showModal.value = true;\n emit(\"update:open\", false);\n };\n const modalProps = computed(() => ({\n canClose: props.canClose,\n container: props.container === void 0 ? \"body\" : props.container,\n // we do not pass the name as we already have the name as the headline\n // name: props.name,\n // But we need to set the correct label id so the dialog is labelled\n labelId: navigationId,\n size: props.size,\n show: props.open && showModal.value,\n outTransition: props.outTransition,\n closeOnClickOutside: props.closeOnClickOutside,\n additionalTrapElements: props.additionalTrapElements\n }));\n return {\n dialogElement,\n dialogListeners,\n dialogTagName,\n handleButtonClose,\n handleClosing,\n handleClosed,\n hasNavigation,\n navigationId,\n navigationAriaLabelAttr,\n navigationAriaLabelledbyAttr,\n isNavigationCollapsed,\n modalProps,\n wrapper\n };\n }\n});\nvar _sfc_render = function render() {\n var _vm = this, _c = _vm._self._c;\n _vm._self._setupProxy;\n return _vm.open ? _c(\"NcModal\", _vm._b({ staticClass: \"dialog__modal\", attrs: { \"enable-slideshow\": false, \"enable-swipe\": false }, on: { \"close\": _vm.handleClosed, \"update:show\": _vm.handleClosing } }, \"NcModal\", _vm.modalProps, false), [_c(\"h2\", { staticClass: \"dialog__name\", attrs: { \"id\": _vm.navigationId }, domProps: { \"textContent\": _vm._s(_vm.name) } }), _c(_vm.dialogTagName, _vm._g({ ref: \"dialogElement\", tag: \"component\", staticClass: \"dialog\", class: _vm.dialogClasses }, _vm.dialogListeners), [_c(\"div\", { ref: \"wrapper\", class: [\"dialog__wrapper\", { \"dialog__wrapper--collapsed\": _vm.isNavigationCollapsed }] }, [_vm.hasNavigation ? _c(\"nav\", { staticClass: \"dialog__navigation\", class: _vm.navigationClasses, attrs: { \"aria-label\": _vm.navigationAriaLabelAttr, \"aria-labelledby\": _vm.navigationAriaLabelledbyAttr } }, [_vm._t(\"navigation\", null, { \"isCollapsed\": _vm.isNavigationCollapsed })], 2) : _vm._e(), _c(\"div\", { staticClass: \"dialog__content\", class: _vm.contentClasses }, [_vm._t(\"default\", function() {\n return [_c(\"p\", { staticClass: \"dialog__text\" }, [_vm._v(\" \" + _vm._s(_vm.message) + \" \")])];\n })], 2)]), _c(\"div\", { staticClass: \"dialog__actions\" }, [_vm._t(\"actions\", function() {\n return _vm._l(_vm.buttons, function(button, idx) {\n return _c(\"NcDialogButton\", _vm._b({ key: idx, on: { \"click\": _vm.handleButtonClose } }, \"NcDialogButton\", button, false));\n });\n })], 2)])], 1) : _vm._e();\n};\nvar _sfc_staticRenderFns = [];\nvar __component__ = /* @__PURE__ */ normalizeComponent(\n _sfc_main,\n _sfc_render,\n _sfc_staticRenderFns,\n false,\n null,\n \"de9f48dc\"\n);\nconst NcDialog = __component__.exports;\nexport {\n NcDialog as N\n};\n","import { defineComponent } from \"vue\";\nimport NcButton from \"../Components/NcButton.mjs\";\nimport { N as NcIconSvgWrapper } from \"./NcIconSvgWrapper-DjrkBUkC.mjs\";\nimport { n as normalizeComponent } from \"./_plugin-vue2_normalizer-DU4iP6Vu.mjs\";\nconst _sfc_main = defineComponent({\n name: \"NcDialogButton\",\n components: {\n NcButton,\n NcIconSvgWrapper\n },\n props: {\n /**\n * The function that will be called when the button is pressed\n * @type {() => void}\n */\n callback: {\n type: Function,\n required: false,\n default: () => {\n }\n },\n /**\n * The label of the button\n */\n label: {\n type: String,\n required: true\n },\n /**\n * Optional inline SVG icon for the button\n */\n icon: {\n type: String,\n required: false,\n default: void 0\n },\n /**\n * The button type, see NcButton\n * @type {'primary'|'secondary'|'error'|'warning'|'success'}\n */\n type: {\n type: String,\n required: false,\n default: \"secondary\",\n validator: (type) => typeof type === \"string\" && [\"primary\", \"secondary\", \"tertiary\", \"error\", \"warning\", \"success\"].includes(type)\n },\n /**\n * See `nativeType` of `NcButton`\n */\n nativeType: {\n type: String,\n required: false,\n default: \"button\",\n validator(value) {\n return [\"submit\", \"reset\", \"button\"].includes(value);\n }\n },\n /**\n * If the button should be shown as disabled\n */\n disabled: {\n type: Boolean,\n default: false\n }\n },\n emits: [\"click\"],\n setup(props, { emit }) {\n const handleClick = (e) => {\n var _a;\n (_a = props.callback) == null ? void 0 : _a.call(props);\n emit(\"click\", e);\n };\n return { handleClick };\n }\n});\nvar _sfc_render = function render() {\n var _vm = this, _c = _vm._self._c;\n _vm._self._setupProxy;\n return _c(\"NcButton\", { attrs: { \"aria-label\": _vm.label, \"disabled\": _vm.disabled, \"native-type\": _vm.nativeType, \"type\": _vm.type }, on: { \"click\": _vm.handleClick }, scopedSlots: _vm._u([{ key: \"icon\", fn: function() {\n return [_vm._t(\"icon\", function() {\n return [_vm.icon !== void 0 ? _c(\"NcIconSvgWrapper\", { attrs: { \"svg\": _vm.icon } }) : _vm._e()];\n })];\n }, proxy: true }], null, true) }, [_vm._v(\" \" + _vm._s(_vm.label) + \" \")]);\n};\nvar _sfc_staticRenderFns = [];\nvar __component__ = /* @__PURE__ */ normalizeComponent(\n _sfc_main,\n _sfc_render,\n _sfc_staticRenderFns,\n false,\n null,\n null\n);\nconst NcDialogButton = __component__.exports;\nexport {\n NcDialogButton as N\n};\n","\n import API from \"!../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../css-loader/dist/cjs.js!./NcEmojiPicker-ielwHIhs.css\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../css-loader/dist/cjs.js!./NcEmojiPicker-ielwHIhs.css\";\n export default content && content.locals ? content.locals : undefined;\n","import '../assets/NcEmojiPicker-ielwHIhs.css';\nimport { Emoji, Picker, EmojiIndex } from \"emoji-mart-vue-fast\";\nimport { r as register, y as t39, z as t34, n as t15, A as t6, a as t } from \"./_l10n-B4dEPXsr.mjs\";\nimport { g as getCurrentSkinTone, s as setCurrentSkinTone } from \"./emoji-V6ytyzoR.mjs\";\nimport { C as Color } from \"./GenColors-u1W5WMXj.mjs\";\nimport data from \"emoji-mart-vue-fast/data/all.json\";\nimport { n as normalizeComponent } from \"./_plugin-vue2_normalizer-DU4iP6Vu.mjs\";\nimport NcButton from \"../Components/NcButton.mjs\";\nimport { N as NcColorPicker } from \"./NcColorPicker-B3WnrXPa.mjs\";\nimport { N as NcPopover } from \"./NcPopover-DbeCmze0.mjs\";\nimport { N as NcTextField } from \"./NcTextField-DWfgnCsS.mjs\";\nregister(t6, t15, t34, t39);\nconst _sfc_main$1 = {\n name: \"CircleIcon\",\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};\nvar _sfc_render$1 = function render() {\n var _vm = this, _c = _vm._self._c;\n return _c(\"span\", _vm._b({ staticClass: \"material-design-icon circle-icon\", attrs: { \"aria-hidden\": _vm.title ? null : true, \"aria-label\": _vm.title, \"role\": \"img\" }, on: { \"click\": function($event) {\n return _vm.$emit(\"click\", $event);\n } } }, \"span\", _vm.$attrs, false), [_c(\"svg\", { staticClass: \"material-design-icon__svg\", attrs: { \"fill\": _vm.fillColor, \"width\": _vm.size, \"height\": _vm.size, \"viewBox\": \"0 0 24 24\" } }, [_c(\"path\", { attrs: { \"d\": \"M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z\" } }, [_vm.title ? _c(\"title\", [_vm._v(_vm._s(_vm.title))]) : _vm._e()])])]);\n};\nvar _sfc_staticRenderFns$1 = [];\nvar __component__$1 = /* @__PURE__ */ normalizeComponent(\n _sfc_main$1,\n _sfc_render$1,\n _sfc_staticRenderFns$1,\n false,\n null,\n null\n);\nconst IconCircle = __component__$1.exports;\nlet emojiIndex;\nconst i18n = {\n search: t(\"Search emoji\"),\n notfound: t(\"No emoji found\"),\n categories: {\n search: t(\"Search results\"),\n recent: t(\"Frequently used\"),\n smileys: t(\"Smileys & Emotion\"),\n people: t(\"People & Body\"),\n nature: t(\"Animals & Nature\"),\n foods: t(\"Food & Drink\"),\n activity: t(\"Activities\"),\n places: t(\"Travel & Places\"),\n objects: t(\"Objects\"),\n symbols: t(\"Symbols\"),\n flags: t(\"Flags\"),\n custom: t(\"Custom\")\n }\n};\nconst skinTonePalette = [\n new Color(255, 222, 52, t(\"Neutral skin color\")),\n new Color(228, 205, 166, t(\"Light skin tone\")),\n new Color(250, 221, 192, t(\"Medium light skin tone\")),\n new Color(174, 129, 87, t(\"Medium skin tone\")),\n new Color(158, 113, 88, t(\"Medium dark skin tone\")),\n new Color(96, 79, 69, t(\"Dark skin tone\"))\n];\nconst _sfc_main = {\n name: \"NcEmojiPicker\",\n components: {\n Emoji,\n IconCircle,\n NcButton,\n NcColorPicker,\n NcPopover,\n NcTextField,\n Picker\n },\n props: {\n /**\n * The emoji-set\n */\n activeSet: {\n type: String,\n default: \"native\"\n },\n /**\n * Show preview section when hovering emoji\n */\n showPreview: {\n type: Boolean,\n default: false\n },\n /**\n * Allow unselecting the selected emoji\n */\n allowUnselect: {\n type: Boolean,\n default: false\n },\n /**\n * Selected emoji to allow unselecting\n */\n selectedEmoji: {\n type: String,\n default: \"\"\n },\n /**\n * The fallback emoji in the preview section\n */\n previewFallbackEmoji: {\n type: String,\n default: \"grinning\"\n },\n /**\n * The fallback text in the preview section\n */\n previewFallbackName: {\n type: String,\n default: t(\"Pick an emoji\")\n },\n /**\n * Whether to close the emoji picker after picking one\n */\n closeOnSelect: {\n type: Boolean,\n default: true\n },\n /**\n * Selector for the popover container\n */\n container: {\n type: [String, Object, Element, Boolean],\n default: \"body\"\n }\n },\n emits: [\n \"select\",\n \"select-data\",\n \"unselect\"\n ],\n setup() {\n if (!emojiIndex) {\n emojiIndex = new EmojiIndex(data);\n }\n return {\n // Non-reactive constants\n emojiIndex,\n skinTonePalette,\n i18n\n };\n },\n data() {\n const currentSkinTone = getCurrentSkinTone();\n return {\n /**\n * The current active color from the skin tone palette\n */\n currentColor: skinTonePalette[currentSkinTone - 1],\n /**\n * The current active skin tone\n * @type {1|2|3|4|5|6}\n */\n currentSkinTone,\n search: \"\",\n open: false\n };\n },\n computed: {\n native() {\n return this.activeSet === \"native\";\n }\n },\n methods: {\n t,\n clearSearch() {\n var _a, _b;\n this.search = \"\";\n const input = (_b = (_a = this.$refs.search) == null ? void 0 : _a.$refs.inputField) == null ? void 0 : _b.$refs.input;\n if (input) {\n input.focus();\n }\n },\n /**\n * Update the current skin tone by the result of the color picker\n * @param {string} color Color set\n */\n onChangeSkinTone(color) {\n const index = this.skinTonePalette.findIndex((tone) => tone.color.toLowerCase() === color.toLowerCase());\n if (index > -1) {\n this.currentSkinTone = index + 1;\n this.currentColor = this.skinTonePalette[index];\n setCurrentSkinTone(this.currentSkinTone);\n }\n },\n select(emojiObject) {\n this.$emit(\"select\", emojiObject.native);\n this.$emit(\"select-data\", emojiObject);\n if (this.closeOnSelect) {\n this.open = false;\n }\n },\n unselect() {\n this.$emit(\"unselect\");\n },\n afterShow() {\n var _a, _b;\n const picker = this.$refs.picker;\n picker.$el.addEventListener(\"keydown\", this.checkKeyEvent);\n const input = (_b = (_a = this.$refs.search) == null ? void 0 : _a.$refs.inputField) == null ? void 0 : _b.$refs.input;\n if (input) {\n input.focus();\n }\n },\n afterHide() {\n const picker = this.$refs.picker;\n picker.$el.removeEventListener(\"keydown\", this.checkKeyEvent);\n },\n checkKeyEvent(event) {\n if (event.key !== \"Tab\") {\n return;\n }\n const picker = this.$refs.picker;\n const focusableList = picker.$el.querySelectorAll(\n \"button, input\"\n );\n const last = focusableList.length - 1;\n if (focusableList.length <= 1) {\n event.preventDefault();\n return;\n }\n if (event.shiftKey === false && event.target === focusableList[last]) {\n event.preventDefault();\n focusableList[0].focus();\n } else if (event.shiftKey === true && event.target === focusableList[0]) {\n event.preventDefault();\n focusableList[last].focus();\n }\n }\n }\n};\nvar _sfc_render = function render2() {\n var _vm = this, _c = _vm._self._c;\n return _c(\"NcPopover\", _vm._g(_vm._b({ attrs: { \"shown\": _vm.open, \"container\": _vm.container, \"popup-role\": \"dialog\" }, on: { \"update:shown\": function($event) {\n _vm.open = $event;\n }, \"after-show\": _vm.afterShow, \"after-hide\": _vm.afterHide }, scopedSlots: _vm._u([{ key: \"trigger\", fn: function(slotProps) {\n return [_vm._t(\"default\", null, null, slotProps)];\n } }], null, true) }, \"NcPopover\", _vm.$attrs, false), _vm.$listeners), [_c(\"Picker\", _vm._b({ ref: \"picker\", attrs: { \"auto-focus\": false, \"color\": \"var(--color-primary-element)\", \"data\": _vm.emojiIndex, \"emoji\": _vm.previewFallbackEmoji, \"i18n\": _vm.i18n, \"native\": _vm.native, \"emoji-size\": 20, \"per-line\": 8, \"picker-styles\": { width: \"320px\" }, \"show-preview\": _vm.showPreview, \"skin\": _vm.currentSkinTone, \"show-skin-tones\": false, \"title\": _vm.previewFallbackName, \"role\": \"dialog\", \"aria-modal\": \"true\", \"aria-label\": _vm.t(\"Emoji picker\") }, on: { \"select\": _vm.select }, scopedSlots: _vm._u([{ key: \"searchTemplate\", fn: function(slotProps) {\n return [_c(\"div\", { staticClass: \"search__wrapper\" }, [_c(\"NcTextField\", { ref: \"search\", staticClass: \"search\", attrs: { \"value\": _vm.search, \"label\": _vm.t(\"Search\"), \"label-visible\": true, \"placeholder\": _vm.i18n.search, \"trailing-button-icon\": \"close\", \"trailing-button-label\": _vm.t(\"Clear search\"), \"show-trailing-button\": _vm.search !== \"\" }, on: { \"update:value\": [function($event) {\n _vm.search = $event;\n }, function($event) {\n return slotProps.onSearch(_vm.search);\n }], \"trailing-button-click\": function($event) {\n _vm.clearSearch();\n slotProps.onSearch(_vm.search);\n } } }), _c(\"NcColorPicker\", { attrs: { \"palette-only\": \"\", \"container\": _vm.container, \"palette\": _vm.skinTonePalette, \"value\": _vm.currentColor.color }, on: { \"update:value\": _vm.onChangeSkinTone } }, [_c(\"NcButton\", { attrs: { \"aria-label\": _vm.t(\"Skin tone\"), \"type\": \"tertiary-no-background\" }, scopedSlots: _vm._u([{ key: \"icon\", fn: function() {\n return [_c(\"IconCircle\", { style: { color: _vm.currentColor.color }, attrs: { \"title\": _vm.currentColor.name, \"size\": 20 } })];\n }, proxy: true }], null, true) })], 1)], 1)];\n } }, _vm.allowUnselect && _vm.selectedEmoji ? { key: \"customCategory\", fn: function() {\n return [_c(\"div\", { staticClass: \"emoji-mart-category-label\" }, [_c(\"h3\", { staticClass: \"emoji-mart-category-label\" }, [_vm._v(\" \" + _vm._s(_vm.t(\"Selected\")) + \" \")])]), _c(\"Emoji\", { staticClass: \"emoji-selected\", attrs: { \"data\": _vm.emojiIndex, \"emoji\": _vm.selectedEmoji, \"native\": true, \"size\": 32 }, on: { \"click\": _vm.unselect } }), _c(\"Emoji\", { staticClass: \"emoji-delete\", attrs: { \"data\": _vm.emojiIndex, \"emoji\": \":x:\", \"native\": true, \"size\": 10 }, on: { \"click\": _vm.unselect } })];\n }, proxy: true } : null], null, true) }, \"Picker\", _vm.$attrs, false))], 1);\n};\nvar _sfc_staticRenderFns = [];\nvar __component__ = /* @__PURE__ */ normalizeComponent(\n _sfc_main,\n _sfc_render,\n _sfc_staticRenderFns,\n false,\n null,\n \"6c2d9a6e\"\n);\nconst NcEmojiPicker = __component__.exports;\nexport {\n NcEmojiPicker as N\n};\n","\n import API from \"!../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../css-loader/dist/cjs.js!./NcHeaderMenu-6C_FnkA6.css\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../css-loader/dist/cjs.js!./NcHeaderMenu-6C_FnkA6.css\";\n export default content && content.locals ? content.locals : undefined;\n","import '../assets/NcMentionBubble-C6t8od-_.css';\nimport '../assets/NcHeaderMenu-6C_FnkA6.css';\nimport { vOnClickOutside } from \"@vueuse/components\";\nimport { createFocusTrap } from \"focus-trap\";\nimport { G as GenRandomId } from \"./GenRandomId-CMooMQt0.mjs\";\nimport clickOutsideOptions from \"../Mixins/clickOutsideOptions.mjs\";\nimport \"../Composables/useIsFullscreen.mjs\";\nimport \"../Composables/useIsMobile.mjs\";\nimport \"@nextcloud/router\";\n/* empty css */\nimport { n as normalizeComponent } from \"./_plugin-vue2_normalizer-DU4iP6Vu.mjs\";\nimport \"linkify-string\";\nimport \"escape-html\";\nimport \"striptags\";\nimport \"vue\";\nimport \"@nextcloud/auth\";\nimport \"@nextcloud/axios\";\nimport \"@nextcloud/capabilities\";\nimport { g as getTrapStack } from \"./focusTrap-Cecv_gjR.mjs\";\nimport NcButton from \"../Components/NcButton.mjs\";\nconst _sfc_main = {\n name: \"NcHeaderMenu\",\n components: {\n NcButton\n },\n directives: {\n ClickOutside: vOnClickOutside\n },\n mixins: [\n clickOutsideOptions\n ],\n props: {\n /**\n * Unique id for this menu\n */\n id: {\n type: String,\n required: true\n },\n /**\n * aria-label attribute of the menu open button\n */\n ariaLabel: {\n type: String,\n default: \"\"\n },\n /**\n * Current menu open state\n */\n open: {\n type: Boolean,\n default: false\n },\n /**\n * Pass `true` if the header menu is used for website navigation\n *\n * The wrapper tag will be set to `nav` and its `aria-labelledby`\n * will be associated with the menu open button\n */\n isNav: {\n type: Boolean,\n default: false\n },\n /**\n * Additional visually hidden description text for the menu\n * open button\n */\n description: {\n type: String,\n default: null\n }\n },\n emits: [\n \"close\",\n \"closed\",\n \"open\",\n \"opened\",\n \"update:open\",\n \"cancel\"\n ],\n data() {\n var _a, _b, _c;\n return {\n focusTrap: null,\n opened: this.open,\n shortcutsDisabled: (_c = (_b = (_a = window.OCP) == null ? void 0 : _a.Accessibility) == null ? void 0 : _b.disableKeyboardShortcuts) == null ? void 0 : _c.call(_b),\n triggerId: GenRandomId(),\n descriptionId: GenRandomId()\n };\n },\n computed: {\n wrapperTag() {\n return this.isNav ? \"nav\" : \"div\";\n },\n clickOutsideConfig() {\n return [\n this.closeMenu,\n this.clickOutsideOptions\n ];\n },\n listeners() {\n if (this.isNav) {\n return {\n focusout: this.onFocusOut\n };\n }\n return null;\n }\n },\n watch: {\n open(open) {\n if (open) {\n this.openMenu();\n } else {\n this.closeMenu();\n }\n }\n },\n mounted() {\n document.addEventListener(\"keydown\", this.onKeyDown);\n },\n beforeDestroy() {\n document.removeEventListener(\"keydown\", this.onKeyDown);\n },\n methods: {\n /**\n * Toggle the current menu open state\n */\n toggleMenu() {\n if (!this.opened) {\n this.openMenu();\n } else {\n this.closeMenu();\n }\n },\n /**\n * Close the current menu\n *\n * @param {boolean} cancelled emit a cancel event instead of close\n */\n closeMenu(cancelled = false) {\n this.opened = false;\n this.$emit(cancelled ? \"cancel\" : \"close\");\n this.$emit(\"update:open\", false);\n this.clearFocusTrap();\n this.$nextTick(() => {\n this.$emit(\"closed\");\n });\n },\n /**\n * Open the current menu\n */\n openMenu() {\n this.opened = true;\n this.$emit(\"open\");\n this.$emit(\"update:open\", true);\n this.$nextTick(() => {\n this.useFocusTrap();\n this.$emit(\"opened\");\n });\n },\n onKeyDown(event) {\n if (this.shortcutsDisabled || !this.opened) {\n return;\n }\n if (event.key === \"Escape\") {\n event.preventDefault();\n this.closeMenu(true);\n }\n },\n /**\n * @param {FocusEvent} event The focus event\n */\n onFocusOut(event) {\n if (!this.$refs.headerMenu.contains(event.relatedTarget)) {\n this.closeMenu();\n }\n },\n /**\n * Add focus trap for accessibility.\n * Shall only be used when all children are mounted\n * and available in the DOM. We use $nextTick for that.\n */\n async useFocusTrap() {\n if (this.isNav || this.focusTrap) {\n return;\n }\n const contentContainer = this.$refs.content;\n this.focusTrap = createFocusTrap(contentContainer, {\n allowOutsideClick: true,\n trapStack: getTrapStack(),\n fallbackFocus: this.$refs.trigger\n });\n this.focusTrap.activate();\n },\n clearFocusTrap() {\n var _a;\n (_a = this.focusTrap) == null ? void 0 : _a.deactivate();\n this.focusTrap = null;\n }\n }\n};\nvar _sfc_render = function render() {\n var _vm = this, _c = _vm._self._c;\n return _c(_vm.wrapperTag, _vm._g({ directives: [{ name: \"click-outside\", rawName: \"v-click-outside\", value: _vm.clickOutsideConfig, expression: \"clickOutsideConfig\" }], ref: \"headerMenu\", tag: \"component\", staticClass: \"header-menu\", class: { \"header-menu--opened\": _vm.opened }, attrs: { \"id\": _vm.id, \"aria-labelledby\": _vm.isNav ? _vm.triggerId : null } }, _vm.listeners), [_c(\"NcButton\", { ref: \"trigger\", staticClass: \"header-menu__trigger\", attrs: { \"id\": _vm.isNav ? _vm.triggerId : null, \"type\": \"tertiary-no-background\", \"aria-label\": _vm.ariaLabel, \"aria-describedby\": _vm.description ? _vm.descriptionId : null, \"aria-controls\": \"header-menu-\".concat(_vm.id), \"aria-expanded\": _vm.opened.toString(), \"size\": \"large\" }, on: { \"click\": function($event) {\n $event.preventDefault();\n return _vm.toggleMenu.apply(null, arguments);\n } }, scopedSlots: _vm._u([{ key: \"icon\", fn: function() {\n return [_vm._t(\"trigger\")];\n }, proxy: true }], null, true) }), _vm.description ? _c(\"span\", { staticClass: \"header-menu__description hidden-visually\", attrs: { \"id\": _vm.descriptionId } }, [_vm._v(\" \" + _vm._s(_vm.description) + \" \")]) : _vm._e(), _c(\"div\", { directives: [{ name: \"show\", rawName: \"v-show\", value: _vm.opened, expression: \"opened\" }], staticClass: \"header-menu__carret\" }), _c(\"div\", { directives: [{ name: \"show\", rawName: \"v-show\", value: _vm.opened, expression: \"opened\" }], staticClass: \"header-menu__wrapper\", attrs: { \"id\": \"header-menu-\".concat(_vm.id) } }, [_c(\"div\", { ref: \"content\", staticClass: \"header-menu__content\" }, [_vm._t(\"default\")], 2)])], 1);\n};\nvar _sfc_staticRenderFns = [];\nvar __component__ = /* @__PURE__ */ normalizeComponent(\n _sfc_main,\n _sfc_render,\n _sfc_staticRenderFns,\n false,\n null,\n \"2d5ac9dc\"\n);\nconst NcHeaderMenu = __component__.exports;\nexport {\n NcHeaderMenu as N\n};\n","\n import API from \"!../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../css-loader/dist/cjs.js!./NcIconSvgWrapper-BwsJ8wBM.css\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../css-loader/dist/cjs.js!./NcIconSvgWrapper-BwsJ8wBM.css\";\n export default content && content.locals ? content.locals : undefined;\n","import '../assets/NcIconSvgWrapper-BwsJ8wBM.css';\nimport Vue from \"vue\";\nimport DOMPurify from \"dompurify\";\nimport { n as normalizeComponent } from \"./_plugin-vue2_normalizer-DU4iP6Vu.mjs\";\nconst _sfc_main = {\n name: \"NcIconSvgWrapper\",\n props: {\n /**\n * Set if the icon should be used as inline content e.g. within text.\n * By default the icon is made a block element for use inside `icon`-slots.\n */\n inline: {\n type: Boolean,\n default: false\n },\n /**\n * Raw SVG string to render\n */\n svg: {\n type: String,\n default: \"\"\n },\n /**\n * Label of the icon, used in aria-label\n */\n name: {\n type: String,\n default: \"\"\n },\n /**\n * Raw SVG path to render. Takes precedence over the SVG string in the `svg` prop.\n */\n path: {\n type: String,\n default: \"\"\n },\n /**\n * Size of the icon to show. Only use if not using within an icon slot.\n * Defaults to 20px which is the Nextcloud icon size for all icon slots.\n * @default 20\n */\n size: {\n type: [Number, String],\n default: 20,\n validator: (value) => typeof value === \"number\" || value === \"auto\"\n }\n },\n computed: {\n /**\n * Icon size used in CSS\n */\n iconSize() {\n return typeof this.size === \"number\" ? \"\".concat(this.size, \"px\") : this.size;\n },\n cleanSvg() {\n if (!this.svg || this.path) {\n return;\n }\n const svg = DOMPurify.sanitize(this.svg);\n const svgDocument = new DOMParser().parseFromString(svg, \"image/svg+xml\");\n if (svgDocument.querySelector(\"parsererror\")) {\n Vue.util.warn(\"SVG is not valid\");\n return \"\";\n }\n if (svgDocument.documentElement.id) {\n svgDocument.documentElement.removeAttribute(\"id\");\n }\n return svgDocument.documentElement.outerHTML;\n },\n attributes() {\n return {\n class: [\"icon-vue\", { \"icon-vue--inline\": this.inline }],\n style: {\n \"--icon-size\": this.iconSize\n },\n role: \"img\",\n \"aria-hidden\": !this.name ? true : void 0,\n \"aria-label\": this.name || void 0\n };\n }\n }\n};\nvar _sfc_render = function render() {\n var _vm = this, _c = _vm._self._c;\n return !_vm.cleanSvg ? _c(\"span\", _vm._b({}, \"span\", _vm.attributes, false), [_c(\"svg\", { attrs: { \"viewBox\": \"0 0 24 24\", \"xmlns\": \"http://www.w3.org/2000/svg\" } }, [_c(\"path\", { attrs: { \"d\": _vm.path } })])]) : _c(\"span\", _vm._b({ domProps: { \"innerHTML\": _vm._s(_vm.cleanSvg) } }, \"span\", _vm.attributes, false));\n};\nvar _sfc_staticRenderFns = [];\nvar __component__ = /* @__PURE__ */ normalizeComponent(\n _sfc_main,\n _sfc_render,\n _sfc_staticRenderFns,\n false,\n null,\n \"2d0a4d76\"\n);\nconst NcIconSvgWrapper = __component__.exports;\nexport {\n NcIconSvgWrapper as N\n};\n","\n import API from \"!../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../css-loader/dist/cjs.js!./NcInputConfirmCancel-SGr0-6w8.css\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../css-loader/dist/cjs.js!./NcInputConfirmCancel-SGr0-6w8.css\";\n export default content && content.locals ? content.locals : undefined;\n","import '../assets/NcInputConfirmCancel-SGr0-6w8.css';\nimport NcButton from \"../Components/NcButton.mjs\";\nimport { r as register, o as t13, a as t } from \"./_l10n-B4dEPXsr.mjs\";\nimport { A as ArrowRight } from \"./ArrowRight-KsL2PC-o.mjs\";\nimport { C as Close } from \"./Close-B6ccm1RP.mjs\";\nimport { n as normalizeComponent } from \"./_plugin-vue2_normalizer-DU4iP6Vu.mjs\";\nregister(t13);\nconst _sfc_main = {\n name: \"NcInputConfirmCancel\",\n components: {\n NcButton,\n ArrowRight,\n Close\n },\n props: {\n /**\n * If this element is used on a primary element set to true for primary styling.\n */\n primary: {\n default: false,\n type: Boolean\n },\n placeholder: {\n default: \"\",\n type: String\n },\n value: {\n default: \"\",\n type: String\n }\n },\n emits: [\n \"input\",\n \"confirm\",\n \"cancel\"\n ],\n data() {\n return {\n labelConfirm: t(\"Confirm changes\"),\n labelCancel: t(\"Cancel changes\")\n };\n },\n computed: {\n valueModel: {\n get() {\n return this.value;\n },\n set(newValue) {\n this.$emit(\"input\", newValue);\n }\n }\n },\n methods: {\n confirm() {\n this.$emit(\"confirm\");\n },\n cancel() {\n this.$emit(\"cancel\");\n },\n focusInput() {\n this.$refs.input.focus();\n }\n }\n};\nvar _sfc_render = function render() {\n var _vm = this, _c = _vm._self._c;\n return _c(\"div\", { staticClass: \"app-navigation-input-confirm\" }, [_c(\"form\", { on: { \"submit\": function($event) {\n $event.preventDefault();\n return _vm.confirm.apply(null, arguments);\n }, \"keydown\": function($event) {\n if (!$event.type.indexOf(\"key\") && _vm._k($event.keyCode, \"esc\", 27, $event.key, [\"Esc\", \"Escape\"])) return null;\n if ($event.ctrlKey || $event.shiftKey || $event.altKey || $event.metaKey) return null;\n $event.stopPropagation();\n $event.preventDefault();\n return _vm.cancel.apply(null, arguments);\n }, \"click\": function($event) {\n $event.stopPropagation();\n $event.preventDefault();\n } } }, [_c(\"input\", { directives: [{ name: \"model\", rawName: \"v-model\", value: _vm.valueModel, expression: \"valueModel\" }], ref: \"input\", staticClass: \"app-navigation-input-confirm__input\", attrs: { \"type\": \"text\", \"placeholder\": _vm.placeholder }, domProps: { \"value\": _vm.valueModel }, on: { \"input\": function($event) {\n if ($event.target.composing) return;\n _vm.valueModel = $event.target.value;\n } } }), _c(\"NcButton\", { attrs: { \"native-type\": \"submit\", \"type\": \"primary\", \"aria-label\": _vm.labelConfirm }, on: { \"click\": function($event) {\n $event.stopPropagation();\n $event.preventDefault();\n return _vm.confirm.apply(null, arguments);\n } }, scopedSlots: _vm._u([{ key: \"icon\", fn: function() {\n return [_c(\"ArrowRight\", { attrs: { \"size\": 20 } })];\n }, proxy: true }]) }), _c(\"NcButton\", { attrs: { \"native-type\": \"reset\", \"type\": _vm.primary ? \"primary\" : \"tertiary\", \"aria-label\": _vm.labelCancel }, on: { \"click\": function($event) {\n $event.stopPropagation();\n $event.preventDefault();\n return _vm.cancel.apply(null, arguments);\n } }, scopedSlots: _vm._u([{ key: \"icon\", fn: function() {\n return [_c(\"Close\", { attrs: { \"size\": 20 } })];\n }, proxy: true }]) })], 1)]);\n};\nvar _sfc_staticRenderFns = [];\nvar __component__ = /* @__PURE__ */ normalizeComponent(\n _sfc_main,\n _sfc_render,\n _sfc_staticRenderFns,\n false,\n null,\n \"0e795eb7\"\n);\nconst NcInputConfirmCancel = __component__.exports;\nexport {\n NcInputConfirmCancel as N\n};\n","\n import API from \"!../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../css-loader/dist/cjs.js!./NcListItem-Db199R20.css\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../css-loader/dist/cjs.js!./NcListItem-Db199R20.css\";\n export default content && content.locals ? content.locals : undefined;\n","import '../assets/NcListItem-Db199R20.css';\nimport { N as NcActions } from \"./NcActions-D77YAhAy.mjs\";\nimport { N as NcCounterBubble } from \"./NcCounterBubble-D1QC3eP1.mjs\";\nimport NcVNodes from \"../Components/NcVNodes.mjs\";\nimport { r as register, h as t5, a as t } from \"./_l10n-B4dEPXsr.mjs\";\nimport { n as normalizeComponent } from \"./_plugin-vue2_normalizer-DU4iP6Vu.mjs\";\nregister(t5);\nconst _sfc_main = {\n name: \"NcListItem\",\n components: {\n NcActions,\n NcCounterBubble,\n NcVNodes\n },\n props: {\n /**\n * The details text displayed in the upper right part of the component\n */\n details: {\n type: String,\n default: \"\"\n },\n /**\n * Name (first line of text)\n */\n name: {\n type: String,\n required: true\n },\n /**\n * Pass in `true` if you want the matching behavior to\n * be non-inclusive: https://router.vuejs.org/api/#exact\n */\n exact: {\n type: Boolean,\n default: false\n },\n /**\n * The route for the router link.\n */\n to: {\n type: [String, Object],\n default: null\n },\n /**\n * The value for the external link\n */\n href: {\n type: String,\n default: \"#\"\n },\n target: {\n type: String,\n default: \"\"\n },\n /**\n * Id for the `` element\n */\n anchorId: {\n type: String,\n default: \"\"\n },\n /**\n * Make subname bold\n */\n bold: {\n type: Boolean,\n default: false\n },\n /**\n * Show the NcListItem in compact design\n */\n compact: {\n type: Boolean,\n default: false\n },\n /**\n * Toggle the active state of the component\n */\n active: {\n type: Boolean,\n default: false\n },\n /**\n * Aria label for the wrapper element\n */\n linkAriaLabel: {\n type: String,\n default: \"\"\n },\n /**\n * Aria label for the actions toggle\n */\n actionsAriaLabel: {\n type: String,\n default: \"\"\n },\n /**\n * If different from 0 this component will display the\n * NcCounterBubble component\n */\n counterNumber: {\n type: [Number, String],\n default: 0\n },\n /**\n * Outlined or highlighted state of the counter\n */\n counterType: {\n type: String,\n default: \"\",\n validator(value) {\n return [\"highlighted\", \"outlined\", \"\"].indexOf(value) !== -1;\n }\n },\n /**\n * To be used only when the elements in the actions menu are very important\n */\n forceDisplayActions: {\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 * Show the list component layout\n */\n oneLine: {\n type: Boolean,\n default: false\n }\n },\n emits: [\n \"click\",\n \"update:menuOpen\"\n ],\n setup() {\n var _a, _b;\n const [major] = (_b = (_a = window._oc_config) == null ? void 0 : _a.version.split(\".\", 2)) != null ? _b : [];\n const isLegacy = major && Number.parseInt(major) < 30;\n return {\n isLegacy\n };\n },\n data() {\n return {\n hovered: false,\n hasActions: false,\n hasSubname: false,\n displayActionsOnHoverFocus: false,\n menuOpen: false,\n hasIndicator: false,\n hasDetails: false\n };\n },\n computed: {\n showAdditionalElements() {\n return !this.displayActionsOnHoverFocus || this.forceDisplayActions;\n },\n showDetails() {\n return (this.details !== \"\" || this.hasDetails) && (!this.displayActionsOnHoverFocus || this.forceDisplayActions);\n },\n computedActionsAriaLabel() {\n return this.actionsAriaLabel || t('Actions for item with name \"{name}\"', { name: this.name });\n }\n },\n watch: {\n menuOpen(newValue) {\n if (!newValue && !this.hovered) {\n this.displayActionsOnHoverFocus = false;\n }\n }\n },\n mounted() {\n this.checkSlots();\n },\n updated() {\n this.checkSlots();\n },\n methods: {\n /**\n * Handle link click\n *\n * @param {MouseEvent|KeyboardEvent} event - Native click or keydown event\n * @param {Function} [navigate] - VueRouter link's navigate if any\n * @param {string} [routerLinkHref] - VueRouter link's href\n */\n onClick(event, navigate, routerLinkHref) {\n this.$emit(\"click\", event);\n if (event.metaKey || event.altKey || event.ctrlKey || event.shiftKey) {\n return;\n }\n if (routerLinkHref) {\n navigate == null ? void 0 : navigate(event);\n event.preventDefault();\n }\n },\n showActions() {\n if (this.hasActions) {\n this.displayActionsOnHoverFocus = true;\n }\n this.hovered = false;\n },\n hideActions() {\n this.displayActionsOnHoverFocus = false;\n },\n /**\n * @param {FocusEvent} event UI event\n */\n handleBlur(event) {\n if (this.menuOpen) {\n return;\n }\n if (this.$refs[\"list-item\"].contains(event.relatedTarget)) {\n return;\n }\n this.hideActions();\n },\n /**\n * Hide the actions on mouseleave unless the menu is open\n */\n handleMouseleave() {\n if (!this.menuOpen) {\n this.displayActionsOnHoverFocus = false;\n }\n this.hovered = false;\n },\n handleMouseover() {\n this.showActions();\n this.hovered = true;\n },\n handleActionsUpdateOpen(e) {\n this.menuOpen = e;\n this.$emit(\"update:menuOpen\", e);\n },\n // Check if subname and actions slots are populated\n checkSlots() {\n if (this.hasActions !== !!this.$slots.actions) {\n this.hasActions = !!this.$slots.actions;\n }\n if (this.hasSubname !== !!this.$slots.subname) {\n this.hasSubname = !!this.$slots.subname;\n }\n if (this.hasIndicator !== !!this.$slots.indicator) {\n this.hasIndicator = !!this.$slots.indicator;\n }\n if (this.hasDetails !== !!this.$slots.details) {\n this.hasDetails = !!this.$slots.details;\n }\n }\n }\n};\nvar _sfc_render = function render() {\n var _vm = this, _c = _vm._self._c;\n return _c(_vm.to ? \"router-link\" : \"NcVNodes\", { tag: \"component\", attrs: { \"custom\": _vm.to ? true : null, \"to\": _vm.to, \"exact\": _vm.to ? _vm.exact : null }, scopedSlots: _vm._u([{ key: \"default\", fn: function({ href: routerLinkHref, navigate, isActive }) {\n return [_c(\"li\", { staticClass: \"list-item__wrapper\", class: { \"list-item__wrapper--active\": isActive || _vm.active } }, [_c(\"div\", { ref: \"list-item\", staticClass: \"list-item\", class: {\n \"list-item--compact\": _vm.compact,\n \"list-item--legacy\": _vm.isLegacy,\n \"list-item--one-line\": _vm.oneLine\n }, on: { \"mouseover\": _vm.handleMouseover, \"mouseleave\": _vm.handleMouseleave } }, [_c(\"a\", { staticClass: \"list-item__anchor\", attrs: { \"id\": _vm.anchorId || void 0, \"aria-label\": _vm.linkAriaLabel, \"href\": routerLinkHref || _vm.href, \"target\": _vm.target || (_vm.href === \"#\" ? void 0 : \"_blank\"), \"rel\": _vm.href === \"#\" ? void 0 : \"noopener noreferrer\" }, on: { \"focus\": _vm.showActions, \"focusout\": _vm.handleBlur, \"click\": function($event) {\n return _vm.onClick($event, navigate, routerLinkHref);\n }, \"keydown\": function($event) {\n if (!$event.type.indexOf(\"key\") && _vm._k($event.keyCode, \"esc\", 27, $event.key, [\"Esc\", \"Escape\"])) return null;\n return _vm.hideActions.apply(null, arguments);\n } } }, [_vm._t(\"icon\"), _c(\"div\", { staticClass: \"list-item-content\" }, [_c(\"div\", { staticClass: \"list-item-content__main\" }, [_c(\"div\", { staticClass: \"list-item-content__name\" }, [_vm._t(\"name\", function() {\n return [_vm._v(_vm._s(_vm.name))];\n })], 2), _vm.hasSubname ? _c(\"div\", { staticClass: \"list-item-content__subname\", class: { \"list-item-content__subname--bold\": _vm.bold } }, [_vm._t(\"subname\")], 2) : _vm._e()]), _c(\"div\", { staticClass: \"list-item-content__details\" }, [_vm.showDetails ? _c(\"div\", { staticClass: \"list-item-details__details\" }, [_vm._t(\"details\", function() {\n return [_vm._v(_vm._s(_vm.details))];\n })], 2) : _vm._e(), _vm.counterNumber || _vm.hasIndicator ? _c(\"div\", { directives: [{ name: \"show\", rawName: \"v-show\", value: _vm.showAdditionalElements, expression: \"showAdditionalElements\" }], staticClass: \"list-item-details__extra\" }, [_vm.counterNumber ? _c(\"NcCounterBubble\", { staticClass: \"list-item-details__counter\", attrs: { \"active\": isActive || _vm.active, \"type\": _vm.counterType } }, [_vm._v(\" \" + _vm._s(_vm.counterNumber) + \" \")]) : _vm._e(), _vm.hasIndicator ? _c(\"span\", { staticClass: \"list-item-details__indicator\" }, [_vm._t(\"indicator\")], 2) : _vm._e()], 1) : _vm._e()])])], 2), _vm.$slots[\"extra-actions\"] ? _c(\"div\", { staticClass: \"list-item-content__extra-actions\" }, [_vm._t(\"extra-actions\")], 2) : _vm._e(), _c(\"div\", { directives: [{ name: \"show\", rawName: \"v-show\", value: _vm.forceDisplayActions || _vm.displayActionsOnHoverFocus, expression: \"forceDisplayActions || displayActionsOnHoverFocus\" }], staticClass: \"list-item-content__actions\", on: { \"focusout\": _vm.handleBlur } }, [_c(\"NcActions\", { ref: \"actions\", attrs: { \"primary\": isActive || _vm.active, \"force-menu\": _vm.forceMenu, \"aria-label\": _vm.computedActionsAriaLabel }, on: { \"update:open\": _vm.handleActionsUpdateOpen }, scopedSlots: _vm._u([_vm.$slots[\"actions-icon\"] ? { key: \"icon\", fn: function() {\n return [_vm._t(\"actions-icon\")];\n }, proxy: true } : null], null, true) }, [_vm._t(\"actions\")], 2)], 1), _vm.$slots.extra ? _c(\"div\", { staticClass: \"list-item__extra\" }, [_vm._t(\"extra\")], 2) : _vm._e()])])];\n } }], null, true) });\n};\nvar _sfc_staticRenderFns = [];\nvar __component__ = /* @__PURE__ */ normalizeComponent(\n _sfc_main,\n _sfc_render,\n _sfc_staticRenderFns,\n false,\n null,\n \"a3ec46a7\"\n);\nconst NcListItem = __component__.exports;\nexport {\n NcListItem as N\n};\n","\n import API from \"!../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../css-loader/dist/cjs.js!./NcListItemIcon--7OhLYWA.css\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../css-loader/dist/cjs.js!./NcListItemIcon--7OhLYWA.css\";\n export default content && content.locals ? content.locals : undefined;\n","import '../assets/NcMentionBubble-C6t8od-_.css';\nimport '../assets/NcListItemIcon--7OhLYWA.css';\nimport { N as NcAvatar, u as userStatus } from \"./NcAvatar-BFV6oZYX.mjs\";\nimport { N as NcHighlight } from \"./index-Bz6q9mZw.mjs\";\nimport { N as NcIconSvgWrapper } from \"./NcIconSvgWrapper-DjrkBUkC.mjs\";\nimport \"../Composables/useIsFullscreen.mjs\";\nimport \"../Composables/useIsMobile.mjs\";\nimport \"@nextcloud/router\";\n/* empty css */\nimport { n as normalizeComponent } from \"./_plugin-vue2_normalizer-DU4iP6Vu.mjs\";\nimport \"linkify-string\";\nimport \"escape-html\";\nimport \"striptags\";\nimport \"vue\";\nconst margin = 8;\nconst defaultSize = 32;\nconst _sfc_main = {\n name: \"NcListItemIcon\",\n components: {\n NcAvatar,\n NcHighlight,\n NcIconSvgWrapper\n },\n mixins: [\n userStatus\n ],\n props: {\n /**\n * Default first line text\n */\n name: {\n type: String,\n required: true\n },\n /**\n * Secondary optional line\n * Only visible on size of 32 and above\n */\n subname: {\n type: String,\n default: \"\"\n },\n /**\n * Icon class to be displayed at the end of the component\n */\n icon: {\n type: String,\n default: \"\"\n },\n /**\n * SVG icon to be displayed at the end of the component\n */\n iconSvg: {\n type: String,\n default: \"\"\n },\n /**\n * Descriptive name for the icon\n */\n iconName: {\n type: String,\n default: \"\"\n },\n /**\n * Search within the highlight of name/subname\n */\n search: {\n type: String,\n default: \"\"\n },\n /**\n * Set a size in px that will define the avatar height/width\n * and therefore, the height of the component\n */\n avatarSize: {\n type: Number,\n default: defaultSize\n },\n /**\n * Disable the margins of this component.\n * Useful for integration in `NcSelect` for example\n */\n noMargin: {\n type: Boolean,\n default: false\n },\n /**\n * See the [Avatar](#Avatar) displayName prop\n * Fallback to name\n */\n displayName: {\n type: String,\n default: null\n },\n /**\n * See the [Avatar](#Avatar) isNoUser prop\n * Enable/disable the UserStatus fetching\n */\n isNoUser: {\n type: Boolean,\n default: false\n },\n /**\n * Unique list item ID\n */\n id: {\n type: String,\n default: null\n }\n },\n setup() {\n return {\n margin,\n defaultSize\n };\n },\n computed: {\n hasIcon() {\n return this.icon !== \"\";\n },\n hasIconSvg() {\n return this.iconSvg !== \"\";\n },\n isValidSubname() {\n var _a, _b;\n return ((_b = (_a = this.subname) == null ? void 0 : _a.trim) == null ? void 0 : _b.call(_a)) !== \"\";\n },\n isSizeBigEnough() {\n return this.avatarSize >= 26;\n },\n cssVars() {\n const margin2 = this.noMargin ? 0 : this.margin;\n return {\n \"--height\": this.avatarSize + 2 * margin2 + \"px\",\n \"--margin\": this.margin + \"px\"\n };\n },\n /**\n * Seperates the search property into two parts, the first one is the search part on the name, the second on the subname.\n * @return {[string, string]}\n */\n searchParts() {\n const EMAIL_NOTATION = /^([^<]*)<([^>]+)>?$/;\n const match = this.search.match(EMAIL_NOTATION);\n if (this.isNoUser || !match) {\n return [this.search, this.search];\n }\n return [match[1].trim(), match[2]];\n }\n },\n beforeMount() {\n if (!this.isNoUser && !this.subname) {\n this.fetchUserStatus(this.user);\n }\n }\n};\nvar _sfc_render = function render() {\n var _vm = this, _c = _vm._self._c;\n return _c(\"span\", _vm._g({ staticClass: \"option\", class: { \"option--compact\": _vm.avatarSize < _vm.defaultSize }, style: _vm.cssVars, attrs: { \"id\": _vm.id } }, _vm.$listeners), [_c(\"NcAvatar\", _vm._b({ staticClass: \"option__avatar\", attrs: { \"disable-menu\": true, \"disable-tooltip\": true, \"display-name\": _vm.displayName || _vm.name, \"is-no-user\": _vm.isNoUser, \"size\": _vm.avatarSize } }, \"NcAvatar\", _vm.$attrs, false)), _c(\"div\", { staticClass: \"option__details\" }, [_c(\"NcHighlight\", { staticClass: \"option__lineone\", attrs: { \"text\": _vm.name, \"search\": _vm.searchParts[0] } }), _vm.isValidSubname && _vm.isSizeBigEnough ? _c(\"NcHighlight\", { staticClass: \"option__linetwo\", attrs: { \"text\": _vm.subname, \"search\": _vm.searchParts[1] } }) : _vm.hasStatus ? _c(\"span\", [_c(\"span\", [_vm._v(_vm._s(_vm.userStatus.icon))]), _c(\"span\", [_vm._v(_vm._s(_vm.userStatus.message))])]) : _vm._e()], 1), _vm._t(\"default\", function() {\n return [_vm.hasIconSvg ? _c(\"NcIconSvgWrapper\", { staticClass: \"option__icon\", attrs: { \"svg\": _vm.iconSvg, \"name\": _vm.iconName } }) : _vm.hasIcon ? _c(\"span\", { staticClass: \"icon option__icon\", class: _vm.icon, attrs: { \"aria-label\": _vm.iconName } }) : _vm._e()];\n })], 2);\n};\nvar _sfc_staticRenderFns = [];\nvar __component__ = /* @__PURE__ */ normalizeComponent(\n _sfc_main,\n _sfc_render,\n _sfc_staticRenderFns,\n false,\n null,\n \"a0f4d73a\"\n);\nconst NcListItemIcon = __component__.exports;\nexport {\n NcListItemIcon as N\n};\n","\n import API from \"!../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../css-loader/dist/cjs.js!./NcPasswordField-DWd5gg73.css\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../css-loader/dist/cjs.js!./NcPasswordField-DWd5gg73.css\";\n export default content && content.locals ? content.locals : undefined;\n","import '../assets/NcPasswordField-DWd5gg73.css';\nimport { n as normalizeComponent } from \"./_plugin-vue2_normalizer-DU4iP6Vu.mjs\";\nimport NcInputField from \"../Components/NcInputField.mjs\";\nimport debounce from \"debounce\";\nimport axios from \"@nextcloud/axios\";\nimport { loadState } from \"@nextcloud/initial-state\";\nimport { generateOcsUrl } from \"@nextcloud/router\";\nimport { r as register, E as t28, a as t } from \"./_l10n-B4dEPXsr.mjs\";\nimport { getLoggerBuilder } from \"@nextcloud/logger\";\nconst _sfc_main$2 = {\n name: \"EyeIcon\",\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};\nvar _sfc_render$2 = function render() {\n var _vm = this, _c = _vm._self._c;\n return _c(\"span\", _vm._b({ staticClass: \"material-design-icon eye-icon\", attrs: { \"aria-hidden\": _vm.title ? null : true, \"aria-label\": _vm.title, \"role\": \"img\" }, on: { \"click\": function($event) {\n return _vm.$emit(\"click\", $event);\n } } }, \"span\", _vm.$attrs, false), [_c(\"svg\", { staticClass: \"material-design-icon__svg\", attrs: { \"fill\": _vm.fillColor, \"width\": _vm.size, \"height\": _vm.size, \"viewBox\": \"0 0 24 24\" } }, [_c(\"path\", { attrs: { \"d\": \"M12,9A3,3 0 0,0 9,12A3,3 0 0,0 12,15A3,3 0 0,0 15,12A3,3 0 0,0 12,9M12,17A5,5 0 0,1 7,12A5,5 0 0,1 12,7A5,5 0 0,1 17,12A5,5 0 0,1 12,17M12,4.5C7,4.5 2.73,7.61 1,12C2.73,16.39 7,19.5 12,19.5C17,19.5 21.27,16.39 23,12C21.27,7.61 17,4.5 12,4.5Z\" } }, [_vm.title ? _c(\"title\", [_vm._v(_vm._s(_vm.title))]) : _vm._e()])])]);\n};\nvar _sfc_staticRenderFns$2 = [];\nvar __component__$2 = /* @__PURE__ */ normalizeComponent(\n _sfc_main$2,\n _sfc_render$2,\n _sfc_staticRenderFns$2,\n false,\n null,\n null\n);\nconst Eye = __component__$2.exports;\nconst _sfc_main$1 = {\n name: \"EyeOffIcon\",\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};\nvar _sfc_render$1 = function render2() {\n var _vm = this, _c = _vm._self._c;\n return _c(\"span\", _vm._b({ staticClass: \"material-design-icon eye-off-icon\", attrs: { \"aria-hidden\": _vm.title ? null : true, \"aria-label\": _vm.title, \"role\": \"img\" }, on: { \"click\": function($event) {\n return _vm.$emit(\"click\", $event);\n } } }, \"span\", _vm.$attrs, false), [_c(\"svg\", { staticClass: \"material-design-icon__svg\", attrs: { \"fill\": _vm.fillColor, \"width\": _vm.size, \"height\": _vm.size, \"viewBox\": \"0 0 24 24\" } }, [_c(\"path\", { attrs: { \"d\": \"M11.83,9L15,12.16C15,12.11 15,12.05 15,12A3,3 0 0,0 12,9C11.94,9 11.89,9 11.83,9M7.53,9.8L9.08,11.35C9.03,11.56 9,11.77 9,12A3,3 0 0,0 12,15C12.22,15 12.44,14.97 12.65,14.92L14.2,16.47C13.53,16.8 12.79,17 12,17A5,5 0 0,1 7,12C7,11.21 7.2,10.47 7.53,9.8M2,4.27L4.28,6.55L4.73,7C3.08,8.3 1.78,10 1,12C2.73,16.39 7,19.5 12,19.5C13.55,19.5 15.03,19.2 16.38,18.66L16.81,19.08L19.73,22L21,20.73L3.27,3M12,7A5,5 0 0,1 17,12C17,12.64 16.87,13.26 16.64,13.82L19.57,16.75C21.07,15.5 22.27,13.86 23,12C21.27,7.61 17,4.5 12,4.5C10.6,4.5 9.26,4.75 8,5.2L10.17,7.35C10.74,7.13 11.35,7 12,7Z\" } }, [_vm.title ? _c(\"title\", [_vm._v(_vm._s(_vm.title))]) : _vm._e()])])]);\n};\nvar _sfc_staticRenderFns$1 = [];\nvar __component__$1 = /* @__PURE__ */ normalizeComponent(\n _sfc_main$1,\n _sfc_render$1,\n _sfc_staticRenderFns$1,\n false,\n null,\n null\n);\nconst EyeOff = __component__$1.exports;\nregister(t28);\nconst logger = getLoggerBuilder().detectUser().setApp(\"@nextcloud/vue\").build();\nconst passwordPolicy = loadState(\"core\", \"capabilities\", {}).password_policy || null;\nconst NcInputFieldProps = new Set(Object.keys(NcInputField.props));\nconst _sfc_main = {\n name: \"NcPasswordField\",\n components: {\n NcInputField,\n Eye,\n EyeOff\n },\n // Allow forwarding all attributes\n inheritAttrs: false,\n props: {\n /**\n * Any [NcInputField](#/Components/NcFields?id=ncinputfield) props\n */\n // Not an actual prop but needed to show in vue-styleguidist docs\n // eslint-disable-next-line\n \" \": {},\n // Reuse all the props from NcInputField for better typing and documentation\n ...NcInputField.props,\n // Redefined props\n /**\n * Controls whether to display the trailing button.\n */\n showTrailingButton: {\n type: Boolean,\n default: true\n },\n // Removed NcInputField props, defined only by this component\n trailingButtonLabel: void 0,\n // Custom props\n /**\n * Check if the user entered a valid password using the password_policy\n * app if available.\n *\n * Warning: this doesn't replace server side checking and will do nothing\n * if the password_policy app is disabled.\n */\n checkPasswordStrength: {\n type: Boolean,\n default: false\n },\n /**\n * The minlength property defines the minimum number of characters\n * (as UTF-16 code units) the user can enter\n */\n minlength: {\n type: Number,\n default: 0\n },\n /**\n * The maxlength property defines the maximum number of characters\n * (as UTF-16 code units) the user can enter\n */\n maxlength: {\n type: Number,\n default: null\n },\n /**\n * Render as input[type=text] that looks like password field.\n * Allows to avoid unwanted password-specific browser behavior,\n * such as save or generate password prompt.\n * Useful for secret token fields.\n * Note: autocomplete=\"off\" is ignored by browsers.\n */\n asText: {\n type: Boolean,\n default: false\n }\n },\n emits: [\n \"valid\",\n \"invalid\",\n \"update:value\"\n ],\n data() {\n return {\n isPasswordHidden: true,\n internalHelpMessage: \"\",\n isValid: null\n };\n },\n computed: {\n computedError() {\n return this.error || this.isValid === false;\n },\n computedSuccess() {\n return this.success || this.isValid === true;\n },\n computedHelperText() {\n if (this.helperText.length > 0) {\n return this.helperText;\n }\n return this.internalHelpMessage;\n },\n rules() {\n const { minlength } = this;\n return {\n minlength: minlength != null ? minlength : passwordPolicy == null ? void 0 : passwordPolicy.minLength\n };\n },\n trailingButtonLabelPassword() {\n return this.isPasswordHidden ? t(\"Show password\") : t(\"Hide password\");\n },\n propsAndAttrsToForward() {\n return {\n // Proxy all the HTML attributes\n ...this.$attrs,\n // Proxy original NcInputField's props\n ...Object.fromEntries(\n Object.entries(this.$props).filter(([key]) => NcInputFieldProps.has(key))\n )\n };\n }\n },\n watch: {\n value(newValue) {\n if (this.checkPasswordStrength) {\n if (passwordPolicy === null) {\n return;\n }\n this.checkPassword(newValue);\n }\n }\n },\n methods: {\n /**\n * Focus the input element\n *\n * @public\n */\n focus() {\n this.$refs.inputField.focus();\n },\n /**\n * Select all the text in the input\n *\n * @public\n */\n select() {\n this.$refs.inputField.select();\n },\n handleInput(event) {\n this.$emit(\"update:value\", event.target.value);\n },\n togglePasswordVisibility() {\n this.isPasswordHidden = !this.isPasswordHidden;\n },\n checkPassword: debounce(async function(password) {\n try {\n const { data } = await axios.post(generateOcsUrl(\"apps/password_policy/api/v1/validate\"), { password });\n this.isValid = data.ocs.data.passed;\n if (data.ocs.data.passed) {\n this.internalHelpMessage = t(\"Password is secure\");\n this.$emit(\"valid\");\n return;\n }\n this.internalHelpMessage = data.ocs.data.reason;\n this.$emit(\"invalid\");\n } catch (e) {\n logger.error(\"Password policy returned an error\", e);\n }\n }, 500)\n }\n};\nvar _sfc_render = function render3() {\n var _vm = this, _c = _vm._self._c;\n return _c(\"NcInputField\", _vm._g(_vm._b({ ref: \"inputField\", attrs: { \"type\": _vm.isPasswordHidden && !_vm.asText ? \"password\" : \"text\", \"trailing-button-label\": _vm.trailingButtonLabelPassword, \"helper-text\": _vm.computedHelperText, \"error\": _vm.computedError, \"success\": _vm.computedSuccess, \"minlength\": _vm.rules.minlength, \"input-class\": { \"password-field__input--secure-text\": _vm.isPasswordHidden && _vm.asText } }, on: { \"trailing-button-click\": _vm.togglePasswordVisibility, \"input\": _vm.handleInput }, scopedSlots: _vm._u([{ key: \"trailing-button-icon\", fn: function() {\n return [_vm.isPasswordHidden ? _c(\"Eye\", { attrs: { \"size\": 18 } }) : _c(\"EyeOff\", { attrs: { \"size\": 18 } })];\n }, proxy: true }]) }, \"NcInputField\", _vm.propsAndAttrsToForward, false), _vm.$listeners), [_vm._t(\"default\")], 2);\n};\nvar _sfc_staticRenderFns = [];\nvar __component__ = /* @__PURE__ */ normalizeComponent(\n _sfc_main,\n _sfc_render,\n _sfc_staticRenderFns,\n false,\n null,\n \"d984b8e5\"\n);\nconst NcPasswordField = __component__.exports;\nexport {\n NcPasswordField as N\n};\n","\n import API from \"!../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../css-loader/dist/cjs.js!./NcPopover-BDlL00qZ.css\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../css-loader/dist/cjs.js!./NcPopover-BDlL00qZ.css\";\n export default content && content.locals ? content.locals : undefined;\n","import '../assets/NcPopover-BDlL00qZ.css';\nimport Vue, { defineComponent } from \"vue\";\nimport { Dropdown } from \"floating-vue\";\nimport { createFocusTrap } from \"focus-trap\";\nimport { g as getTrapStack } from \"./focusTrap-Cecv_gjR.mjs\";\nimport { n as normalizeComponent } from \"./_plugin-vue2_normalizer-DU4iP6Vu.mjs\";\nconst _sfc_main$1 = defineComponent({\n name: \"NcPopoverTriggerProvider\",\n provide() {\n return {\n \"NcPopover:trigger:shown\": () => this.shown,\n \"NcPopover:trigger:attrs\": () => this.triggerAttrs\n };\n },\n props: {\n shown: {\n type: Boolean,\n required: true\n },\n popupRole: {\n type: String,\n default: void 0\n }\n },\n computed: {\n triggerAttrs() {\n return {\n \"aria-haspopup\": this.popupRole,\n \"aria-expanded\": this.shown.toString()\n };\n }\n },\n render() {\n var _a, _b;\n return (_b = (_a = this.$scopedSlots).default) == null ? void 0 : _b.call(_a, {\n attrs: this.triggerAttrs\n });\n }\n});\nconst _sfc_render$1 = null;\nconst _sfc_staticRenderFns$1 = null;\nvar __component__$1 = /* @__PURE__ */ normalizeComponent(\n _sfc_main$1,\n _sfc_render$1,\n _sfc_staticRenderFns$1,\n false,\n null,\n null\n);\nconst NcPopoverTriggerProvider = __component__$1.exports;\nconst _sfc_main = {\n name: \"NcPopover\",\n components: {\n Dropdown,\n NcPopoverTriggerProvider\n },\n inheritAttrs: false,\n props: {\n /**\n * Show or hide the popper\n * @see https://floating-vue.starpad.dev/api/#shown\n */\n shown: {\n type: Boolean,\n default: false\n },\n /**\n * Popup role\n * @see https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-haspopup#values\n */\n popupRole: {\n type: String,\n default: void 0,\n validator: (value) => [\"menu\", \"listbox\", \"tree\", \"grid\", \"dialog\", \"true\"].includes(value)\n },\n popoverBaseClass: {\n type: String,\n default: \"\"\n },\n /**\n * Enable popover focus trap\n */\n focusTrap: {\n type: Boolean,\n default: true\n },\n /**\n * Set element to return focus to after focus trap deactivation\n *\n * @type {import('focus-trap').FocusTargetValueOrFalse}\n */\n setReturnFocus: {\n default: void 0,\n type: [HTMLElement, SVGElement, String, Boolean]\n }\n },\n emits: [\n \"after-show\",\n \"after-hide\",\n /**\n * @see https://floating-vue.starpad.dev/api/#update-shown\n */\n \"update:shown\"\n ],\n data() {\n return {\n internalShown: this.shown\n };\n },\n watch: {\n shown(value) {\n this.internalShown = value;\n },\n internalShown(value) {\n this.$emit(\"update:shown\", value);\n }\n },\n mounted() {\n this.checkTriggerA11y();\n },\n beforeDestroy() {\n this.clearFocusTrap();\n this.clearEscapeStopPropagation();\n },\n methods: {\n /**\n * Check if the trigger has all required a11y attributes.\n * Important to check custom trigger button.\n */\n checkTriggerA11y() {\n var _a;\n if ((_a = window.OC) == null ? void 0 : _a.debug) {\n const triggerContainer = this.getPopoverTriggerContainerElement();\n const requiredTriggerButton = triggerContainer.querySelector(\"[aria-expanded]\");\n if (!requiredTriggerButton) {\n Vue.util.warn(\"It looks like you are using a custom button as a or other popover #trigger. If you are not using as a trigger, you need to bind attrs from the #trigger slot props to your custom button. See docs for an example.\");\n }\n }\n },\n /**\n * Remove incorrect aria-describedby attribute from the trigger.\n * @see https://github.com/Akryum/floating-vue/blob/8d4f7125aae0e3ea00ba4093d6d2001ab15058f1/packages/floating-vue/src/components/Popper.ts#L734\n */\n removeFloatingVueAriaDescribedBy() {\n const triggerContainer = this.getPopoverTriggerContainerElement();\n const triggerElements = triggerContainer.querySelectorAll(\"[data-popper-shown]\");\n for (const el of triggerElements) {\n el.removeAttribute(\"aria-describedby\");\n }\n },\n /**\n * @return {HTMLElement|undefined}\n */\n getPopoverContentElement() {\n var _a, _b;\n return (_b = (_a = this.$refs.popover) == null ? void 0 : _a.$refs.popperContent) == null ? void 0 : _b.$el;\n },\n /**\n * @return {HTMLElement|undefined}\n */\n getPopoverTriggerContainerElement() {\n return this.$refs.popover.$refs.reference;\n },\n /**\n * Add focus trap for accessibility.\n */\n async useFocusTrap() {\n await this.$nextTick();\n if (!this.focusTrap) {\n return;\n }\n const el = this.getPopoverContentElement();\n if (!el) {\n return;\n }\n this.$focusTrap = createFocusTrap(el, {\n // Prevents to lose focus using esc key\n // Focus will be release when popover be hide\n escapeDeactivates: false,\n allowOutsideClick: true,\n setReturnFocus: this.setReturnFocus,\n trapStack: getTrapStack()\n });\n this.$focusTrap.activate();\n },\n /**\n * Remove focus trap\n *\n * @param {object} options The configuration options for focusTrap\n */\n clearFocusTrap(options = {}) {\n var _a;\n try {\n (_a = this.$focusTrap) == null ? void 0 : _a.deactivate(options);\n this.$focusTrap = null;\n } catch (err) {\n console.warn(err);\n }\n },\n /**\n * Add stopPropagation for Escape.\n * It prevents global Escape handling after closing popover.\n *\n * Manual event handling is used here instead of v-on because there is no direct access to the node.\n * Alternative - wrap