From a414f54efb6c27670f724eaf48ee5661c47d33ae Mon Sep 17 00:00:00 2001 From: MiMoHo <37556964+MiMoHo@users.noreply.github.com> Date: Sun, 5 Jul 2026 01:25:22 +0200 Subject: [PATCH 1/2] feat(core): allow pinning apps inline in the navigation bar Bring back one-click app switching next to the app menu launcher: users can pin selected apps in the personal 'Navigation bar settings' section. Pinned entries render inline in the top bar following the user-defined app order, everything else stays in the app menu popover. - The inline entries reuse the pre-NC34 AppMenuEntry/AppMenuIcon components, restored from stable33 (icon, label on hover/focus, active indicator, unread dot), adjusted to the 44px header. - The list is measured (useElementSize) and only renders as many entries as fit, so it can never collide with the centered search. - The current-app trigger is hidden while the active app is visible in the pinned list, as the active entry already shows the location. - Pinned entries are stored as user preference core/apps_pinned and saved through the same provisioning API path as apporder, validated in the theming BeforePreferenceListener. - Pin toggles live in the existing personal 'Navigation bar settings' section next to the app order controls. Resolves #61274 Co-Authored-By: Claude Fable 5 Assisted-by: ClaudeCode:claude-fable-5 Signed-off-by: MiMoHo <37556964+MiMoHo@users.noreply.github.com> --- .../lib/Listener/BeforePreferenceListener.php | 35 +++- apps/theming/lib/Settings/Personal.php | 1 + .../src/components/AppOrderSelector.vue | 11 + .../components/AppOrderSelectorElement.vue | 21 ++ .../src/components/UserSectionAppMenu.vue | 50 ++++- core/src/components/AppMenu.vue | 73 ++++++- core/src/components/AppMenuEntry.vue | 192 ++++++++++++++++++ core/src/components/AppMenuIcon.vue | 68 +++++++ core/src/tests/components/AppMenu.spec.ts | 82 ++++++++ lib/private/TemplateLayout.php | 20 ++ 10 files changed, 545 insertions(+), 8 deletions(-) create mode 100644 core/src/components/AppMenuEntry.vue create mode 100644 core/src/components/AppMenuIcon.vue diff --git a/apps/theming/lib/Listener/BeforePreferenceListener.php b/apps/theming/lib/Listener/BeforePreferenceListener.php index d823df1ab33c2..c61211262e732 100644 --- a/apps/theming/lib/Listener/BeforePreferenceListener.php +++ b/apps/theming/lib/Listener/BeforePreferenceListener.php @@ -24,6 +24,11 @@ class BeforePreferenceListener implements IEventListener { */ private const ALLOWED_KEYS = ['force_enable_blur_filter', 'shortcuts_disabled', 'primary_color']; + /** + * @var string[] + */ + private const ALLOWED_CORE_KEYS = ['apporder', 'apps_pinned']; + public function __construct( private IAppManager $appManager, ) { @@ -72,7 +77,7 @@ private function handleThemingValues(BeforePreferenceSetEvent|BeforePreferenceDe } private function handleCoreValues(BeforePreferenceSetEvent|BeforePreferenceDeletedEvent $event): void { - if ($event->getConfigKey() !== 'apporder') { + if (!in_array($event->getConfigKey(), self::ALLOWED_CORE_KEYS, true)) { // Not allowed config key return; } @@ -82,6 +87,17 @@ private function handleCoreValues(BeforePreferenceSetEvent|BeforePreferenceDelet return; } + switch ($event->getConfigKey()) { + case 'apporder': + $this->validateAppOrder($event); + break; + case 'apps_pinned': + $this->validatePinnedApps($event); + break; + } + } + + private function validateAppOrder(BeforePreferenceSetEvent $event): void { $value = json_decode($event->getConfigValue(), true, flags:JSON_THROW_ON_ERROR); if (!is_array(($value))) { // Must be an array @@ -97,4 +113,21 @@ private function handleCoreValues(BeforePreferenceSetEvent|BeforePreferenceDelet } $event->setValid(true); } + + private function validatePinnedApps(BeforePreferenceSetEvent $event): void { + $value = json_decode($event->getConfigValue(), true); + // required format: list of navigation entry ids [ id: string ] + if (!is_array($value) || $value !== array_values($value)) { + // Must be a list + return; + } + + foreach ($value as $id) { + if (!is_string($id)) { + // Invalid config value, refuse the change + return; + } + } + $event->setValid(true); + } } diff --git a/apps/theming/lib/Settings/Personal.php b/apps/theming/lib/Settings/Personal.php index 5e1779d937a5e..7f9d12ca80770 100644 --- a/apps/theming/lib/Settings/Personal.php +++ b/apps/theming/lib/Settings/Personal.php @@ -81,6 +81,7 @@ public function getForm(): TemplateResponse { $this->initialStateService->provideInitialState('enableBlurFilter', $this->config->getUserValue($this->userId, 'theming', 'force_enable_blur_filter', '')); $this->initialStateService->provideInitialState('navigationBar', [ 'userAppOrder' => json_decode($this->config->getUserValue($this->userId, 'core', 'apporder', '[]'), true, flags:JSON_THROW_ON_ERROR), + 'userPinnedApps' => json_decode($this->config->getUserValue($this->userId, 'core', 'apps_pinned', '[]'), true, flags:JSON_THROW_ON_ERROR), 'enforcedDefaultApp' => $forcedDefaultEntry ]); diff --git a/apps/theming/src/components/AppOrderSelector.vue b/apps/theming/src/components/AppOrderSelector.vue index 25b78a43dabc7..886860503389f 100644 --- a/apps/theming/src/components/AppOrderSelector.vue +++ b/apps/theming/src/components/AppOrderSelector.vue @@ -25,6 +25,15 @@ defineProps<{ * Details like status information that need to be forwarded to the interactive elements */ ariaDetails: string + + /** + * Show the toggle for pinning apps to the navigation bar + */ + showPin?: boolean +}>() + +defineEmits<{ + 'toggle:pinned': [app: IApp] }>() /** @@ -153,6 +162,8 @@ function updateStatusInfo(index: number) { :aria-describedby="statusInfoId" :isFirst="index === 0 || !!appList[index - 1]!.default" :isLast="index === appList.length - 1" + :showPin="showPin" + @toggle:pinned="$emit('toggle:pinned', app)" v-on="app.default ? {} : { diff --git a/apps/theming/src/components/AppOrderSelectorElement.vue b/apps/theming/src/components/AppOrderSelectorElement.vue index 5dd43cf574d65..db288131cec55 100644 --- a/apps/theming/src/components/AppOrderSelectorElement.vue +++ b/apps/theming/src/components/AppOrderSelectorElement.vue @@ -9,12 +9,15 @@ import { nextTick, useTemplateRef } from 'vue' import NcButton from '@nextcloud/vue/components/NcButton' import IconArrowDown from 'vue-material-design-icons/ArrowDown.vue' import IconArrowUp from 'vue-material-design-icons/ArrowUp.vue' +import IconPin from 'vue-material-design-icons/Pin.vue' +import IconPinOutline from 'vue-material-design-icons/PinOutline.vue' export interface IApp { id: string // app id icon: string // path to the icon svg label?: string // display name default?: boolean // for app as default app + pinned?: boolean // for app pinned to the navigation bar } const props = defineProps<{ @@ -40,11 +43,16 @@ const props = defineProps<{ * Is this the last element in the list */ isLast?: boolean + /** + * Show the toggle for pinning the app to the navigation bar + */ + showPin?: boolean }>() const emit = defineEmits<{ 'move:up': [] 'move:down': [] + 'toggle:pinned': [] /** * We need this as Sortable.js removes all native focus event listeners */ @@ -124,6 +132,19 @@ function keepFocus() {
+ + + { const { /** The app order currently defined by the user */ userAppOrder, + /** The apps the user pinned to the navigation bar (if any) */ + userPinnedApps, /** The enforced default app set by the administrator (if any) */ enforcedDefaultApp, -} = loadState<{ userAppOrder: IAppOrder, enforcedDefaultApp: string }>('theming', 'navigationBar') +} = loadState<{ userAppOrder: IAppOrder, userPinnedApps: string[], enforcedDefaultApp: string }>('theming', 'navigationBar') /** * Array of all available apps, it is set by a core controller for the app menu, so it is always available */ const initialAppOrder = loadState('core', 'apps') .filter(({ type }) => type === 'link') - .map((app) => ({ ...app, label: app.name, default: app.default && app.id === enforcedDefaultApp })) + .map((app) => ({ ...app, label: app.name, default: app.default && app.id === enforcedDefaultApp, pinned: userPinnedApps.includes(app.id) })) /** * The current apporder (sorted by user) @@ -60,9 +62,17 @@ const hasCustomAppOrder = ref(!Array.isArray(userAppOrder) || Object.values(user */ const hasAppOrderChanged = computed(() => initialAppOrder.some(({ id }, index) => id !== appOrder.value[index]?.id)) +/** + * Track if the pinned apps have changed, so the user can be informed to reload + */ +const hasPinnedAppsChanged = computed(() => initialAppOrder.some(({ id, pinned }) => pinned !== appOrder.value.find((app) => app.id === id)?.pinned)) + /** ID of the "app order has changed" NcNodeCard, used for the aria-details of the apporder */ const elementIdAppOrderChanged = 'theming-apporder-changed-infocard' +/** ID of the "pinned apps have changed" NcNodeCard, used for the aria-details of the apporder */ +const elementIdPinnedAppsChanged = 'theming-pinnedapps-changed-infocard' + /** ID of the "you can not change the default app" NcNodeCard, used for the aria-details of the apporder */ const elementIdEnforcedDefaultApp = 'theming-apporder-changed-infocard' @@ -70,7 +80,7 @@ const elementIdEnforcedDefaultApp = 'theming-apporder-changed-infocard' * The aria-details value of the app order selector * contains the space separated list of element ids of NcNoteCards */ -const ariaDetailsAppOrder = computed(() => (hasAppOrderChanged.value ? `${elementIdAppOrderChanged} ` : '') + (enforcedDefaultApp ? elementIdEnforcedDefaultApp : '')) +const ariaDetailsAppOrder = computed(() => (hasAppOrderChanged.value ? `${elementIdAppOrderChanged} ` : '') + (hasPinnedAppsChanged.value ? `${elementIdPinnedAppsChanged} ` : '') + (enforcedDefaultApp ? elementIdEnforcedDefaultApp : '')) /** * Update the app order, called when the user sorts entries @@ -93,6 +103,25 @@ async function updateAppOrder(value: IApp[]) { } } +/** + * Update the pinned apps, called when the user toggles the pin of an entry + * + * @param app The app to toggle the pinned state of + */ +async function togglePinned(app: IApp) { + const pinned = appOrder.value + .filter(({ id, pinned }) => (id === app.id ? !pinned : pinned)) + .map(({ id }) => id) + + try { + await saveSetting('apps_pinned', pinned) + appOrder.value = appOrder.value.map((entry) => (entry.id === app.id ? { ...entry, pinned: !entry.pinned } : entry)) + } catch (error) { + logger.error('Could not update the pinned apps', { error }) + showError(t('theming', 'Could not update the pinned apps')) + } +} + /** * Reset the app order to the default */ @@ -101,13 +130,14 @@ async function resetAppOrder() { await saveSetting('apporder', []) hasCustomAppOrder.value = false - // Reset our app order list + // Reset our app order list, keeping the pinned state of the entries + const pinnedIds = new Set(appOrder.value.filter(({ pinned }) => pinned).map(({ id }) => id)) const { data } = await axios.get>(generateOcsUrl('/core/navigation/apps'), { headers: { 'OCS-APIRequest': 'true', }, }) - appOrder.value = data.ocs.data.map((app) => ({ ...app, label: app.name, default: app.default && app.app === enforcedDefaultApp })) + appOrder.value = data.ocs.data.map((app) => ({ ...app, label: app.name, default: app.default && app.app === enforcedDefaultApp, pinned: pinnedIds.has(app.id) })) } catch (error) { logger.error('Could not reset the app order', { error }) showError(t('theming', 'Could not reset the app order')) @@ -134,18 +164,26 @@ async function saveSetting(key: string, value: unknown) {

{{ t('theming', 'You can configure the app order used for the navigation bar. The first entry will be the default app, opened after login or when clicking on the logo.') }}

+

+ {{ t('theming', 'Pinned apps are shown directly in the navigation bar, while all other apps stay available in the apps menu.') }} +

{{ t('theming', 'The default app can not be changed because it was configured by the administrator.') }} {{ t('theming', 'The app order was changed, to see it in action you have to reload the page.') }} + + {{ t('theming', 'The pinned apps were changed, to see them in the navigation bar you have to reload the page.') }} + + showPin + @update:modelValue="updateAppOrder" + @toggle:pinned="togglePinned" /> +
    + +
@@ -83,12 +93,14 @@ import { subscribe, unsubscribe } from '@nextcloud/event-bus' import { loadState } from '@nextcloud/initial-state' import { isRTL, n, t } from '@nextcloud/l10n' import { generateUrl, imagePath } from '@nextcloud/router' +import { useElementSize } from '@vueuse/core' import { defineComponent, ref } from 'vue' import NcButton from '@nextcloud/vue/components/NcButton' import NcPopover from '@nextcloud/vue/components/NcPopover' import IconCog from 'vue-material-design-icons/Cog.vue' import IconDotsGrid from 'vue-material-design-icons/DotsGrid.vue' import AppItem from './AppItem.vue' +import AppMenuEntry from './AppMenuEntry.vue' import logger from '../logger.js' // Settings IDs that represent actions, not navigable pages. @@ -99,6 +111,7 @@ export default defineComponent({ components: { AppItem, + AppMenuEntry, IconCog, IconDotsGrid, NcButton, @@ -107,10 +120,17 @@ export default defineComponent({ setup() { const opened = ref(false) + // The list of pinned entries; measured to only render as many + // entries as fit the space left between the menu triggers and + // the centered search. + const pinnedList = ref() + const { width: pinnedListWidth } = useElementSize(pinnedList) return { t, n, opened, + pinnedList, + pinnedListWidth, } }, @@ -119,9 +139,13 @@ export default defineComponent({ // Record, not an array: PHP ships getAll('settings') without // array_values(). Matches AccountMenu.vue's usage. const settingsList = loadState>('core', 'settingsNavEntries', {}) + // Entry ids the user pinned to show inline in the top bar + // (user preference `core`/`apps_pinned`) + const pinnedAppIds = loadState('core', 'apps-pinned', []) return { appList, settingsList, + pinnedAppIds, isAdmin: getCurrentUser()?.isAdmin ?? false, // Roving tabindex: only this tile has tabindex=0; arrow keys move it. focusedIndex: 0, @@ -196,6 +220,30 @@ export default defineComponent({ const tail = this.isAdmin ? this.moreAppsEntry : this.appStoreEntry return [...this.appList, tail] }, + + // Apps the user pinned to show inline in the top bar, following the + // (user-sortable) navigation order of `appList`. + pinnedApps(): INavigationEntry[] { + return this.appList.filter(({ id }) => this.pinnedAppIds.includes(id)) + }, + + // Number of pinned entries fitting the measured list width. + // Entries are square with an edge length of --header-height (44px). + pinnedAppLimit(): number { + const entryWidth = 44 + return Math.max(Math.floor(this.pinnedListWidth / entryWidth), 0) + }, + + visiblePinnedApps(): INavigationEntry[] { + return this.pinnedApps.slice(0, this.pinnedAppLimit) + }, + + // The current-app trigger only repeats what an inline pinned entry + // already shows (the active entry carries an indicator), so hide it + // while the active app is visible in the pinned list. + showCurrentAppButton(): boolean { + return !this.visiblePinnedApps.some(({ id }) => id === this.currentApp?.id) + }, }, watch: { @@ -396,6 +444,29 @@ export default defineComponent({ .app-menu { display: flex; align-items: center; + // Fill the remaining header-start space so the pinned entries list can + // grow into it; min-width lets the menu yield before pushing the + // centered search around. + flex: 1 1; + min-width: 0; + // The size the currently focussed pinned entry will grow to show the full name + --app-menu-entry-growth: calc(var(--default-grid-baseline) * 4); + + &__list { + display: flex; + flex-wrap: nowrap; + // Claim the free space (measured to cap the rendered entries), + // never intrinsic size, so the list cannot overflow the header. + flex: 1 1; + width: 0; + margin-inline: calc(var(--app-menu-entry-growth) / 2); + + // App switching is covered by the waffle popover on small screens, + // same breakpoint as for the current-app button. + @media only screen and (max-width: 1024px) { + display: none !important; + } + } &__waffle { // NcButton's tertiary-no-background variant uses --color-main-text, diff --git a/core/src/components/AppMenuEntry.vue b/core/src/components/AppMenuEntry.vue new file mode 100644 index 0000000000000..186a64173deb9 --- /dev/null +++ b/core/src/components/AppMenuEntry.vue @@ -0,0 +1,192 @@ + + + + + + + + + diff --git a/core/src/components/AppMenuIcon.vue b/core/src/components/AppMenuIcon.vue new file mode 100644 index 0000000000000..49e75254a2b2f --- /dev/null +++ b/core/src/components/AppMenuIcon.vue @@ -0,0 +1,68 @@ + + + + + + + diff --git a/core/src/tests/components/AppMenu.spec.ts b/core/src/tests/components/AppMenu.spec.ts index 769351ad2d6d8..ea24c1c746533 100644 --- a/core/src/tests/components/AppMenu.spec.ts +++ b/core/src/tests/components/AppMenu.spec.ts @@ -42,6 +42,17 @@ vi.mock('@nextcloud/router', () => ({ imagePath: (app: string, file: string) => `/${app}/img/${file}`, })) +// jsdom has no layout, so useElementSize would report 0 and no pinned entry +// would ever render. Expose the width ref so tests can set the available space. +const elementSize = vi.hoisted(() => ({ width: { value: 0 } })) +vi.mock('@vueuse/core', async () => { + const { ref } = await import('vue') + elementSize.width = ref(400) + return { + useElementSize: () => ({ width: elementSize.width }), + } +}) + // Build a minimal nav entry that satisfies INavigationEntry. function makeApp(overrides: Partial = {}): INavigationEntry { return { @@ -88,9 +99,23 @@ beforeEach(async () => { } initialState.loadState.mockImplementation((_app: string, key: string, fallback: unknown) => key === 'apps' ? fakeApps() : fallback) auth.getCurrentUser.mockReturnValue({ isAdmin: false }) + elementSize.width.value = 400 AppMenu = (await import('../../components/AppMenu.vue')).default }) +/** loadState mock shipping both the app list and a set of pinned entry ids */ +function mockAppsWithPinned(apps: INavigationEntry[], pinned: string[]) { + initialState.loadState.mockImplementation((_app: string, key: string, fallback: unknown) => { + if (key === 'apps') { + return apps + } + if (key === 'apps-pinned') { + return pinned + } + return fallback + }) +} + afterEach(() => { // NcPopover teleports to ; clear teleported nodes between tests. while (document.body.firstChild) { @@ -216,6 +241,63 @@ describe('core: AppMenu', () => { expect(wrapper.find('.app-menu__current-app-name').text()).toBe('Files') }) + it('renders pinned apps inline following the navigation order', () => { + // Pinned ids are stored unordered; the rendered order follows appList. + mockAppsWithPinned(fakeApps(), ['calendar', 'files']) + mount(AppMenu, { attachTo: document.body }) + + const labels = Array.from(document.querySelectorAll('.app-menu-entry__label')).map((el) => el.textContent?.trim()) + expect(labels).toEqual(['Files', 'Calendar']) + }) + + it('ignores pinned ids without a matching navigation entry', () => { + mockAppsWithPinned(fakeApps(), ['mail', 'disabled-app']) + mount(AppMenu, { attachTo: document.body }) + + const labels = Array.from(document.querySelectorAll('.app-menu-entry__label')).map((el) => el.textContent?.trim()) + expect(labels).toEqual(['Mail']) + }) + + it('renders no pinned list when nothing is pinned', () => { + const wrapper = mount(AppMenu, { attachTo: document.body }) + expect(wrapper.find('.app-menu__list').exists()).toBe(false) + }) + + it('only renders as many pinned entries as fit the measured width', () => { + // 100px fits two 44px entries + elementSize.width.value = 100 + mockAppsWithPinned(fakeApps(), ['files', 'mail', 'calendar']) + const wrapper = mount(AppMenu, { attachTo: document.body }) + + expect(wrapper.findAll('.app-menu-entry')).toHaveLength(2) + }) + + it('hides the current-app button while the active app is visible in the pinned list', () => { + mockAppsWithPinned(fakeApps(), ['files']) + const wrapper = mount(AppMenu, { attachTo: document.body }) + + expect(wrapper.find('.app-menu__current-app').exists()).toBe(false) + expect(wrapper.get('.app-menu-entry a').attributes('aria-current')).toBe('page') + }) + + it('keeps the current-app button when the active app is not pinned', () => { + mockAppsWithPinned(fakeApps(), ['mail']) + const wrapper = mount(AppMenu, { attachTo: document.body }) + + expect(wrapper.find('.app-menu__current-app').exists()).toBe(true) + expect(wrapper.get('.app-menu__current-app-name').text()).toBe('Files') + }) + + it('keeps the current-app button when the active app is pinned but truncated away', () => { + // One 44px slot: only Files renders, active Calendar is cut off + elementSize.width.value = 50 + mockAppsWithPinned(eightApps(2).slice(0, 3), ['files', 'calendar']) + const wrapper = mount(AppMenu, { attachTo: document.body }) + + expect(wrapper.findAll('.app-menu-entry')).toHaveLength(1) + expect(wrapper.find('.app-menu__current-app').exists()).toBe(true) + }) + it('does not render the current-app button when only the logout entry is active', () => { // Defensive: logout is an action, not a page, so it should never be the // "current section" even though it carries type=settings. NavigationManager diff --git a/lib/private/TemplateLayout.php b/lib/private/TemplateLayout.php index afcda38e64eb4..adcc6aa1a25ea 100644 --- a/lib/private/TemplateLayout.php +++ b/lib/private/TemplateLayout.php @@ -82,6 +82,7 @@ public function getPageTemplate(string $renderAs, string $appId): ITemplate { $this->initialState->provideInitialState('core', 'active-app', $this->navigationManager->getActiveEntry()); $this->initialState->provideInitialState('core', 'apps', array_values($this->navigationManager->getAll())); + $this->initialState->provideInitialState('core', 'apps-pinned', $this->getPinnedEntryIds()); $this->initialState->provideInitialState('unified-search', 'min-search-length', $this->appConfig->getValueInt(Application::APP_ID, ConfigLexicon::UNIFIED_SEARCH_MIN_SEARCH_LENGTH)); if ($this->config->getSystemValueBool('unified_search.enabled', false) || !$this->config->getSystemValueBool('enable_non-accessible_features', true)) { @@ -315,6 +316,25 @@ public function getPageTemplate(string $renderAs, string $appId): ITemplate { return $page; } + /** + * Navigation entry ids the user pinned to show inline in the header navigation bar + * + * @return list + */ + private function getPinnedEntryIds(): array { + $user = Server::get(IUserSession::class)->getUser(); + if ($user === null) { + return []; + } + + $pinned = json_decode($this->config->getUserValue($user->getUID(), 'core', 'apps_pinned', '[]'), true); + if (!is_array($pinned)) { + return []; + } + + return array_values(array_filter($pinned, is_string(...))); + } + protected function getVersionHashSuffix(string $path = '', string $file = ''): string { if ($this->config->getSystemValueBool('debug', false)) { // allows chrome workspace mapping in debug mode From 26ae9a14e3161b354be7a2a99ab4bb10e724dde1 Mon Sep 17 00:00:00 2001 From: MiMoHo <37556964+MiMoHo@users.noreply.github.com> Date: Sun, 5 Jul 2026 01:25:30 +0200 Subject: [PATCH 2/2] chore(assets): compile assets Co-Authored-By: Claude Fable 5 Assisted-by: ClaudeCode:claude-fable-5 Signed-off-by: MiMoHo <37556964+MiMoHo@users.noreply.github.com> --- dist/common-refreshStyles-Cc0H8Et_.chunk.css | 1 + dist/common-refreshStyles-DsizfXUv.chunk.css | 1 - dist/core-main.js | 4 ++-- dist/core-main.js.map | 2 +- dist/refreshStyles-CRG6dFhH.chunk.mjs | 2 ++ ...k.mjs.license => refreshStyles-CRG6dFhH.chunk.mjs.license} | 0 dist/refreshStyles-CRG6dFhH.chunk.mjs.map | 1 + ...p.license => refreshStyles-CRG6dFhH.chunk.mjs.map.license} | 0 dist/refreshStyles-hHzoSI2h.chunk.mjs | 2 -- dist/refreshStyles-hHzoSI2h.chunk.mjs.map | 1 - dist/theming-settings-admin.css | 2 +- dist/theming-settings-admin.mjs | 2 +- dist/theming-settings-personal.css | 2 +- dist/theming-settings-personal.mjs | 2 +- dist/theming-settings-personal.mjs.map | 2 +- 15 files changed, 12 insertions(+), 12 deletions(-) create mode 100644 dist/common-refreshStyles-Cc0H8Et_.chunk.css delete mode 100644 dist/common-refreshStyles-DsizfXUv.chunk.css create mode 100644 dist/refreshStyles-CRG6dFhH.chunk.mjs rename dist/{refreshStyles-hHzoSI2h.chunk.mjs.license => refreshStyles-CRG6dFhH.chunk.mjs.license} (100%) create mode 100644 dist/refreshStyles-CRG6dFhH.chunk.mjs.map rename dist/{refreshStyles-hHzoSI2h.chunk.mjs.map.license => refreshStyles-CRG6dFhH.chunk.mjs.map.license} (100%) delete mode 100644 dist/refreshStyles-hHzoSI2h.chunk.mjs delete mode 100644 dist/refreshStyles-hHzoSI2h.chunk.mjs.map diff --git a/dist/common-refreshStyles-Cc0H8Et_.chunk.css b/dist/common-refreshStyles-Cc0H8Et_.chunk.css new file mode 100644 index 0000000000000..4ee7f4ddb032c --- /dev/null +++ b/dist/common-refreshStyles-Cc0H8Et_.chunk.css @@ -0,0 +1 @@ +.order-selector-element[data-v-4a9857ea]{list-style:none;display:flex;flex-direction:row;align-items:center;gap:12px;padding-inline:12px}.order-selector-element[data-v-4a9857ea]:hover{background-color:var(--color-background-hover);border-radius:var(--border-radius-large)}.order-selector-element--disabled[data-v-4a9857ea]{border-color:var(--color-text-maxcontrast);color:var(--color-text-maxcontrast)}.order-selector-element--disabled .order-selector-element__icon[data-v-4a9857ea]{opacity:75%}.order-selector-element__actions[data-v-4a9857ea]{flex:0 0;display:flex;flex-direction:row;gap:6px}.order-selector-element__label[data-v-4a9857ea]{flex:1 1;text-overflow:ellipsis;overflow:hidden}.order-selector-element__placeholder[data-v-4a9857ea]{height:44px;width:44px}.order-selector-element__icon[data-v-4a9857ea]{filter:var(--background-invert-if-bright)}._appOrderSelector_cz3jm_2{width:max-content;min-width:260px} diff --git a/dist/common-refreshStyles-DsizfXUv.chunk.css b/dist/common-refreshStyles-DsizfXUv.chunk.css deleted file mode 100644 index 3ec7d47cc1cae..0000000000000 --- a/dist/common-refreshStyles-DsizfXUv.chunk.css +++ /dev/null @@ -1 +0,0 @@ -.order-selector-element[data-v-0cd72c2d]{list-style:none;display:flex;flex-direction:row;align-items:center;gap:12px;padding-inline:12px}.order-selector-element[data-v-0cd72c2d]:hover{background-color:var(--color-background-hover);border-radius:var(--border-radius-large)}.order-selector-element--disabled[data-v-0cd72c2d]{border-color:var(--color-text-maxcontrast);color:var(--color-text-maxcontrast)}.order-selector-element--disabled .order-selector-element__icon[data-v-0cd72c2d]{opacity:75%}.order-selector-element__actions[data-v-0cd72c2d]{flex:0 0;display:flex;flex-direction:row;gap:6px}.order-selector-element__label[data-v-0cd72c2d]{flex:1 1;text-overflow:ellipsis;overflow:hidden}.order-selector-element__placeholder[data-v-0cd72c2d]{height:44px;width:44px}.order-selector-element__icon[data-v-0cd72c2d]{filter:var(--background-invert-if-bright)}._appOrderSelector_cz3jm_2{width:max-content;min-width:260px} diff --git a/dist/core-main.js b/dist/core-main.js index 6170673f667cd..5f04fe0749c18 100644 --- a/dist/core-main.js +++ b/dist/core-main.js @@ -1,2 +1,2 @@ -(()=>{var e,r,n,o={58595(e,r,n){"use strict";var o={};n.r(o),n.d(o,{VERSION:()=>f,after:()=>Ue,all:()=>ir,allKeys:()=>wt,any:()=>ar,assign:()=>Ut,before:()=>Fe,bind:()=>ke,bindAll:()=>Ie,chain:()=>Ce,chunk:()=>Hr,clone:()=>Vt,collect:()=>Ze,compact:()=>Rr,compose:()=>Be,constant:()=>it,contains:()=>sr,countBy:()=>wr,create:()=>Ht,debounce:()=>Pe,default:()=>Wr,defaults:()=>Ft,defer:()=>Me,delay:()=>je,detect:()=>Je,difference:()=>Mr,drop:()=>Tr,each:()=>Qe,escape:()=>fe,every:()=>ir,extend:()=>Bt,extendOwn:()=>Ut,filter:()=>nr,find:()=>Je,findIndex:()=>qe,findKey:()=>He,findLastIndex:()=>We,findWhere:()=>Xe,first:()=>Or,flatten:()=>jr,foldl:()=>er,foldr:()=>rr,forEach:()=>Qe,functions:()=>Lt,get:()=>Yt,groupBy:()=>Ar,has:()=>Kt,head:()=>Or,identity:()=>Jt,include:()=>sr,includes:()=>sr,indexBy:()=>br,indexOf:()=>Ye,initial:()=>kr,inject:()=>er,intersection:()=>Dr,invert:()=>Pt,invoke:()=>cr,isArguments:()=>rt,isArray:()=>Z,isArrayBuffer:()=>q,isBoolean:()=>P,isDataView:()=>Q,isDate:()=>F,isElement:()=>L,isEmpty:()=>vt,isEqual:()=>bt,isError:()=>H,isFinite:()=>nt,isFunction:()=>$,isMap:()=>Tt,isMatch:()=>gt,isNaN:()=>ot,isNull:()=>M,isNumber:()=>U,isObject:()=>j,isRegExp:()=>z,isSet:()=>Rt,isString:()=>B,isSymbol:()=>V,isTypedArray:()=>ft,isUndefined:()=>N,isWeakMap:()=>It,isWeakSet:()=>jt,iteratee:()=>ee,keys:()=>ht,last:()=>Ir,lastIndexOf:()=>Ke,map:()=>Ze,mapObject:()=>ne,matcher:()=>Xt,matches:()=>Xt,max:()=>fr,memoize:()=>Re,methods:()=>Lt,min:()=>pr,mixin:()=>qr,negate:()=>De,noop:()=>oe,now:()=>ce,object:()=>Fr,omit:()=>Er,once:()=>ze,pairs:()=>Nt,partial:()=>Ee,partition:()=>xr,pick:()=>Sr,pluck:()=>ur,property:()=>Qt,propertyOf:()=>ie,random:()=>se,range:()=>zr,reduce:()=>er,reduceRight:()=>rr,reject:()=>or,rest:()=>Tr,restArguments:()=>R,result:()=>be,sample:()=>vr,select:()=>nr,shuffle:()=>gr,size:()=>Cr,some:()=>ar,sortBy:()=>mr,sortedIndex:()=>Ge,tail:()=>Tr,take:()=>Or,tap:()=>qt,template:()=>Ae,templateSettings:()=>de,throttle:()=>Ne,times:()=>ae,toArray:()=>hr,toPath:()=>Wt,transpose:()=>Br,unescape:()=>pe,union:()=>Lr,uniq:()=>Pr,unique:()=>Pr,uniqueId:()=>xe,unzip:()=>Br,values:()=>Mt,where:()=>lr,without:()=>Nr,wrap:()=>Le,zip:()=>Ur});var i={};n.r(i),n.d(i,{clearIconCache:()=>hi,getIconUrl:()=>pi});var a={};n.r(a),n.d(a,{deleteKey:()=>Ni,getApps:()=>Ii,getKeys:()=>Ri,getValue:()=>ji,setValue:()=>Mi});var s={};n.r(s),n.d(s,{formatLinksPlain:()=>Vi,formatLinksRich:()=>Hi,plainToRich:()=>Fi,richToPlain:()=>zi});var c=n(21777),u=n(44368),l=n(63814),f="1.13.8",p="object"==typeof self&&self.self===self&&self||"object"==typeof globalThis&&globalThis.global===globalThis&&globalThis||Function("return this")()||{},d=Array.prototype,h=Object.prototype,v="undefined"!=typeof Symbol?Symbol.prototype:null,g=d.push,m=d.slice,y=h.toString,A=h.hasOwnProperty,b="undefined"!=typeof ArrayBuffer,w="undefined"!=typeof DataView,x=Array.isArray,C=Object.keys,_=Object.create,S=b&&ArrayBuffer.isView,E=isNaN,k=isFinite,O=!{toString:null}.propertyIsEnumerable("toString"),T=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],I=Math.pow(2,53)-1;function R(t,e){return e=null==e?t.length-1:+e,function(){for(var r=Math.max(arguments.length-e,0),n=Array(r),o=0;o=0&&r<=I}}function st(t){return function(e){return null==e?void 0:e[t]}}const ct=st("byteLength"),ut=at(ct);var lt=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;const ft=b?function(t){return S?S(t)&&!Q(t):ut(t)&<.test(y.call(t))}:it(!1),pt=st("length");function dt(t,e){e=function(t){for(var e={},r=t.length,n=0;n=0))if(n.push(t),o.push(e),r.push(!0),c){if((f=t.length)!==e.length)return!1;for(;f--;)r.push({a:t[f],b:e[f]})}else{var p,d=ht(t);if(f=d.length,ht(e).length!==f)return!1;for(;f--;){if(!tt(e,p=d[f]))return!1;r.push({a:t[p],b:e[p]})}}}else n.pop(),o.pop()}return!0}function wt(t){if(!j(t))return[];var e=[];for(var r in t)e.push(r);return O&&dt(t,e),e}function xt(t){var e=pt(t);return function(r){if(null==r)return!1;var n=wt(r);if(pt(n))return!1;for(var o=0;o":">",'"':""","'":"'","`":"`"},fe=ue(le),pe=ue(Pt(le)),de=mt.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var he=/(.)^/,ve={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},ge=/\\|'|\r|\n|\u2028|\u2029/g;function me(t){return"\\"+ve[t]}var ye=/^\s*(\w|\$)+\s*$/;function Ae(t,e,r){!e&&r&&(e=r),e=Ft({},e,mt.templateSettings);var n=RegExp([(e.escape||he).source,(e.interpolate||he).source,(e.evaluate||he).source].join("|")+"|$","g"),o=0,i="__p+='";t.replace(n,function(e,r,n,a,s){return i+=t.slice(o,s).replace(ge,me),o=s+e.length,r?i+="'+\n((__t=("+r+"))==null?'':_.escape(__t))+\n'":n?i+="'+\n((__t=("+n+"))==null?'':__t)+\n'":a&&(i+="';\n"+a+"\n__p+='"),e}),i+="';\n";var a,s=e.variable;if(s){if(!ye.test(s))throw new Error("variable is not a bare identifier: "+s)}else i="with(obj||{}){\n"+i+"}\n",s="obj";i="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+i+"return __p;\n";try{a=new Function(s,"_",i)}catch(t){throw t.source=i,t}var c=function(t){return a.call(this,t,mt)};return c.source="function("+s+"){\n"+i+"}",c}function be(t,e,r){var n=(e=Gt(e)).length;if(!n)return $(r)?r.call(t):r;for(var o=0;o=a){if(!s.length)break;var c=s.pop();i=c.i,t=c.v,a=pt(t)}else{var u=t[i++];s.length>=e?n[o++]=u:Oe(u)&&(Z(u)||rt(u))?(s.push({i,v:t}),i=0,a=pt(t=u)):r||(n[o++]=u)}return n}const Ie=R(function(t,e){var r=(e=Te(e,!1,!1)).length;if(r<1)throw new Error("bindAll must be passed function names");for(;r--;){var n=e[r];t[n]=ke(t[n],t)}return t});function Re(t,e){var r=function(n){var o=r.cache,i=""+(e?e.apply(this,arguments):n);return tt(o,i)||(o[i]=t.apply(this,arguments)),o[i]};return r.cache={},r}const je=R(function(t,e,r){return setTimeout(function(){return t.apply(null,r)},e)}),Me=Ee(je,mt,1);function Ne(t,e,r){var n,o,i,a,s=0;r||(r={});var c=function(){s=!1===r.leading?0:ce(),n=null,a=t.apply(o,i),n||(o=i=null)},u=function(){var u=ce();s||!1!==r.leading||(s=u);var l=e-(u-s);return o=this,i=arguments,l<=0||l>e?(n&&(clearTimeout(n),n=null),s=u,a=t.apply(o,i),n||(o=i=null)):n||!1===r.trailing||(n=setTimeout(c,l)),a};return u.cancel=function(){clearTimeout(n),s=0,n=o=i=null},u}function Pe(t,e,r){var n,o,i,a,s,c=function(){var u=ce()-o;e>u?n=setTimeout(c,e-u):(n=null,r||(a=t.apply(s,i)),n||(i=s=null))},u=R(function(u){return s=this,i=u,o=ce(),n||(n=setTimeout(c,e),r&&(a=t.apply(s,i))),a});return u.cancel=function(){clearTimeout(n),n=i=s=null},u}function Le(t,e){return Ee(e,t)}function De(t){return function(){return!t.apply(this,arguments)}}function Be(){var t=arguments,e=t.length-1;return function(){for(var r=e,n=t[e].apply(this,arguments);r--;)n=t[r].call(this,n);return n}}function Ue(t,e){return function(){if(--t<1)return e.apply(this,arguments)}}function Fe(t,e){var r;return function(){return--t>0&&(r=e.apply(this,arguments)),t<=1&&(e=null),r}}const ze=Ee(Fe,2);function He(t,e,r){e=re(e,r);for(var n,o=ht(t),i=0,a=o.length;i0?0:o-1;i>=0&&i0?a=i>=0?i:Math.max(i+s,a):s=i>=0?Math.min(i+1,s):i+s+1;else if(r&&i&&s)return n[i=r(n,o)]===o?i:-1;if(o!=o)return(i=e(m.call(n,a,s),ot))>=0?i+a:-1;for(i=t>0?a:s-1;i>=0&&i=3;return function(e,r,n,o){var i=!Oe(e)&&ht(e),a=(i||e).length,s=t>0?0:a-1;for(o||(n=e[i?i[s]:s],s+=t);s>=0&&s=0}const cr=R(function(t,e,r){var n,o;return $(e)?o=e:(e=Gt(e),n=e.slice(0,-1),e=e[e.length-1]),Ze(t,function(t){var i=o;if(!i){if(n&&n.length&&(t=$t(t,n)),null==t)return;i=t[e]}return null==i?i:i.apply(t,r)})});function ur(t,e){return Ze(t,Qt(e))}function lr(t,e){return nr(t,Xt(e))}function fr(t,e,r){var n,o,i=-1/0,a=-1/0;if(null==e||"number"==typeof e&&"object"!=typeof t[0]&&null!=t)for(var s=0,c=(t=Oe(t)?t:Mt(t)).length;si&&(i=n);else e=re(e,r),Qe(t,function(t,r,n){((o=e(t,r,n))>a||o===-1/0&&i===-1/0)&&(i=t,a=o)});return i}function pr(t,e,r){var n,o,i=1/0,a=1/0;if(null==e||"number"==typeof e&&"object"!=typeof t[0]&&null!=t)for(var s=0,c=(t=Oe(t)?t:Mt(t)).length;sn||void 0===r)return 1;if(r1&&(n=Zt(n,e[1])),e=wt(t)):(n=_r,e=Te(e,!1,!1),t=Object(t));for(var o=0,i=e.length;o1&&(r=e[1])):(e=Ze(Te(e,!1,!1),String),n=function(t,r){return!sr(e,r)}),Sr(t,n,r)});function kr(t,e,r){return m.call(t,0,Math.max(0,t.length-(null==e||r?1:e)))}function Or(t,e,r){return null==t||t.length<1?null==e||r?void 0:[]:null==e||r?t[0]:kr(t,t.length-e)}function Tr(t,e,r){return m.call(t,null==e||r?1:e)}function Ir(t,e,r){return null==t||t.length<1?null==e||r?void 0:[]:null==e||r?t[t.length-1]:Tr(t,Math.max(0,t.length-e))}function Rr(t){return nr(t,Boolean)}function jr(t,e){return Te(t,e,!1)}const Mr=R(function(t,e){return e=Te(e,!0,!0),nr(t,function(t){return!sr(e,t)})}),Nr=R(function(t,e){return Mr(t,e)});function Pr(t,e,r,n){P(e)||(n=r,r=e,e=!1),null!=r&&(r=re(r,n));for(var o=[],i=[],a=0,s=pt(t);av.value.find(t=>t.teamId===g.value)?.displayName);async function y(t){p.value=""===t?(0,Yr.t)("core","Loading your contacts …"):(0,Yr.t)("core","Looking for {term} …",{term:t}),d.value=!1;try{const{data:e}=await u.Ay.post((0,l.Jv)("/contactsmenu/contacts"),{filter:t,teamId:"$_all_$"!==g.value?g.value:void 0});f.value=e.contacts,s.value=e.contactsAppEnabled,p.value=void 0}catch(e){jn.error("could not load contacts",{error:e,searchTerm:t}),d.value=!0}}(0,Xr.sV)(async()=>{const t=e.getItem("core:contacts:team");if(t&&(g.value=JSON.parse(t)),0===Nn.length)try{const{data:t}=await u.Ay.get((0,l.Jv)("/contactsmenu/teams"));Nn.push(...t)}catch(t){jn.error("could not load user teams",{error:t})}v.value=[...Nn]}),(0,Xr.wB)(g,()=>{e.setItem("core:contacts:team",JSON.stringify(g.value)),y(h.value)});const A=(0,tn.A)(function(){y(h.value)},500);function b(){(0,Xr.dY)(()=>{i.value?.focus(),i.value?.select()})}return{__sfc:!0,userTeams:Nn,storage:e,user:r,contactsAppURL:n,contactsAppMgmtURL:o,contactsMenuInput:i,actions:a,contactsAppEnabled:s,contacts:f,loadingText:p,hasError:d,searchTerm:h,teams:v,selectedTeam:g,selectedTeamName:m,onOpened:async function(){await y("")},getContacts:y,onInputDebounced:A,onReset:function(){h.value="",f.value=[],b()},focusInput:b,mdiAccountGroupOutline:Qr.dgQ,mdiContacts:Qr.aB4,mdiMagnify:Qr.U4M,t:Yr.t,NcActionButton:en.A,NcActions:rn.A,NcButton:nn.A,NcEmptyContent:on.A,NcHeaderMenu:an.A,NcIconSvgWrapper:sn.A,NcLoadingIcon:cn.A,NcTextField:un.A,ContactMenuEntry:In}}}),Ln=Pn;var Dn=n(32351),Bn={};Bn.styleTagTransform=En(),Bn.setAttributes=xn(),Bn.insert=bn().bind(null,"head"),Bn.domAPI=yn(),Bn.insertStyleElement=_n(),gn()(Dn.A,Bn),Dn.A&&Dn.A.locals&&Dn.A.locals;const Un=(0,Tn.A)(Ln,function(){var t=this,e=t._self._c,r=t._self._setupProxy;return e(r.NcHeaderMenu,{staticClass:"contactsmenu",attrs:{id:"contactsmenu","aria-label":r.t("core","Search contacts"),"exclude-click-outside-selectors":".v-popper__popper"},on:{open:r.onOpened},scopedSlots:t._u([{key:"trigger",fn:function(){return[e(r.NcIconSvgWrapper,{staticClass:"contactsmenu__trigger-icon",attrs:{path:r.mdiContacts}})]},proxy:!0}])},[t._v(" "),e("div",{staticClass:"contactsmenu__menu"},[e("div",{staticClass:"contactsmenu__menu__search-container"},[e("div",{staticClass:"contactsmenu__menu__input-wrapper"},[e(r.NcActions,{attrs:{"force-menu":"","aria-label":r.t("core","Filter by team"),variant:"tertiary"},scopedSlots:t._u([{key:"icon",fn:function(){return[e(r.NcIconSvgWrapper,{attrs:{path:r.mdiAccountGroupOutline}})]},proxy:!0},{key:"default",fn:function(){return[e(r.NcActionButton,{attrs:{modelValue:r.selectedTeam,value:"$_all_$",type:"radio"},on:{"update:modelValue":function(t){r.selectedTeam=t},"update:model-value":function(t){r.selectedTeam=t}}},[t._v("\n\t\t\t\t\t\t\t"+t._s(r.t("core","All teams"))+"\n\t\t\t\t\t\t")]),t._v(" "),t._l(r.teams,function(n){return e(r.NcActionButton,{key:n.teamId,attrs:{modelValue:r.selectedTeam,value:n.teamId,type:"radio"},on:{"update:modelValue":function(t){r.selectedTeam=t},"update:model-value":function(t){r.selectedTeam=t}}},[t._v("\n\t\t\t\t\t\t\t"+t._s(n.displayName)+"\n\t\t\t\t\t\t")])})]},proxy:!0}])}),t._v(" "),e(r.NcTextField,{ref:"contactsMenuInput",staticClass:"contactsmenu__menu__search",attrs:{id:"contactsmenu__menu__search","trailing-button-icon":"close",label:r.selectedTeamName?r.t("core","Search contacts in team {team}",{team:r.selectedTeamName}):r.t("core","Search contacts …"),"trailing-button-label":r.t("core","Reset search"),"show-trailing-button":""!==r.searchTerm,type:"search"},on:{input:r.onInputDebounced,"trailing-button-click":r.onReset},model:{value:r.searchTerm,callback:function(t){r.searchTerm=t},expression:"searchTerm"}})],1),t._v(" "),t._l(r.actions,function(n){return e(r.NcButton,{key:n.id,staticClass:"contactsmenu__menu__action",attrs:{"aria-label":n.label,title:n.label,variant:"tertiary-no-background"},on:{click:n.onClick},scopedSlots:t._u([{key:"icon",fn:function(){return[e(r.NcIconSvgWrapper,{attrs:{svg:n.icon}})]},proxy:!0}],null,!0)})})],2),t._v(" "),r.hasError?e(r.NcEmptyContent,{attrs:{name:r.t("core","Could not load your contacts")},scopedSlots:t._u([{key:"icon",fn:function(){return[e(r.NcIconSvgWrapper,{attrs:{path:r.mdiMagnify}})]},proxy:!0}],null,!1,1853740774)}):r.loadingText?e(r.NcEmptyContent,{attrs:{name:r.loadingText},scopedSlots:t._u([{key:"icon",fn:function(){return[e(r.NcLoadingIcon)]},proxy:!0}])}):0===r.contacts.length?e(r.NcEmptyContent,{attrs:{name:r.t("core","No contacts found")},scopedSlots:t._u([{key:"icon",fn:function(){return[e(r.NcIconSvgWrapper,{attrs:{path:r.mdiMagnify}})]},proxy:!0}])}):e("div",{staticClass:"contactsmenu__menu__content"},[e("div",{attrs:{id:"contactsmenu-contacts"}},[e("ul",{attrs:{"aria-label":r.t("core","Contacts list")}},t._l(r.contacts,function(t){return e(r.ContactMenuEntry,{key:t.id,attrs:{contact:t}})}),1)]),t._v(" "),r.contactsAppEnabled?e("div",{staticClass:"contactsmenu__menu__content__footer"},[e(r.NcButton,{attrs:{variant:"tertiary",href:r.contactsAppURL}},[t._v("\n\t\t\t\t\t"+t._s(r.t("core","Show all contacts"))+"\n\t\t\t\t")])],1):r.user.isAdmin?e("div",{staticClass:"contactsmenu__menu__content__footer"},[e(r.NcButton,{attrs:{variant:"tertiary",href:r.contactsAppMgmtURL}},[t._v("\n\t\t\t\t\t"+t._s(r.t("core","Install the Contacts app"))+"\n\t\t\t\t")])],1):t._e()])],1)])},[],!1,null,"253ecd69",null).exports;class Fn{constructor(){(function(t,e,r){(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r})(this,"_actions",void 0),this._actions=[]}get actions(){return this._actions}addAction(t){this._actions.push(t)}}var zn=n(61338),Hn=n(81222),Vn=n(54562);const qn={name:"CogIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Wn=(0,Tn.A)(qn,function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon cog-icon",attrs:{"aria-hidden":t.title?null:"true","aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M12,15.5A3.5,3.5 0 0,1 8.5,12A3.5,3.5 0 0,1 12,8.5A3.5,3.5 0 0,1 15.5,12A3.5,3.5 0 0,1 12,15.5M19.43,12.97C19.47,12.65 19.5,12.33 19.5,12C19.5,11.67 19.47,11.34 19.43,11L21.54,9.37C21.73,9.22 21.78,8.95 21.66,8.73L19.66,5.27C19.54,5.05 19.27,4.96 19.05,5.05L16.56,6.05C16.04,5.66 15.5,5.32 14.87,5.07L14.5,2.42C14.46,2.18 14.25,2 14,2H10C9.75,2 9.54,2.18 9.5,2.42L9.13,5.07C8.5,5.32 7.96,5.66 7.44,6.05L4.95,5.05C4.73,4.96 4.46,5.05 4.34,5.27L2.34,8.73C2.21,8.95 2.27,9.22 2.46,9.37L4.57,11C4.53,11.34 4.5,11.67 4.5,12C4.5,12.33 4.53,12.65 4.57,12.97L2.46,14.63C2.27,14.78 2.21,15.05 2.34,15.27L4.34,18.73C4.46,18.95 4.73,19.03 4.95,18.95L7.44,17.94C7.96,18.34 8.5,18.68 9.13,18.93L9.5,21.58C9.54,21.82 9.75,22 10,22H14C14.25,22 14.46,21.82 14.5,21.58L14.87,18.93C15.5,18.67 16.04,18.34 16.56,17.94L19.05,18.95C19.27,19.03 19.54,18.95 19.66,18.73L21.66,15.27C21.78,15.05 21.73,14.78 21.54,14.63L19.43,12.97Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])},[],!1,null,null,null).exports,Gn={name:"DotsGridIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},$n=(0,Tn.A)(Gn,function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon dots-grid-icon",attrs:{"aria-hidden":t.title?null:"true","aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M12 16C13.1 16 14 16.9 14 18S13.1 20 12 20 10 19.1 10 18 10.9 16 12 16M12 10C13.1 10 14 10.9 14 12S13.1 14 12 14 10 13.1 10 12 10.9 10 12 10M12 4C13.1 4 14 4.9 14 6S13.1 8 12 8 10 7.1 10 6 10.9 4 12 4M6 16C7.1 16 8 16.9 8 18S7.1 20 6 20 4 19.1 4 18 4.9 16 6 16M6 10C7.1 10 8 10.9 8 12S7.1 14 6 14 4 13.1 4 12 4.9 10 6 10M6 4C7.1 4 8 4.9 8 6S7.1 8 6 8 4 7.1 4 6 4.9 4 6 4M18 16C19.1 16 20 16.9 20 18S19.1 20 18 20 16 19.1 16 18 16.9 16 18 16M18 10C19.1 10 20 10.9 20 12S19.1 14 18 14 16 13.1 16 12 16.9 10 18 10M18 4C19.1 4 20 4.9 20 6S19.1 8 18 8 16 7.1 16 6 16.9 4 18 4Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])},[],!1,null,null,null).exports,Yn=(0,Xr.pM)({__name:"AppItem",props:{app:null,newTab:{type:Boolean},outlined:{type:Boolean},tabindex:{default:-1}},setup(t){const e=t,r=(0,Xr.EW)(()=>{if(e.app.unread)return(0,Yr.n)("core","{count} notification","{count} notifications",e.app.unread,{count:e.app.unread})});return{__sfc:!0,props:e,unreadLabel:r}}});var Kn=n(17973),Jn={};Jn.styleTagTransform=En(),Jn.setAttributes=xn(),Jn.insert=bn().bind(null,"head"),Jn.domAPI=yn(),Jn.insertStyleElement=_n(),gn()(Kn.A,Jn),Kn.A&&Kn.A.locals&&Kn.A.locals;const Xn=(0,Tn.A)(Yn,function(){var t=this,e=t._self._c,r=t._self._setupProxy;return e("a",{staticClass:"app-item",class:{"app-item--active":t.app.active,"app-item--outlined":t.outlined},attrs:{href:t.app.href,target:t.newTab?"_blank":void 0,rel:t.newTab?"noopener noreferrer":void 0,"aria-current":t.app.active?"page":void 0,tabindex:t.tabindex,title:t.app.name,role:"menuitem"}},[e("span",{staticClass:"app-item__circle"},[e("img",{staticClass:"app-item__icon",attrs:{src:t.app.icon,alt:"","aria-hidden":"true"}}),t._v(" "),t.app.unread?e("span",{staticClass:"app-item__unread",attrs:{"aria-hidden":"true"}}):t._e()]),t._v(" "),e("span",{staticClass:"app-item__label"},[t._v("\n\t\t"+t._s(t.app.name)+"\n\t\t"),t.app.unread?e("span",{staticClass:"hidden-visually"},[t._v(", "+t._s(r.unreadLabel))]):t._e()])])},[],!1,null,"278c0168",null).exports,Qn=new Set(["logout"]),Zn=(0,Xr.pM)({name:"AppMenu",components:{AppItem:Xn,IconCog:Wn,IconDotsGrid:$n,NcButton:nn.A,NcPopover:Vn.A},setup(){const t=(0,Xr.KR)(!1);return{t:Yr.t,n:Yr.n,opened:t}},data:()=>({appList:(0,Hn.C)("core","apps",[]),settingsList:(0,Hn.C)("core","settingsNavEntries",{}),isAdmin:(0,c.HW)()?.isAdmin??!1,focusedIndex:0,openedFrom:null,moreAppsEntry:{id:"more-apps",active:!1,order:Number.MAX_SAFE_INTEGER,href:(0,l.Jv)("/settings/apps"),icon:(0,l.d0)("core","actions/add.svg"),type:"link",name:(0,Yr.t)("core","More apps"),unread:0},appStoreEntry:{id:"app-store",active:!1,order:Number.MAX_SAFE_INTEGER,href:"https://apps.nextcloud.com/",icon:(0,l.d0)("core","actions/add.svg"),type:"link",name:(0,Yr.t)("core","App store"),unread:0},popoverSkidding:(0,Yr.V8)()?82:-82}),computed:{currentApp(){return this.appList.find(t=>t.active)??Object.values(this.settingsList).find(t=>t.active&&!Qn.has(t.id))},displayName(){return this.currentApp?"settings"===this.currentApp.type?(0,Yr.t)("core","Settings"):this.currentApp.name:""},currentAppLabel(){return this.currentApp?(0,Yr.t)("core","Open apps menu, currently in {app}",{app:this.displayName}):(0,Yr.t)("core","Open apps menu")},gridItems(){const t=this.isAdmin?this.moreAppsEntry:this.appStoreEntry;return[...this.appList,t]}},watch:{opened(t){t&&(this.focusedIndex=this.activeGridIndex(),this.tryRecomputeGridMaxHeight(5))}},mounted(){(0,zn.B1)("nextcloud:app-menu.refresh",this.setApps),this.focusedIndex=this.activeGridIndex(),this.$refs.popover.$on("after-hide",this.onPopoverAfterHide)},beforeUnmount(){(0,zn.al)("nextcloud:app-menu.refresh",this.setApps),this.$refs.popover?.$off("after-hide",this.onPopoverAfterHide)},methods:{returnFocusTarget(){return"currentApp"===this.openedFrom?this.$el.querySelector(".app-menu__current-app"):this.$el.querySelector(".app-menu__waffle")},onPopoverAfterHide(){this.openedFrom=null},onTriggerClick(t){this.openedFrom=t,this.opened=!this.opened},setNavigationCounter(t,e){const r=this.appList.find(({app:e})=>e===t);r?r.unread=e:jn.warn(`Could not find app "${t}" for setting navigation count`)},setApps({apps:t}){this.appList=t,this.focusedIndex>=this.gridItems.length&&(this.focusedIndex=this.activeGridIndex())},tryRecomputeGridMaxHeight(t){!this.opened||t<=0||(this.$refs.grid?this.recomputeGridMaxHeight():requestAnimationFrame(()=>this.tryRecomputeGridMaxHeight(t-1)))},recomputeGridMaxHeight(){const t=this.$refs.grid;if(!t)return;const e=t.children;if(e.length<=24)return void(t.style.maxHeight="");const r=e[24],n=e[0];if(!r||!n)return;const o=r.getBoundingClientRect().top-n.getBoundingClientRect().top,i=parseFloat(getComputedStyle(t).getPropertyValue("--default-grid-baseline"))||4;t.style.maxHeight=`${o+6*i}px`},activeGridIndex(){const t=this.gridItems.findIndex(t=>t.active);return-1===t?0:t},async onGridKeydown(t){if(t.ctrlKey||t.metaKey||t.altKey||t.shiftKey)return;if(0===this.gridItems.length)return;const e=this.gridItems.length,r=this.focusedIndex;let n=r;switch(t.key){case"ArrowRight":r%4!=3&&r+1=0&&(n=r-4);break;case"Home":n=0;break;case"End":n=e-1;break;case"Enter":case" ":{const e=this.$refs.items;return e?.[this.focusedIndex]?.$el?.click(),this.opened=!1,t.preventDefault(),void t.stopPropagation()}default:return}t.preventDefault(),t.stopPropagation(),n!==r&&(this.focusedIndex=n),await this.$nextTick();const o=this.$refs.items;o?.[this.focusedIndex]?.$el?.focus()}}});var to=n(27359),eo={};eo.styleTagTransform=En(),eo.setAttributes=xn(),eo.insert=bn().bind(null,"head"),eo.domAPI=yn(),eo.insertStyleElement=_n(),gn()(to.A,eo),to.A&&to.A.locals&&to.A.locals;var ro=n(23639),no={};no.styleTagTransform=En(),no.setAttributes=xn(),no.insert=bn().bind(null,"head"),no.domAPI=yn(),no.insertStyleElement=_n(),gn()(ro.A,no),ro.A&&ro.A.locals&&ro.A.locals;const oo=(0,Tn.A)(Zn,function(){var t=this,e=t._self._c;return t._self._setupProxy,e("nav",{staticClass:"app-menu",attrs:{"aria-label":t.t("core","Applications")}},[e("NcPopover",{ref:"popover",attrs:{shown:t.opened,triggers:[],placement:"bottom-start",skidding:t.popoverSkidding,"set-return-focus":t.returnFocusTarget,"popover-base-class":"app-menu__popover-base","popup-role":"menu"},on:{"update:shown":function(e){t.opened=e}},scopedSlots:t._u([{key:"trigger",fn:function(){return[e("NcButton",{staticClass:"app-menu__waffle",attrs:{variant:"tertiary-no-background","aria-label":t.t("core","Open apps menu"),"aria-haspopup":"menu","aria-expanded":t.opened?"true":"false"},on:{click:function(e){return t.onTriggerClick("waffle")}},scopedSlots:t._u([{key:"icon",fn:function(){return[e("IconDotsGrid",{attrs:{size:20}})]},proxy:!0}])})]},proxy:!0}])},[t._v(" "),e("div",{staticClass:"app-menu__popover",attrs:{role:"menu","aria-label":t.t("core","Apps")}},[e("div",{ref:"grid",staticClass:"app-menu__grid",on:{keydown:t.onGridKeydown}},t._l(t.gridItems,function(r,n){return e("AppItem",{key:r.id,ref:"items",refInFor:!0,attrs:{app:r,outlined:"more-apps"===r.id||"app-store"===r.id,"new-tab":"app-store"===r.id,tabindex:n===t.focusedIndex?0:-1}})}),1)])]),t._v(" "),t.currentApp?e("NcButton",{staticClass:"app-menu__current-app",attrs:{variant:"tertiary-no-background","aria-label":t.currentAppLabel,"aria-haspopup":"menu","aria-expanded":t.opened?"true":"false"},on:{click:function(e){return t.onTriggerClick("currentApp")}},scopedSlots:t._u([{key:"icon",fn:function(){return["settings"===t.currentApp.type?e("IconCog",{staticClass:"app-menu__current-app-cog",attrs:{size:20}}):e("img",{staticClass:"app-menu__current-app-icon",attrs:{src:t.currentApp.icon,alt:"","aria-hidden":"true"}})]},proxy:!0}],null,!1,3821102756)},[t._v(" "),e("span",{staticClass:"app-menu__current-app-name"},[t._v("\n\t\t\t"+t._s(t.displayName)+"\n\t\t")])]):t._e()],1)},[],!1,null,"36dadc6d",null).exports;var io=n(87485),ao=n(1522);const so=(0,Hn.C)("core","versionHash",""),co=(0,Xr.pM)({name:"AccountMenuEntry",components:{NcListItem:ao.A,NcLoadingIcon:cn.A},props:{id:{type:String,required:!0},name:{type:String,required:!0},href:{type:String,required:!0},active:{type:Boolean,default:!1},icon:{type:String,default:""}},data:()=>({loading:!1}),computed:{iconSource(){return`${this.icon}?v=${so}`}},methods:{onClick(t){this.$emit("click",t),t.defaultPrevented||(this.loading=!0)}}});var uo=n(51286),lo={};lo.styleTagTransform=En(),lo.setAttributes=xn(),lo.insert=bn().bind(null,"head"),lo.domAPI=yn(),lo.insertStyleElement=_n(),gn()(uo.A,lo),uo.A&&uo.A.locals&&uo.A.locals;const fo=(0,Tn.A)(co,function(){var t=this,e=t._self._c;return t._self._setupProxy,e("NcListItem",{staticClass:"account-menu-entry",attrs:{id:t.href?void 0:t.id,"anchor-id":t.id,active:t.active,compact:"",href:t.href,name:t.name,target:"_self"},on:{click:t.onClick},scopedSlots:t._u([{key:"icon",fn:function(){return[t.loading?e("NcLoadingIcon",{staticClass:"account-menu-entry__loading",attrs:{size:20}}):t.$scopedSlots.icon?t._t("icon"):e("img",{staticClass:"account-menu-entry__icon",class:{"account-menu-entry__icon--active":t.active},attrs:{src:t.iconSource,alt:""}})]},proxy:!0}])})},[],!1,null,"bdb908d2",null).exports;var po=n(15620),ho=n(98469);const vo={name:"QrcodeScanIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},go=(0,Tn.A)(vo,function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon qrcode-scan-icon",attrs:{"aria-hidden":t.title?null:"true","aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M4,4H10V10H4V4M20,4V10H14V4H20M14,15H16V13H14V11H16V13H18V11H20V13H18V15H20V18H18V20H16V18H13V20H11V16H14V15M16,15V18H18V15H16M4,20V14H10V20H4M6,6V8H8V6H6M16,6V8H18V6H16M6,16V18H8V16H6M4,11H6V13H4V11M9,11H13V15H11V13H9V11M11,6H13V10H11V6M2,2V6H0V2A2,2 0 0,1 2,0H6V2H2M22,0A2,2 0 0,1 24,2V6H22V2H18V0H22M2,18V22H6V24H2A2,2 0 0,1 0,22V18H2M22,22V18H24V22A2,2 0 0,1 22,24H18V22H22Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])},[],!1,null,null,null).exports;var mo=n(17816),yo=n.n(mo),Ao=n(55581),bo=n(94219);const wo=(0,Xr.pM)({__name:"AccountQRLoginDialog",props:{data:null},emits:["close"],setup(t,{emit:e}){const r=t,n=window.OC.theme.productName,o=[{label:(0,Yr.t)("spreed","Done"),variant:"primary",callback:()=>{}}],i=3===(r.data?.deviceToken?.type??1),a=(0,Xr.EW)(()=>{const t=r.data?.loginName??"",e=r.data?.token??"";return`nc://${i?"onetime-login":"login"}/user:${t}&password:${e}&server:${(0,l.$_)()}`}),s=(r.data?.deviceToken?.lastActivity?1e3*r.data.deviceToken.lastActivity:Date.now())+12e4,c=setTimeout(()=>{f("expired")},s-Date.now()),u=(0,Ao.SX)(s);function f(t){clearTimeout(c),e("close",t)}return{__sfc:!0,props:r,emit:e,productName:n,buttons:o,isOneTimeToken:i,qrUrl:a,expirationTimestamp:s,expireTimeout:c,timeCountdown:u,onClosing:f,QR:yo(),t:Yr.t,NcDialog:bo.A}}}),xo=wo;var Co=n(35644),_o={};_o.styleTagTransform=En(),_o.setAttributes=xn(),_o.insert=bn().bind(null,"head"),_o.domAPI=yn(),_o.insertStyleElement=_n(),gn()(Co.A,_o),Co.A&&Co.A.locals&&Co.A.locals;const So=(0,Tn.A)(xo,function(){var t=this,e=t._self._c,r=t._self._setupProxy;return e(r.NcDialog,{attrs:{name:r.t("core","Scan QR code to log in"),buttons:r.buttons},on:{closing:r.onClosing}},[e("div",{staticClass:"qr-login__content"},[e("p",{staticClass:"qr-login__description"},[t._v("\n\t\t\t"+t._s(r.t("core","Use {productName} mobile client you want to connect to scan the code",{productName:r.productName}))+"\n\t\t")]),t._v(" "),e(r.QR,{attrs:{value:r.qrUrl}}),t._v(" "),r.isOneTimeToken?[t._v("\n\t\t\t"+t._s(r.t("core","Code will expire {timeCountdown} or after use",{timeCountdown:r.timeCountdown}))+"\n\t\t")]:t._e()],2)])},[],!1,null,null,null).exports;(0,po.IF)(u.Ay);const{profileEnabled:Eo}=(0,Hn.C)("user_status","profileEnabled",{profileEnabled:!1}),ko=(0,io.F)().core?.["can-create-app-token"]??!1,Oo=(0,Xr.pM)({name:"AccountMenuProfileEntry",components:{IconQrcodeScan:go,NcButton:nn.A,NcListItem:ao.A,NcLoadingIcon:cn.A},props:{id:{type:String,required:!0},name:{type:String,required:!0},href:{type:String,required:!0},active:{type:Boolean,required:!0}},setup:()=>({canCreateAppToken:ko,displayName:(0,c.HW)().displayName,profileEnabled:Eo,t:Yr.t}),data:()=>({loading:!1}),mounted(){(0,zn.B1)("settings:profile-enabled:updated",this.handleProfileEnabledUpdate),(0,zn.B1)("settings:display-name:updated",this.handleDisplayNameUpdate)},beforeDestroy(){(0,zn.al)("settings:profile-enabled:updated",this.handleProfileEnabledUpdate),(0,zn.al)("settings:display-name:updated",this.handleDisplayNameUpdate)},methods:{handleClick(){this.profileEnabled&&(this.loading=!0)},async handleQrCodeClick(){const{data:t}=await u.Ay.post((0,l.Jv)("/settings/personal/authtokens"),{qrcodeLogin:!0},{confirmPassword:po.mH.Strict});await(0,ho.S)(So,{data:t})},handleProfileEnabledUpdate(t){this.profileEnabled=t},handleDisplayNameUpdate(t){this.displayName=t}}}),To=Oo,Io=(0,Tn.A)(To,function(){var t=this,e=t._self._c;return t._self._setupProxy,e("NcListItem",{attrs:{id:t.profileEnabled?void 0:t.id,"anchor-id":t.id,active:t.active,compact:"",href:t.profileEnabled?t.href:void 0,name:t.displayName,target:"_self"},scopedSlots:t._u([t.profileEnabled?{key:"subname",fn:function(){return[t._v("\n\t\t"+t._s(t.name)+"\n\t")]},proxy:!0}:null,t.canCreateAppToken?{key:"extra-actions",fn:function(){return[e("NcButton",{attrs:{"aria-label":t.t("core","Show QR code for mobile app login"),variant:"secondary"},on:{click:t.handleQrCodeClick},scopedSlots:t._u([{key:"icon",fn:function(){return[e("IconQrcodeScan",{attrs:{size:20}})]},proxy:!0}],null,!1,3784924786)})]},proxy:!0}:null,t.loading?{key:"indicator",fn:function(){return[e("NcLoadingIcon")]},proxy:!0}:null],null,!0)})},[],!1,null,null,null).exports,Ro=[{type:"online",label:(0,Yr.t)("user_status","Online")},{type:"away",label:(0,Yr.t)("user_status","Away")},{type:"busy",label:(0,Yr.t)("user_status","Busy")},{type:"dnd",label:(0,Yr.t)("user_status","Do not disturb"),subline:(0,Yr.t)("user_status","Mute all notifications")},{type:"invisible",label:(0,Yr.t)("user_status","Invisible"),subline:(0,Yr.t)("user_status","Appear offline")}],jo=(0,Xr.pM)({name:"AccountMenu",components:{AccountMenuEntry:fo,AccountMenuProfileEntry:Io,NcAvatar:dn.A,NcHeaderMenu:an.A},setup(){const t=(0,Hn.C)("core","settingsNavEntries",{}),{profile:e,...r}=t;return{currentDisplayName:(0,c.HW)()?.displayName??(0,c.HW)().uid,currentUserId:(0,c.HW)().uid,profileEntry:e,otherEntries:r,t:Yr.t}},data:()=>({showUserStatus:!1,userStatus:{status:null,icon:null,message:null}}),computed:{translatedUserStatus(){return{...this.userStatus,status:this.translateStatus(this.userStatus.status)}},avatarDescription(){return[(0,Yr.t)("core","Avatar of {displayName}",{displayName:this.currentDisplayName}),...Object.values(this.translatedUserStatus).filter(Boolean)].join(" — ")}},async created(){if(!(0,io.F)()?.user_status?.enabled)return;const t=(0,l.KT)("/apps/user_status/api/v1/user_status");try{const e=await u.Ay.get(t),{status:r,icon:n,message:o}=e.data.ocs.data;this.userStatus={status:r,icon:n,message:o}}catch(t){jn.error("Failed to load user status",{error:t})}this.showUserStatus=!0},mounted(){(0,zn.B1)("user_status:status.updated",this.handleUserStatusUpdated),(0,zn.Ic)("core:user-menu:mounted")},methods:{handleUserStatusUpdated(t){this.currentUserId===t.userId&&(this.userStatus={status:t.status,icon:t.icon,message:t.message})},translateStatus(t){const e=Object.fromEntries(Ro.map(({type:t,label:e})=>[t,e]));return e[t]?e[t]:t}}});var Mo=n(33096),No={};No.styleTagTransform=En(),No.setAttributes=xn(),No.insert=bn().bind(null,"head"),No.domAPI=yn(),No.insertStyleElement=_n(),gn()(Mo.A,No),Mo.A&&Mo.A.locals&&Mo.A.locals;const Po=(0,Tn.A)(jo,function(){var t=this,e=t._self._c;return t._self._setupProxy,e("NcHeaderMenu",{staticClass:"account-menu",attrs:{id:"user-menu","is-nav":"","aria-label":t.t("core","Settings menu"),description:t.avatarDescription},scopedSlots:t._u([{key:"trigger",fn:function(){return[e("NcAvatar",{key:String(t.showUserStatus),staticClass:"account-menu__avatar",attrs:{"disable-menu":"","disable-tooltip":"","hide-user-status":!t.showUserStatus,user:t.currentUserId,"preloaded-user-status":t.userStatus}})]},proxy:!0}])},[t._v(" "),e("ul",{staticClass:"account-menu__list"},[e("AccountMenuProfileEntry",{attrs:{id:t.profileEntry.id,name:t.profileEntry.name,href:t.profileEntry.href,active:t.profileEntry.active}}),t._v(" "),t._l(t.otherEntries,function(t){return e("AccountMenuEntry",{key:t.id,attrs:{id:t.id,name:t.name,href:t.href,active:t.active,icon:t.icon}})})],2)])},[],!1,null,"6c007912",null).exports;function Lo(){return document.head.dataset.requesttoken}const{auto_logout:Do,session_keepalive:Bo,session_lifetime:Uo}=(0,Hn.C)("core","config",{});async function Fo(){try{await async function(){const t=(0,l.Jv)("/csrftoken"),e=await fetch(t);if(!e.ok)throw new Error("Could not fetch CSRF token from API",{cause:e});const{token:r}=await e.json();return function(t){if(!t||"string"!=typeof t)throw new Error("Invalid CSRF token given",{cause:{token:t}});document.head.dataset.requesttoken=t,(0,zn.Ic)("csrf-token-update",{token:t})}(r),r}()}catch(t){jn.error("session heartbeat failed",{error:t})}}function zo(){const t=window.setInterval(Fo,1e3*function(){const t=Uo?Math.floor(Uo/2):900;return Math.min(86400,Math.max(60,t))}());return jn.info("session heartbeat polling started"),t}function Ho(t){const e=document.createElement("textarea"),r=document.createTextNode(t);e.appendChild(r),document.body.appendChild(e),e.focus({preventScroll:!0}),e.select();try{document.execCommand("copy")}catch(e){window.prompt((0,Yr.t)("core","Clipboard not available, please copy manually"),t),jn.error("files Unable to copy to clipboard",{error:e})}document.body.removeChild(e)}function Vo(t){const e=window.location.protocol+"//"+window.location.host+(0,l.aU)();return t.startsWith(e)||function(t){return!t.startsWith("https://")&&!t.startsWith("http://")}(t)&&t.startsWith((0,l.aU)())}async function qo(){if(null!==(0,c.HW)()&&!0!==qo.running){qo.running=!0;try{const{status:t}=await window.fetch((0,l.Jv)("/apps/files"));401===t&&(jn.warn("User session was terminated, forwarding to login page."),await async function(){try{window.localStorage.clear(),window.sessionStorage.clear();const t=await window.indexedDB.databases();for(const e of t)await window.indexedDB.deleteDatabase(e.name);jn.debug("Browser storages cleared")}catch(t){jn.error("Could not clear browser storages",{error:t})}}(),window.location=(0,l.Jv)("/login?redirect_url={url}",{url:window.location.pathname+window.location.search+window.location.hash}))}catch(t){jn.warn("Could not check login-state",{error:t})}finally{delete qo.running}}}const Wo={zh:"zh-cn",zh_Hans:"zh-cn",zh_Hans_CN:"zh-cn",zh_Hans_HK:"zh-cn",zh_Hans_MO:"zh-cn",zh_Hans_SG:"zh-cn",zh_Hant:"zh-hk",zh_Hant_HK:"zh-hk",zh_Hant_MO:"zh-mo",zh_Hant_TW:"zh-tw"};let Go=(0,Yr.JK)();function $o(){var t;XMLHttpRequest.prototype.open=(t=XMLHttpRequest.prototype.open,function(e,r){t.apply(this,arguments),Vo(r)&&(this.getResponseHeader("X-Requested-With")||this.setRequestHeader("X-Requested-With","XMLHttpRequest"),this.addEventListener("loadend",function(){401===this.status&&qo()}))}),window.fetch=function(t){return async(e,r)=>{if(!Vo(e.url??e.toString()))return await t(e,r);r||(r={}),r.headers||(r.headers=new Headers),r.headers instanceof Headers&&!r.headers.has("X-Requested-With")?r.headers.append("X-Requested-With","XMLHttpRequest"):r.headers instanceof Object&&!r.headers["X-Requested-With"]&&(r.headers["X-Requested-With"]="XMLHttpRequest");const n=await t(e,r);return 401===n.status&&qo(),n}}(window.fetch),window.navigator?.clipboard?.writeText||(jn.info("Clipboard API not available, using fallback"),Object.defineProperty(window.navigator,"clipboard",{value:{writeText:Ho},writable:!1})),function(){if(function(){if(!Do||!(0,c.HW)())return;let t=Date.now();window.addEventListener("mousemove",()=>{t=Date.now(),localStorage.setItem("lastActive",JSON.stringify(t))}),window.addEventListener("touchstart",()=>{t=Date.now(),localStorage.setItem("lastActive",JSON.stringify(t))}),window.addEventListener("storage",e=>{"lastActive"===e.key&&null!==e.newValue&&(t=JSON.parse(e.newValue))});let e=0;e=window.setInterval(()=>{const r=Date.now()-1e3*(Uo??86400);if(t{jn.info("Browser is online again, resuming heartbeat"),t=zo();try{await Fo(),jn.info("Session token successfully updated after resuming network"),(0,zn.Ic)("networkOnline",{success:!0})}catch(t){jn.error("could not update session token after resuming network",{error:t}),(0,zn.Ic)("networkOnline",{success:!1})}}),window.addEventListener("offline",()=>{jn.info("Browser is offline, stopping heartbeat"),(0,zn.Ic)("networkOffline",{}),clearInterval(t),jn.info("Session heartbeat polling stopped")})}(),function(){Xr.Ay.mixin({methods:{t:Yr.Tl,n:Yr.zw}});const t=document.getElementById("header-start__appmenu");if(!t)return;const e=new(Xr.Ay.extend(oo))({}).$mount(t);Object.assign(OC,{setNavigationCounter(t,r){e.setNavigationCounter(t,r)}})}(),function(){const t=document.getElementById("user-menu");t&&new Xr.Ay({name:"AccountMenuRoot",el:t,render:t=>t(Po)})}(),function(){const t=document.getElementById("contactsmenu");t&&(window.OC.ContactsMenu=new Fn,new Xr.Ay({name:"ContactsMenuRoot",el:t,render:t=>t(Un)}))}()}Object.hasOwn(Wo,Go)&&(Go=Wo[Go]),Jr().locale(Go);var Yo=n(71225);const Ko=!!window._oc_isadmin,Jo=window.oc_appconfig||{},Xo=void 0!==window._oc_appswebroots&&window._oc_appswebroots,Qo=window._oc_config||{},Zo=document.getElementsByTagName("head")[0].getAttribute("data-user"),ti=document.getElementsByTagName("head")[0].getAttribute("data-user-displayname"),ei=void 0!==Zo&&Zo,ri=window._oc_debug;var ni=n(21363),oi=n(85168),ii=n(43627);const ai={YES_NO_BUTTONS:70,OK_BUTTONS:71,FILEPICKER_TYPE_CHOOSE:1,FILEPICKER_TYPE_MOVE:2,FILEPICKER_TYPE_COPY:3,FILEPICKER_TYPE_COPY_MOVE:4,FILEPICKER_TYPE_CUSTOM:5,alert:function(t,e,r,n){this.message(t,e,"alert",ai.OK_BUTTON,r,n)},info:function(t,e,r,n){this.message(t,e,"info",ai.OK_BUTTON,r,n)},confirm:function(t,e,r,n){return this.message(t,e,"notice",ai.YES_NO_BUTTONS,r,n)},confirmDestructive:function(t,e,r=ai.OK_BUTTONS,n=()=>{}){return(new oi.ik).setName(e).setText(t).setButtons(r===ai.OK_BUTTONS?[{label:(0,Yr.t)("core","Yes"),variant:"error",callback:()=>{n.clicked=!0,n(!0)}}]:ai._getLegacyButtons(r,n)).build().show().then(()=>{n.clicked||n(!1)})},confirmHtml:function(t,e,r){return(new oi.ik).setName(e).setText("").setButtons([{label:(0,Yr.t)("core","No"),callback:()=>{}},{label:(0,Yr.t)("core","Yes"),variant:"primary",callback:()=>{r.clicked=!0,r(!0)}}]).build().setHTML(t).show().then(()=>{r.clicked||r(!1)})},prompt:function(t,e,r,o,i,a){return new Promise(o=>{(0,ho.S)((0,Xr.$V)(()=>Promise.all([n.e(4208),n.e(9553)]).then(n.bind(n,99553))),{text:t,name:e,callback:r,inputName:i,isPassword:!!a},(...t)=>{r(...t),o()})})},filepicker(t,e,r=!1,n=void 0,o=void 0,i=oi.bh.Choose,a=void 0,s=void 0){const c=(t,e)=>{const n=t=>{const e=t?.root||"";let r=t?.path||"";return r.startsWith(e)&&(r=r.slice(e.length)||"/"),r};return r?r=>t(r.map(n),e):r=>t(n(r[0]),e)},u=(0,oi.a1)(t);i===this.FILEPICKER_TYPE_CUSTOM?(s.buttons||[]).forEach(t=>{u.addButton({callback:c(e,t.type),label:t.text,variant:t.defaultButton?"primary":"secondary"})}):u.setButtonFactory((t,r)=>{const n=[],[o]=t,a=o?.displayname||o?.basename||(0,ii.basename)(r);return i===oi.bh.Choose&&n.push({callback:c(e,oi.bh.Choose),label:o&&!this.multiSelect?(0,Yr.t)("core","Choose {file}",{file:a}):(0,Yr.t)("core","Choose"),variant:"primary"}),i!==oi.bh.CopyMove&&i!==oi.bh.Copy||n.push({callback:c(e,oi.bh.Copy),label:a?(0,Yr.t)("core","Copy to {target}",{target:a}):(0,Yr.t)("core","Copy"),variant:"primary",icon:ni}),i!==oi.bh.Move&&i!==oi.bh.CopyMove||n.push({callback:c(e,oi.bh.Move),label:a?(0,Yr.t)("core","Move to {target}",{target:a}):(0,Yr.t)("core","Move"),variant:i===oi.bh.Move?"primary":"secondary",icon:''}),n}),n&&u.setMimeTypeFilter("string"==typeof n?[n]:n||[]),"function"==typeof s?.filter&&u.setFilter(t=>s.filter((t=>({id:t.fileid||null,path:t.path,mimetype:t.mime||null,mtime:t.mtime?.getTime()||null,permissions:t.permissions,name:t.attributes?.displayName||t.basename,etag:t.attributes?.etag||null,hasPreview:t.attributes?.hasPreview||null,mountType:t.attributes?.mountType||null,quotaAvailableBytes:t.attributes?.quotaAvailableBytes||null,icon:null,sharePermissions:null}))(t))),u.allowDirectories(!0===s?.allowDirectoryChooser||n?.includes("httpd/unix-directory")||!1).setMultiSelect(r).startAt(a).build().pick()},message:function(t,e,r,n,o=()=>{},i,a){const s=(new oi.ik).setName(e).setText(a?"":t).setButtons(ai._getLegacyButtons(n,o));switch(r){case"alert":s.setSeverity("warning");break;case"notice":s.setSeverity("info")}const c=s.build();return a&&c.setHTML(t),c.show().then(()=>{o._clicked||o(!1)})},_getLegacyButtons(t,e){const r=[];switch("object"==typeof t?t.type:t){case ai.YES_NO_BUTTONS:r.push({label:t?.cancel??(0,Yr.t)("core","No"),callback:()=>{e._clicked=!0,e(!1)}}),r.push({label:t?.confirm??(0,Yr.t)("core","Yes"),variant:"primary",callback:()=>{e._clicked=!0,e(!0)}});break;case ai.OK_BUTTONS:r.push({label:t?.confirm??(0,Yr.t)("core","OK"),variant:"primary",callback:()=>{e._clicked=!0,e(!0)}});break;default:jn.error("Invalid call to OC.dialogs")}return r}},si=ai;function ci(t,e){let r,n,o="";if(this.typelessListeners=[],this.closed=!1,e)for(r in e)o+=r+"="+encodeURIComponent(e[r])+"&";o+="requesttoken="+encodeURIComponent(Lo()),n="&",-1===t.indexOf("?")&&(n="?"),this.source=new EventSource(t+n+o),this.source.onmessage=function(t){for(let e=0;et.cancel()),r.style.display="block")},finishedSaving(t,e){this.finishedAction(t,e)},finishedAction(t,e){"success"===e.status?this.finishedSuccess(t,e.data.message):this.finishedError(t,e.data.message)},finishedSuccess(t,e){const r=document.querySelector(t);r&&r instanceof HTMLElement&&(r.textContent=e,r.classList.remove("error"),r.classList.add("success"),r.getAnimations?.().forEach(t=>t.cancel()),window.setTimeout(function(){if(!(r&&r instanceof HTMLElement))return;const t=r.animate?.([{opacity:1},{opacity:0}],{duration:900,fill:"forwards"});t?t.addEventListener("finish",()=>{r.style.display="none"}):window.setTimeout(()=>{r.style.display="none"},900)},3e3),r.style.display="block")},finishedError(t,e){const r=document.querySelector(t);r&&r instanceof HTMLElement&&(r.textContent=e,r.classList.remove("success"),r.classList.add("error"),r.style.display="block")}},gi={requiresPasswordConfirmation:()=>(0,po.oB)(),requirePasswordConfirmation(t,e,r){(0,po.C5)().then(t,r)}},mi={_plugins:{},register(t,e){let r=this._plugins[t];r||(r=this._plugins[t]=[]),r.push(e)},getPlugins(t){return this._plugins[t]||[]},attach(t,e,r){const n=this.getPlugins(t);for(let t=0;t="0"&&r<="9";a!==i&&(o++,e[o]="",i=a),e[o]+=r,n++}return e}const wi={History:{_handlers:[],_pushState(t,e,r){let n;if(n="string"==typeof t?t:_i.buildQueryString(t),window.history.pushState){if(e=e||location.pathname+"?"+n,navigator.userAgent.toLowerCase().indexOf("firefox")>-1&&parseInt(navigator.userAgent.split("/").pop())<51){const t=document.querySelectorAll('[fill^="url(#"], [stroke^="url(#"], [filter^="url(#invert"]');for(let e,r=0,n=t.length;r=0?t.substr(e+1):t.length?t.substr(1):""},_decodeQuery:t=>t.replace(/\+/g," "),parseUrlQuery(){const t=this._parseHashQuery();let e;return t&&(e=_i.parseQueryString(this._decodeQuery(t))),e=$r.extend(e||{},_i.parseQueryString(this._decodeQuery(location.search))),e||{}},_onPopState(t){if(this._cancelPop)return void(this._cancelPop=!1);let e;if(this._handlers.length){e=t&&t.state,$r.isString(e)?e=_i.parseQueryString(e):e||(e=this.parseUrlQuery()||{});for(let t=0;t(void 0===window.TESTING&&_i.debug&&jn.warn("OC.Util.formatDate is deprecated and will be removed in Nextcloud 21. See @nextcloud/moment"),e=e||"LLL",Jr()(t).format(e)),relativeModifiedDate(e){void 0===window.TESTING&&_i.debug&&jn.warn("OC.Util.relativeModifiedDate is deprecated and will be removed in Nextcloud 21. See @nextcloud/moment");const r=Jr()().diff(Jr()(e));return r>=0&&r<45e3?t("core","seconds ago"):Jr()(e).fromNow()},getScrollBarWidth(){if(this._scrollBarWidth)return this._scrollBarWidth;const t=document.createElement("p");t.style.width="100%",t.style.height="200px";const e=document.createElement("div");e.style.position="absolute",e.style.top="0px",e.style.left="0px",e.style.visibility="hidden",e.style.width="200px",e.style.height="150px",e.style.overflow="hidden",e.appendChild(t),document.body.appendChild(e);const r=t.offsetWidth;e.style.overflow="scroll";let n=t.offsetWidth;return r===n&&(n=e.clientWidth),document.body.removeChild(e),this._scrollBarWidth=r-n,this._scrollBarWidth},stripTime:t=>new Date(t.getFullYear(),t.getMonth(),t.getDate()),naturalSortCompare(t,e){let r;const n=bi(t),o=bi(e);for(r=0;n[r]&&o[r];r++)if(n[r]!==o[r]){const t=Number(n[r]),e=Number(o[r]);return t==n[r]&&e==o[r]?t-e:n[r].localeCompare(o[r],_i.getLanguage())}return n.length-o.length},waitFor(t,e){const r=function(){!0!==t()&&setTimeout(r,e)};r()},isCookieSetToValue(t,e){const r=document.cookie.split(";");for(let n=0;n!$_",appConfig:Jo,appswebroots:Xo,config:Qo,currentUser:ei,dialogs:si,EventSource:ui,MimeType:i,getCurrentUser:function(){return{uid:ei,displayName:ti}},isUserAdmin:()=>Ko,L10N:li,registerXHRForErrorProcessing:()=>{},getCapabilities:function(){return OC.debug&&jn.warn("OC.getCapabilities is deprecated and will be removed in Nextcloud 21. See @nextcloud/capabilities"),(0,io.F)()},basename:Yo.P8,encodePath:Yo.O0,dirname:Yo.pD,isSamePath:Yo.ys,joinPaths:Yo.fj,getCanonicalLocale:Yr.lO,getLocale:Yr.JK,getLanguage:Yr.Z0,buildQueryString:function(t){return t?new URLSearchParams(t).toString():""},parseQueryString:function(t){const e=new URLSearchParams(t);return Object.fromEntries(e.entries())},msg:vi,PasswordConfirmation:gi,Plugins:mi,theme:yi,Util:wi,debug:ri,filePath:l.fg,generateUrl:l.Jv,getRootPath:l.aU,imagePath:l.d0,requestToken:Lo(),linkTo:l.uM,linkToOCS:(t,e)=>(0,l.KT)(t,{},{ocsVersion:e||1})+"/",linkToRemote:l.dC,linkToRemoteBase:function(t){return(0,l.aU)()+"/remote.php/"+t},webroot:Ci};(0,zn.B1)("csrf-token-update",t=>{OC.requestToken=t.token,jn.info("OC.requestToken changed",{token:t.token})}),n(84315),n(7452);var Si=n(57576),Ei=n.n(Si),ki=n(78112);const Oi={disableKeyboardShortcuts:()=>(0,Hn.C)("theming","shortcutsDisabled",!1),setPageHeading:function(t){const e=document.getElementById("page-heading-level-1");e&&(e.textContent=t)}};async function Ti(t,e,r={}){"post"!==t&&"delete"!==t||!(0,po.oB)(po.mH.Lax)||await(0,po.C5)();try{const{data:n}=await u.Ay.request({method:t.toLowerCase(),url:(0,l.KT)("apps/provisioning_api/api/v1/config/apps")+e,data:r.data||{}});r.success?.(n.ocs.data)}catch(t){r.error?.(t)}}function Ii(t){Ti("get","",t)}function Ri(t,e){Ti("get","/"+t,e)}function ji(t,e,r,n){(n=n||{}).data={defaultValue:r},Ti("get","/"+t+"/"+e,n)}function Mi(t,e,r,n){(n=n||{}).data={value:r},Ti("post","/"+t+"/"+e,n)}function Ni(t,e,r){Ti("delete","/"+t+"/"+e,r)}var Pi=n(70580),Li=n.n(Pi);const Di={},Bi={registerType(t,e){Di[t]=e},trigger:t=>Di[t].action(),getTypes:()=>Object.keys(Di),getIcon:t=>Di[t].typeIconClass||"",getLabel:t=>Li()(Di[t].typeString||t),getLink:(t,e)=>void 0!==Di[t]?Di[t].link(e):""},Ui=/(\s|^)(https?:\/\/)([-A-Z0-9+_.]+(?::[0-9]+)?(?:\/[-A-Z0-9+&@#%?=~_|!:,.;()]*)*)(\s|$)/gi;function Fi(t){return Hi(t)}function zi(t){return Vi(t)}function Hi(t){return t.replace(Ui,function(t,e,r,n,o){let i=n;return r?"http://"===r&&(i=r+n):r="https://",e+''+i+""+o})}function Vi(t){const e=document.createElement("div");return e.innerHTML=t,e.querySelectorAll("a").forEach(t=>{t.replaceWith(document.createTextNode(t.getAttribute("href")||""))}),e.innerHTML}const qi={},Wi={},Gi={loadScript(t,e){const r=t+e;return Object.hasOwn(qi,r)?Promise.resolve():(qi[r]=!0,new Promise(function(r,n){const o=(0,l.fg)(t,"js",e),i=document.createElement("script");i.src=o,i.setAttribute("nonce",btoa(OC.requestToken)),i.onload=()=>r(),i.onerror=()=>n(new Error(`Failed to load script from ${o}`)),document.head.appendChild(i)}))},loadStylesheet(t,e){const r=t+e;return Object.hasOwn(Wi,r)?Promise.resolve():(Wi[r]=!0,new Promise(function(r,n){const o=(0,l.fg)(t,"css",e),i=document.createElement("link");i.href=o,i.type="text/css",i.rel="stylesheet",i.onload=()=>r(),i.onerror=()=>n(new Error(`Failed to load stylesheet from ${o}`)),document.head.appendChild(i)}))}},$i={success:(t,e)=>(0,oi.Te)(t,e),warning:(t,e)=>(0,oi.I9)(t,e),error:(t,e)=>(0,oi.Qg)(t,e),info:(t,e)=>(0,oi.cf)(t,e),message:(t,e)=>(0,oi.rG)(t,e)},Yi={Accessibility:Oi,AppConfig:a,Collaboration:Bi,Comments:s,InitialState:{loadState:Hn.C},Loader:Gi,Toast:$i};function Ki(t,e,r){(Array.isArray(t)?t:[t]).forEach(t=>{void 0!==window[t]&&delete window[t],Object.defineProperty(window,t,{get:()=>(function(){void 0===window.TESTING&&_i.debug&&console.warn.apply(console,arguments)}(r?`${t} is deprecated: ${r}`:`${t} is deprecated`),e())})})}Ki(["_"],()=>$r,"The global underscore is deprecated. It will be removed in a later versions without another warning. Please ship your own."),Ki(["Clipboard","ClipboardJS"],()=>Ei(),"please ship your own, this will be removed in Nextcloud 20"),Ki(["dav"],()=>ki.dav,"please ship your own. It will be removed in a later versions without another warning. Please ship your own."),Ki("moment",()=>Jr(),"please ship your own, this will be removed in Nextcloud 20"),window.OC=_i,Ki("initCore",()=>$o,"this is an internal function"),Ki("oc_appswebroots",()=>_i.appswebroots,"use OC.appswebroots instead, this will be removed in Nextcloud 20"),Ki("oc_config",()=>_i.config,"use OC.config instead, this will be removed in Nextcloud 20"),Ki("oc_current_user",()=>_i.getCurrentUser().uid,"use OC.getCurrentUser().uid instead, this will be removed in Nextcloud 20"),Ki("oc_debug",()=>_i.debug,"use OC.debug instead, this will be removed in Nextcloud 20"),Ki("oc_defaults",()=>_i.theme,"use OC.theme instead, this will be removed in Nextcloud 20"),Ki("oc_isadmin",_i.isUserAdmin,"use OC.isUserAdmin() instead, this will be removed in Nextcloud 20"),Ki("oc_requesttoken",()=>Lo(),"use OC.requestToken instead, this will be removed in Nextcloud 20"),Ki("oc_webroot",()=>_i.webroot,"use OC.getRootPath() instead, this will be removed in Nextcloud 20"),Ki("OCDialogs",()=>_i.dialogs,"use OC.dialogs instead, this will be removed in Nextcloud 20"),window.OCP=Yi,window.OCA={},window.t=$r.bind(_i.L10N.translate,_i.L10N),window.n=$r.bind(_i.L10N.translatePlural,_i.L10N),n.nc=(0,c.aV)(),window.addEventListener("DOMContentLoaded",function(){$o(),window.history.pushState?window.onpopstate=$r.bind(_i.Util.History._onPopState,_i.Util.History):window.onhashchange=$r.bind(_i.Util.History._onPopState,_i.Util.History)}),document.addEventListener("DOMContentLoaded",function(){const t=document.getElementById("password-input-form");t&&t.addEventListener("submit",async function(e){e.preventDefault();const r=document.getElementById("requesttoken");if(r){const t=(0,l.Jv)("/csrftoken"),e=await u.Ay.get(t);r.value=e.data.token}t.submit()})})},57576(t){var e;e=function(){return function(){var t={686:function(t,e,r){"use strict";r.d(e,{default:function(){return b}});var n=r(279),o=r.n(n),i=r(370),a=r.n(i),s=r(817),c=r.n(s);function u(t){try{return document.execCommand(t)}catch(t){return!1}}var l=function(t){var e=c()(t);return u("cut"),e},f=function(t,e){var r=function(t){var e="rtl"===document.documentElement.getAttribute("dir"),r=document.createElement("textarea");r.style.fontSize="12pt",r.style.border="0",r.style.padding="0",r.style.margin="0",r.style.position="absolute",r.style[e?"right":"left"]="-9999px";var n=window.pageYOffset||document.documentElement.scrollTop;return r.style.top="".concat(n,"px"),r.setAttribute("readonly",""),r.value=t,r}(t);e.container.appendChild(r);var n=c()(r);return u("copy"),r.remove(),n},p=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{container:document.body},r="";return"string"==typeof t?r=f(t,e):t instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(null==t?void 0:t.type)?r=f(t.value,e):(r=c()(t),u("copy")),r};function d(t){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},d(t)}function h(t){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},h(t)}function v(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof t.action?t.action:this.defaultAction,this.target="function"==typeof t.target?t.target:this.defaultTarget,this.text="function"==typeof t.text?t.text:this.defaultText,this.container="object"===h(t.container)?t.container:document.body}},{key:"listenClick",value:function(t){var e=this;this.listener=a()(t,"click",function(t){return e.onClick(t)})}},{key:"onClick",value:function(t){var e=t.delegateTarget||t.currentTarget,r=this.action(e)||"copy",n=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.action,r=void 0===e?"copy":e,n=t.container,o=t.target,i=t.text;if("copy"!==r&&"cut"!==r)throw new Error('Invalid "action" value, use either "copy" or "cut"');if(void 0!==o){if(!o||"object"!==d(o)||1!==o.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===r&&o.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===r&&(o.hasAttribute("readonly")||o.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes')}return i?p(i,{container:n}):o?"cut"===r?l(o):p(o,{container:n}):void 0}({action:r,container:this.container,target:this.target(e),text:this.text(e)});this.emit(n?"success":"error",{action:r,text:n,trigger:e,clearSelection:function(){e&&e.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(t){return y("action",t)}},{key:"defaultTarget",value:function(t){var e=y("target",t);if(e)return document.querySelector(e)}},{key:"defaultText",value:function(t){return y("text",t)}},{key:"destroy",value:function(){this.listener.destroy()}}],n=[{key:"copy",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{container:document.body};return p(t,e)}},{key:"cut",value:function(t){return l(t)}},{key:"isSupported",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["copy","cut"],e="string"==typeof t?[t]:t,r=!!document.queryCommandSupported;return e.forEach(function(t){r=r&&!!document.queryCommandSupported(t)}),r}}],r&&v(e.prototype,r),n&&v(e,n),c}(o()),b=A},828:function(t){if("undefined"!=typeof Element&&!Element.prototype.matches){var e=Element.prototype;e.matches=e.matchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector}t.exports=function(t,e){for(;t&&9!==t.nodeType;){if("function"==typeof t.matches&&t.matches(e))return t;t=t.parentNode}}},438:function(t,e,r){var n=r(828);function o(t,e,r,n,o){var a=i.apply(this,arguments);return t.addEventListener(r,a,o),{destroy:function(){t.removeEventListener(r,a,o)}}}function i(t,e,r,o){return function(r){r.delegateTarget=n(r.target,e),r.delegateTarget&&o.call(t,r)}}t.exports=function(t,e,r,n,i){return"function"==typeof t.addEventListener?o.apply(null,arguments):"function"==typeof r?o.bind(null,document).apply(null,arguments):("string"==typeof t&&(t=document.querySelectorAll(t)),Array.prototype.map.call(t,function(t){return o(t,e,r,n,i)}))}},879:function(t,e){e.node=function(t){return void 0!==t&&t instanceof HTMLElement&&1===t.nodeType},e.nodeList=function(t){var r=Object.prototype.toString.call(t);return void 0!==t&&("[object NodeList]"===r||"[object HTMLCollection]"===r)&&"length"in t&&(0===t.length||e.node(t[0]))},e.string=function(t){return"string"==typeof t||t instanceof String},e.fn=function(t){return"[object Function]"===Object.prototype.toString.call(t)}},370:function(t,e,r){var n=r(879),o=r(438);t.exports=function(t,e,r){if(!t&&!e&&!r)throw new Error("Missing required arguments");if(!n.string(e))throw new TypeError("Second argument must be a String");if(!n.fn(r))throw new TypeError("Third argument must be a Function");if(n.node(t))return function(t,e,r){return t.addEventListener(e,r),{destroy:function(){t.removeEventListener(e,r)}}}(t,e,r);if(n.nodeList(t))return function(t,e,r){return Array.prototype.forEach.call(t,function(t){t.addEventListener(e,r)}),{destroy:function(){Array.prototype.forEach.call(t,function(t){t.removeEventListener(e,r)})}}}(t,e,r);if(n.string(t))return function(t,e,r){return o(document.body,t,e,r)}(t,e,r);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}},817:function(t){t.exports=function(t){var e;if("SELECT"===t.nodeName)t.focus(),e=t.value;else if("INPUT"===t.nodeName||"TEXTAREA"===t.nodeName){var r=t.hasAttribute("readonly");r||t.setAttribute("readonly",""),t.select(),t.setSelectionRange(0,t.value.length),r||t.removeAttribute("readonly"),e=t.value}else{t.hasAttribute("contenteditable")&&t.focus();var n=window.getSelection(),o=document.createRange();o.selectNodeContents(t),n.removeAllRanges(),n.addRange(o),e=n.toString()}return e}},279:function(t){function e(){}e.prototype={on:function(t,e,r){var n=this.e||(this.e={});return(n[t]||(n[t]=[])).push({fn:e,ctx:r}),this},once:function(t,e,r){var n=this;function o(){n.off(t,o),e.apply(r,arguments)}return o._=e,this.on(t,o,r)},emit:function(t){for(var e=[].slice.call(arguments,1),r=((this.e||(this.e={}))[t]||[]).slice(),n=0,o=r.length;ns});var n=r(71354),o=r.n(n),i=r(76314),a=r.n(i)()(o());a.push([t.id,".account-menu-entry__icon[data-v-bdb908d2]{height:16px;width:16px;margin:calc((var(--default-clickable-area) - 16px)/2);filter:var(--background-invert-if-dark)}.account-menu-entry__icon--active[data-v-bdb908d2]{filter:var(--primary-invert-if-dark)}.account-menu-entry__loading[data-v-bdb908d2]{height:20px;width:20px;margin:calc((var(--default-clickable-area) - 20px)/2)}.account-menu-entry[data-v-bdb908d2] .list-item-content__main{width:fit-content}","",{version:3,sources:["webpack://./core/src/components/AccountMenu/AccountMenuEntry.vue"],names:[],mappings:"AAEC,2CACC,WAAA,CACA,UAAA,CACA,qDAAA,CACA,uCAAA,CAEA,mDACC,oCAAA,CAIF,8CACC,WAAA,CACA,UAAA,CACA,qDAAA,CAGD,8DACC,iBAAA",sourcesContent:["\n.account-menu-entry {\n\t&__icon {\n\t\theight: 16px;\n\t\twidth: 16px;\n\t\tmargin: calc((var(--default-clickable-area) - 16px) / 2); // 16px icon size\n\t\tfilter: var(--background-invert-if-dark);\n\n\t\t&--active {\n\t\t\tfilter: var(--primary-invert-if-dark);\n\t\t}\n\t}\n\n\t&__loading {\n\t\theight: 20px;\n\t\twidth: 20px;\n\t\tmargin: calc((var(--default-clickable-area) - 20px) / 2); // 20px icon size\n\t}\n\n\t:deep(.list-item-content__main) {\n\t\twidth: fit-content;\n\t}\n}\n"],sourceRoot:""}]);const s=a},35644(t,e,r){"use strict";r.d(e,{A:()=>s});var n=r(71354),o=r.n(n),i=r(76314),a=r.n(i)()(o());a.push([t.id,".qr-login__content{display:flex;flex-direction:column;align-items:center;gap:var(--default-grid-baseline)}.qr-login__description{text-align:center}","",{version:3,sources:["webpack://./core/src/components/AccountMenu/AccountQRLoginDialog.vue"],names:[],mappings:"AACA,mBACC,YAAA,CACA,qBAAA,CACA,kBAAA,CACA,gCAAA,CAGD,uBACC,iBAAA",sourcesContent:["\n.qr-login__content {\n\tdisplay: flex;\n\tflex-direction: column;\n\talign-items: center;\n\tgap: var(--default-grid-baseline);\n}\n\n.qr-login__description {\n\ttext-align: center;\n}\n"],sourceRoot:""}]);const s=a},17973(t,e,r){"use strict";r.d(e,{A:()=>s});var n=r(71354),o=r.n(n),i=r(76314),a=r.n(i)()(o());a.push([t.id,".app-item[data-v-278c0168]{--app-item-circle-size: calc(var(--default-grid-baseline) * 10);--app-item-icon-size: 22px;display:flex;flex-direction:column;align-items:center;gap:var(--default-grid-baseline);padding-block:var(--default-grid-baseline);border-radius:var(--border-radius-element);text-decoration:none;color:var(--color-main-text);min-width:0}.app-item[data-v-278c0168]:hover,.app-item[data-v-278c0168]:focus-visible{background-color:var(--color-background-hover)}.app-item[data-v-278c0168]:focus-visible{outline:none;box-shadow:inset 0 0 0 2px var(--color-primary-element)}.app-item__circle[data-v-278c0168]{box-sizing:border-box;position:relative;width:var(--app-item-circle-size);height:var(--app-item-circle-size);border-radius:50%;background-color:var(--color-primary-element);background-image:linear-gradient(to bottom, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0) 45%, rgba(0, 0, 0, 0.15) 100%);box-shadow:inset 0 1px 0 0 hsla(0,0%,100%,.25),inset 0 -1px 0 0 rgba(0,0,0,.2),0 2px 4px rgba(0,0,0,.15);display:flex;align-items:center;justify-content:center}.app-item__icon[data-v-278c0168]{width:var(--app-item-icon-size);height:var(--app-item-icon-size);filter:var(--primary-invert-if-bright);mask:var(--header-menu-icon-mask)}.app-item__unread[data-v-278c0168]{position:absolute;top:0;inset-inline-end:0;width:calc(var(--default-grid-baseline)*3);height:calc(var(--default-grid-baseline)*3);border-radius:50%;background-color:var(--color-error);border:2px solid var(--color-main-background);box-sizing:content-box}.app-item__label[data-v-278c0168]{font-size:12px;line-height:1.3;text-align:center;color:var(--color-main-text);-webkit-hyphens:auto;hyphens:auto;word-break:normal;overflow-wrap:break-word;max-width:100%;letter-spacing:-0.3px}.app-item--active .app-item__label[data-v-278c0168]{font-weight:bold}.app-item--outlined .app-item__circle[data-v-278c0168]{background:rgba(0,0,0,0);background-image:none;box-shadow:inset 0 0 0 2px var(--color-border-maxcontrast)}.app-item--outlined .app-item__icon[data-v-278c0168]{filter:var(--background-invert-if-dark);mask:none}","",{version:3,sources:["webpack://./core/src/components/AppItem.vue"],names:[],mappings:"AACA,2BACC,+DAAA,CACA,0BAAA,CACA,YAAA,CACA,qBAAA,CACA,kBAAA,CACA,gCAAA,CAGA,0CAAA,CACA,0CAAA,CACA,oBAAA,CACA,4BAAA,CACA,WAAA,CAEA,0EAEC,8CAAA,CAMD,yCACC,YAAA,CACA,uDAAA,CAGD,mCACC,qBAAA,CACA,iBAAA,CACA,iCAAA,CACA,kCAAA,CACA,iBAAA,CACA,6CAAA,CACA,+HAAA,CAMA,wGACC,CAGD,YAAA,CACA,kBAAA,CACA,sBAAA,CAGD,iCACC,+BAAA,CACA,gCAAA,CAGA,sCAAA,CACA,iCAAA,CAGD,mCACC,iBAAA,CACA,KAAA,CACA,kBAAA,CACA,0CAAA,CACA,2CAAA,CACA,iBAAA,CACA,mCAAA,CACA,6CAAA,CACA,sBAAA,CAGD,kCACC,cAAA,CACA,eAAA,CACA,iBAAA,CACA,4BAAA,CAEA,oBAAA,CACA,YAAA,CACA,iBAAA,CACA,wBAAA,CACA,cAAA,CACA,qBAAA,CAGD,oDACC,gBAAA,CAID,uDACC,wBAAA,CACA,qBAAA,CACA,0DAAA,CAGD,qDACC,uCAAA,CACA,SAAA",sourcesContent:["\n.app-item {\n\t--app-item-circle-size: calc(var(--default-grid-baseline) * 10);\n\t--app-item-icon-size: 22px;\n\tdisplay: flex;\n\tflex-direction: column;\n\talign-items: center;\n\tgap: var(--default-grid-baseline);\n\t// Inset so the hover/focus highlight floats around the circle and label\n\t// rather than sitting flush against the icon at the top edge.\n\tpadding-block: var(--default-grid-baseline);\n\tborder-radius: var(--border-radius-element);\n\ttext-decoration: none;\n\tcolor: var(--color-main-text);\n\tmin-width: 0;\n\n\t&:hover,\n\t&:focus-visible {\n\t\tbackground-color: var(--color-background-hover);\n\t}\n\n\t// Inset ring instead of outline + offset: the offset version visibly\n\t// clips at the popover's rounded edge for items in the first/last row\n\t// or column. The inset shadow stays inside the highlight rectangle.\n\t&:focus-visible {\n\t\toutline: none;\n\t\tbox-shadow: inset 0 0 0 2px var(--color-primary-element);\n\t}\n\n\t&__circle {\n\t\tbox-sizing: border-box;\n\t\tposition: relative;\n\t\twidth: var(--app-item-circle-size);\n\t\theight: var(--app-item-circle-size);\n\t\tborder-radius: 50%;\n\t\tbackground-color: var(--color-primary-element);\n\t\tbackground-image: linear-gradient(\n\t\t\tto bottom,\n\t\t\trgba(255, 255, 255, 0.18) 0%,\n\t\t\trgba(255, 255, 255, 0) 45%,\n\t\t\trgba(0, 0, 0, 0.15) 100%\n\t\t);\n\t\tbox-shadow:\n\t\t\tinset 0 1px 0 0 rgba(255, 255, 255, 0.25),\n\t\t\tinset 0 -1px 0 0 rgba(0, 0, 0, 0.2),\n\t\t\t0 2px 4px rgba(0, 0, 0, 0.15);\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t}\n\n\t&__icon {\n\t\twidth: var(--app-item-icon-size);\n\t\theight: var(--app-item-icon-size);\n\t\t// App icons are bright by default; flip them to dark when the\n\t\t// primary color (circle background) is bright (e.g. white in dark mode).\n\t\tfilter: var(--primary-invert-if-bright);\n\t\tmask: var(--header-menu-icon-mask);\n\t}\n\n\t&__unread {\n\t\tposition: absolute;\n\t\ttop: 0;\n\t\tinset-inline-end: 0;\n\t\twidth: calc(var(--default-grid-baseline) * 3);\n\t\theight: calc(var(--default-grid-baseline) * 3);\n\t\tborder-radius: 50%;\n\t\tbackground-color: var(--color-error);\n\t\tborder: 2px solid var(--color-main-background);\n\t\tbox-sizing: content-box;\n\t}\n\n\t&__label {\n\t\tfont-size: 12px;\n\t\tline-height: 1.3;\n\t\ttext-align: center;\n\t\tcolor: var(--color-main-text);\n\t\t// Needs a matching to actually break with a hyphen.\n\t\t-webkit-hyphens: auto;\n\t\thyphens: auto;\n\t\tword-break: normal;\n\t\toverflow-wrap: break-word;\n\t\tmax-width: 100%;\n\t\tletter-spacing: -0.3px;\n\t}\n\n\t&--active &__label {\n\t\tfont-weight: bold;\n\t}\n\n\t// Outlined variant: no fill or gradient.\n\t&--outlined &__circle {\n\t\tbackground: transparent;\n\t\tbackground-image: none;\n\t\tbox-shadow: inset 0 0 0 2px var(--color-border-maxcontrast);\n\t}\n\n\t&--outlined &__icon {\n\t\tfilter: var(--background-invert-if-dark);\n\t\tmask: none;\n\t}\n}\n"],sourceRoot:""}]);const s=a},27359(t,e,r){"use strict";r.d(e,{A:()=>s});var n=r(71354),o=r.n(n),i=r(76314),a=r.n(i)()(o());a.push([t.id,".app-menu[data-v-36dadc6d]{display:flex;align-items:center}.app-menu__waffle[data-v-36dadc6d]{--color-main-text: var(--color-background-plain-text);color:var(--color-background-plain-text)}.app-menu__waffle[data-v-36dadc6d]:hover:not(:disabled){background-color:rgba(0,0,0,.1) !important}.app-menu__waffle[data-v-36dadc6d]:active:not(:disabled){background-color:rgba(0,0,0,.15) !important}.app-menu__waffle[data-v-36dadc6d]:focus-visible{background-color:rgba(0,0,0,.1) !important;outline:none !important;box-shadow:inset 0 0 0 2px var(--color-background-plain-text) !important}.app-menu__current-app[data-v-36dadc6d]{--color-main-text: var(--color-background-plain-text);color:var(--color-background-plain-text)}.app-menu__current-app[data-v-36dadc6d]:hover:not(:disabled){background-color:rgba(0,0,0,.1) !important}.app-menu__current-app[data-v-36dadc6d]:active:not(:disabled){background-color:rgba(0,0,0,.15) !important}.app-menu__current-app[data-v-36dadc6d]:focus-visible{background-color:rgba(0,0,0,.1) !important;outline:none !important;box-shadow:inset 0 0 0 2px var(--color-background-plain-text) !important}.app-menu__current-app[data-v-36dadc6d] .button-vue__text{min-width:0}@media only screen and (max-width: 1024px){.app-menu__current-app[data-v-36dadc6d]{display:none !important}}.app-menu__current-app-icon[data-v-36dadc6d]{width:calc(var(--default-grid-baseline)*5);height:calc(var(--default-grid-baseline)*5);filter:var(--background-image-invert-if-bright);mask:var(--header-menu-icon-mask)}.app-menu__current-app-cog[data-v-36dadc6d]{mask:var(--header-menu-icon-mask)}.app-menu__current-app-name[data-v-36dadc6d]{display:inline-block;vertical-align:middle;font-size:var(--default-font-size);font-weight:500;white-space:nowrap;letter-spacing:-0.5px;overflow:hidden;text-overflow:ellipsis;max-width:clamp(80px,22vw,320px)}.app-menu__popover[data-v-36dadc6d]{max-width:calc(100vw - var(--default-grid-baseline)*4);background-color:var(--color-main-background)}.app-menu__grid[data-v-36dadc6d]{--app-item-col-width: 69px;--app-item-row-height: 64px;box-sizing:border-box;padding:calc(var(--default-grid-baseline)*2);display:grid;grid-template-columns:repeat(4, var(--app-item-col-width));grid-auto-rows:minmax(var(--app-item-row-height), max-content);overflow-y:auto}.app-menu__grid[data-v-36dadc6d]>:nth-child(-n+4){padding-block-start:calc(var(--default-grid-baseline)*2) !important}.app-menu__grid[data-v-36dadc6d]{scrollbar-width:thin;scrollbar-color:var(--color-scrollbar) rgba(0,0,0,0)}","",{version:3,sources:["webpack://./core/src/components/AppMenu.vue"],names:[],mappings:"AACA,2BACC,YAAA,CACA,kBAAA,CAEA,mCAIC,qDAAA,CACA,wCAAA,CAKA,wDACC,0CAAA,CAGD,yDACC,2CAAA,CAGD,iDACC,0CAAA,CACA,uBAAA,CACA,wEAAA,CAIF,wCAIC,qDAAA,CACA,wCAAA,CAMA,6DACC,0CAAA,CAGD,8DACC,2CAAA,CAGD,sDACC,0CAAA,CACA,uBAAA,CACA,wEAAA,CAKD,0DACC,WAAA,CAGD,2CA/BD,wCAgCE,uBAAA,CAAA,CAIF,6CACC,0CAAA,CACA,2CAAA,CAEA,+CAAA,CACA,iCAAA,CAGD,4CACC,iCAAA,CAGD,6CAEC,oBAAA,CACA,qBAAA,CACA,kCAAA,CACA,eAAA,CACA,kBAAA,CACA,qBAAA,CACA,eAAA,CACA,sBAAA,CAGA,gCAAA,CAGD,oCACC,sDAAA,CACA,6CAAA,CAGD,iCACC,0BAAA,CACA,2BAAA,CAGA,qBAAA,CACA,4CAAA,CACA,YAAA,CACA,0DAAA,CACA,8DAAA,CAEA,eAAA,CAKA,kDACC,mEAAA,CAjBF,iCAsBC,oBAAA,CACA,oDAAA",sourcesContent:["\n.app-menu {\n\tdisplay: flex;\n\talign-items: center;\n\n\t&__waffle {\n\t\t// NcButton's tertiary-no-background variant uses --color-main-text,\n\t\t// which is dark on light themes. The header sits on the theme primary\n\t\t// background, so override to use the matching plain-text color.\n\t\t--color-main-text: var(--color-background-plain-text);\n\t\tcolor: var(--color-background-plain-text);\n\n\t\t// Class merges onto NcButton's root