diff --git a/core/src/components/AppIcon.vue b/core/src/components/AppIcon.vue index 09f80f9c65a03..21bbdd15c676d 100644 --- a/core/src/components/AppIcon.vue +++ b/core/src/components/AppIcon.vue @@ -93,14 +93,16 @@ $bevel: } } + // Utility entries ("More apps", "App store") stay subdued: a plain circle + // with the icon in the same muted color as the label. &--outlined { background: transparent; background-image: none; - box-shadow: inset 0 0 0 2px var(--color-border-maxcontrast); + box-shadow: inset 0 0 0 2px var(--color-border); } &--outlined &__img { - background-color: var(--color-main-text); + background-color: var(--color-text-maxcontrast); background-image: none; } } diff --git a/core/src/components/AppItem.vue b/core/src/components/AppItem.vue index 3f8757bab34ed..f7aec5e7f9db2 100644 --- a/core/src/components/AppItem.vue +++ b/core/src/components/AppItem.vue @@ -8,6 +8,7 @@ class="app-item" :class="{ 'app-item--active': app.active, + 'app-item--outlined': outlined, }" :href="app.href" :target="newTab ? '_blank' : undefined" @@ -125,5 +126,10 @@ const unreadLabel = computed(() => { &--active &__label { font-weight: bold; } + + // Utility entries ("More apps", "App store") are subdued, they are not apps. + &--outlined &__label { + color: var(--color-text-maxcontrast); + } } diff --git a/core/src/components/AppMenu.vue b/core/src/components/AppMenu.vue index e7aef02d42b35..9e88f1db4568d 100644 --- a/core/src/components/AppMenu.vue +++ b/core/src/components/AppMenu.vue @@ -54,19 +54,19 @@ :aria-expanded="opened ? 'true' : 'false'" @click="onTriggerClick('currentApp')"> {{ displayName }} @@ -94,6 +94,14 @@ import logger from '../logger.js' // Settings IDs that represent actions, not navigable pages. const SETTINGS_ACTION_IDS = new Set(['logout']) +// Sections of the settings app itself. Their names ("Personal settings", +// "Appearance and accessibility", ...) are too long and varied for the header, +// so they all show as "Settings". Other settings entries keep their own name. +const SETTINGS_SECTION_IDS = new Set(['settings_personal', 'settings_administration', 'accessibility_settings']) + +// Entry of the app management page, the target of the "More apps" tile. +const APP_MANAGEMENT_ID = 'appstore' + export default defineComponent({ name: 'AppMenu', @@ -169,18 +177,31 @@ export default defineComponent({ ?? Object.values(this.settingsList).find((entry) => entry.active && !SETTINGS_ACTION_IDS.has(entry.id)) }, - // Trigger label. Settings sub-section names ("Personal info", - // "Appearance and accessibility", ...) are too long and varied to - // surface in the header; collapse them all to a single "Settings". + isSettingsSection(): boolean { + return this.currentApp !== undefined && SETTINGS_SECTION_IDS.has(this.currentApp.id) + }, + + // Trigger label. Sections of the settings app show as "Settings", + // see SETTINGS_SECTION_IDS. All other entries use their own name, + // so the app management page shows "Apps" like in the account menu. displayName(): string { if (!this.currentApp) { return '' } - return this.currentApp.type === 'settings' + return this.isSettingsSection ? t('core', 'Settings') : this.currentApp.name }, + // The icon is painted through a mask, so entries with a dark icon + // (the app management page ships one for the settings list) are legible + // on the header as well. Escaped so a crafted path cannot break out of + // the url() token, same as AppIcon.vue. + currentAppIconStyle(): Record { + const icon = this.currentApp?.icon ?? '' + return { '--app-icon-url': `url("${icon.replace(/["\\]/g, '\\$&')}")` } + }, + // aria-label overrides the inner span text, so the displayed name // has to be duplicated here for screen readers. currentAppLabel(): string { @@ -193,7 +214,11 @@ export default defineComponent({ // utility tile is "More apps" (local app management) for admins and // "App store" (apps.nextcloud.com) for everyone else. gridItems(): INavigationEntry[] { - const tail = this.isAdmin ? this.moreAppsEntry : this.appStoreEntry + // On the app management page the "More apps" tile is the current + // entry, so it is marked active like any other app tile. + const tail = this.isAdmin + ? { ...this.moreAppsEntry, active: this.currentApp?.id === APP_MANAGEMENT_ID } + : this.appStoreEntry return [...this.appList, tail] }, }, @@ -459,13 +484,29 @@ export default defineComponent({ } &__current-app-icon { + display: flex; width: calc(var(--default-grid-baseline) * 5); height: calc(var(--default-grid-baseline) * 5); - // Theme-aware inversion + vertical alpha fade via --header-menu-icon-mask. - filter: var(--background-image-invert-if-bright); + // Vertical alpha fade, like the cog and the other header icons. mask: var(--header-menu-icon-mask); } + &__current-app-glyph { + width: 100%; + height: 100%; + // Masked rather than shown: app icons ship a hardcoded fill, so the + // color has to come from the background. Matches AppIcon.vue. + background-color: var(--color-background-plain-text); + mask: var(--app-icon-url) center / contain no-repeat; + } + + // Masked backgrounds are not force-adjusted the way is. + @media (forced-colors: active) { + &__current-app-glyph { + background-color: CanvasText; + } + } + &__current-app-cog { mask: var(--header-menu-icon-mask); } diff --git a/core/src/tests/components/AppMenu.spec.ts b/core/src/tests/components/AppMenu.spec.ts index 769351ad2d6d8..ab749570502ce 100644 --- a/core/src/tests/components/AppMenu.spec.ts +++ b/core/src/tests/components/AppMenu.spec.ts @@ -137,6 +137,26 @@ describe('core: AppMenu', () => { expect(moreApps).toBeTruthy() }) + it('marks the "More apps" tile active on the app management page', async () => { + auth.getCurrentUser.mockReturnValue({ isAdmin: true }) + initialState.loadState.mockImplementation((_a: string, key: string, fallback: unknown) => { + if (key === 'apps') { + return [makeApp({ id: 'files', name: 'Files', active: false })] + } + if (key === 'settingsNavEntries') { + return { appstore: makeApp({ id: 'appstore', name: 'Apps', type: 'settings', href: '/settings/apps', active: true }) } + } + return fallback + }) + const wrapper = mount(AppMenu, { attachTo: document.body }) + await openPopover(wrapper) + + const moreApps = Array.from(document.querySelectorAll('[role="menuitem"]')) + .find((el) => el.textContent?.includes('More apps')) + expect(moreApps?.classList.contains('app-item--active')).toBe(true) + expect(moreApps?.getAttribute('aria-current')).toBe('page') + }) + it('ArrowRight moves the roving stop from index 0 to index 1 and focuses it', async () => { initialState.loadState.mockImplementation((_a: string, key: string, fallback: unknown) => key === 'apps' ? eightApps() : fallback) const wrapper = mount(AppMenu, { attachTo: document.body }) @@ -184,8 +204,8 @@ describe('core: AppMenu', () => { // Object keyed by entry id — matches PHP's serialization shape // (TemplateLayout ships the filtered associative array as-is). return { - admin_settings: makeApp({ - id: 'admin_settings', + settings_administration: makeApp({ + id: 'settings_administration', name: 'Administration settings', type: 'settings', href: '/settings/admin/overview', @@ -202,13 +222,32 @@ describe('core: AppMenu', () => { expect(wrapper.find('.app-menu__current-app-name').text()).toBe('Settings') }) + it('keeps the own name of settings entries outside the settings app', () => { + // On /settings/apps the active entry is the app management one, which + // shows "Apps" here and in the account menu, not "Settings". + initialState.loadState.mockImplementation((_a: string, key: string, fallback: unknown) => { + if (key === 'apps') { + return [makeApp({ id: 'files', name: 'Files', active: false })] + } + if (key === 'settingsNavEntries') { + return { appstore: makeApp({ id: 'appstore', name: 'Apps', type: 'settings', href: '/settings/apps', icon: '/apps/appstore/img/app-dark.svg', active: true }) } + } + return fallback + }) + const wrapper = mount(AppMenu, { attachTo: document.body }) + expect(wrapper.find('.app-menu__current-app-name').text()).toBe('Apps') + // Its own icon, not the generic cog of the settings sections + expect(wrapper.find('.app-menu__current-app-glyph').attributes('style')) + .toContain('/apps/appstore/img/app-dark.svg') + }) + it('prefers the active app over a settings entry when both are marked active', () => { initialState.loadState.mockImplementation((_a: string, key: string, fallback: unknown) => { if (key === 'apps') { return [makeApp({ id: 'files', name: 'Files', active: true })] } if (key === 'settingsNavEntries') { - return { admin_settings: makeApp({ id: 'admin_settings', name: 'Administration settings', type: 'settings', active: true }) } + return { settings_administration: makeApp({ id: 'settings_administration', name: 'Administration settings', type: 'settings', active: true }) } } return fallback }) diff --git a/dist/core-main.js b/dist/core-main.js index 95664e06c9f3f..99f4fb09653b6 100644 --- a/dist/core-main.js +++ b/dist/core-main.js @@ -1,2 +1,2 @@ -(()=>{var e,r,n,o={99014(e,r,n){"use strict";var o={};n.r(o),n.d(o,{clearIconCache:()=>Me,getIconUrl:()=>Ie});var i={};n.r(i),n.d(i,{deleteKey:()=>Ye,getApps:()=>We,getKeys:()=>Ge,getValue:()=>$e,setValue:()=>Ke});var a={};n.r(a),n.d(a,{formatLinksPlain:()=>or,formatLinksRich:()=>nr,plainToRich:()=>er,richToPlain:()=>rr});var s=n(21777),c=n(44368),u=n(63814),l=n(53334),f=n(95093),p=n.n(f),d=n(85471),h=n(9165),v=n(80474),g=n(46855),m=n(57505),y=n(24764),A=n(74095),b=n(48943),w=n(2769),x=n(6695),C=n(88289),_=n(82182),E=n(23739),S=n(13741),k=n(58582),O=n(41944);const T={name:"ContactMenuEntry",components:{NcActionLink:S.A,NcActionText:k.A,NcActionButton:m.A,NcActions:y.A,NcAvatar:O.A,NcIconSvgWrapper:x.A},props:{contact:{required:!0,type:Object}},computed:{actions(){return this.contact.topAction?[this.contact.topAction,...this.contact.actions]:this.contact.actions},jsActions(){return(0,E.N)(this.contact)},preloadedUserStatus(){if(this.contact.status)return{status:this.contact.status,message:this.contact.statusMessage,icon:this.contact.statusIcon}}}};var I=n(85072),R=n.n(I),M=n(97825),j=n.n(M),N=n(77659),P=n.n(N),L=n(55056),D=n.n(L),B=n(10540),U=n.n(B),F=n(41113),z=n.n(F),H=n(89004),V={};V.styleTagTransform=z(),V.setAttributes=D(),V.insert=P().bind(null,"head"),V.domAPI=j(),V.insertStyleElement=U(),R()(H.A,V),H.A&&H.A.locals&&H.A.locals;var q=n(14486);const W=(0,q.A)(T,function(){var t=this,e=t._self._c;return e("li",{staticClass:"contact"},[e("NcAvatar",{staticClass:"contact__avatar",attrs:{user:t.contact.isUser?t.contact.uid:void 0,"is-no-user":!t.contact.isUser,"disable-menu":!0,"display-name":t.contact.avatarLabel,"preloaded-user-status":t.preloadedUserStatus}}),t._v(" "),e("a",{staticClass:"contact__body",attrs:{href:t.contact.profileUrl||t.contact.topAction?.hyperlink}},[e("div",{staticClass:"contact__body__full-name"},[t._v(t._s(t.contact.fullName))]),t._v(" "),t.contact.lastMessage?e("div",{staticClass:"contact__body__last-message"},[t._v(t._s(t.contact.lastMessage))]):t._e(),t._v(" "),t.contact.statusMessage?e("div",{staticClass:"contact__body__status-message"},[t._v(t._s(t.contact.statusMessage))]):e("div",{staticClass:"contact__body__email-address"},[t._v(t._s(t.contact.emailAddresses[0]))])]),t._v(" "),t.actions.length?e("NcActions",{attrs:{inline:t.contact.topAction?1:0}},[t._l(t.actions,function(r,n){return["#"!==r.hyperlink?e("NcActionLink",{key:`${n}-link`,staticClass:"other-actions",attrs:{href:r.hyperlink},scopedSlots:t._u([{key:"icon",fn:function(){return[e("img",{staticClass:"contact__action__icon",attrs:{"aria-hidden":"true",src:r.icon}})]},proxy:!0}],null,!0)},[t._v("\n\t\t\t\t"+t._s(r.title)+"\n\t\t\t")]):e("NcActionText",{key:`${n}-text`,staticClass:"other-actions",scopedSlots:t._u([{key:"icon",fn:function(){return[e("img",{staticClass:"contact__action__icon",attrs:{"aria-hidden":"true",src:r.icon}})]},proxy:!0}],null,!0)},[t._v("\n\t\t\t\t"+t._s(r.title)+"\n\t\t\t")])]}),t._v(" "),t._l(t.jsActions,function(r){return e("NcActionButton",{key:r.id,staticClass:"other-actions",attrs:{"close-after-click":!0},on:{click:function(e){return r.callback(t.contact)}},scopedSlots:t._u([{key:"icon",fn:function(){return[e("NcIconSvgWrapper",{attrs:{svg:r.iconSvg(t.contact)}})]},proxy:!0}],null,!0)},[t._v("\n\t\t\t"+t._s(r.displayName(t.contact))+"\n\t\t")])})],2):t._e()],1)},[],!1,null,"56b7b257",null).exports;var G=n(35947);const $=null===(K=(0,s.HW)())?(0,G.YK)().setApp("core").build():(0,G.YK)().setApp("core").setUid(K.uid).build();var K;(0,G.YK)().setApp("unified-search").detectUser().build();const Y=[],J=(0,d.pM)({__name:"ContactsMenu",setup(t){const e=(0,v.c0)("core:contacts").persist(!0).clearOnLogout(!0).build(),r=(0,s.HW)(),n=(0,u.Jv)("/apps/contacts"),o=(0,u.Jv)("/settings/apps/social/contacts"),i=(0,d.KR)(),a=(0,d.KR)(window.OC?.ContactsMenu?.actions||[]),f=(0,d.KR)(!1),p=(0,d.KR)([]),E=(0,d.KR)(),S=(0,d.KR)(!1),k=(0,d.KR)(""),O=(0,d.KR)([]),T=(0,d.KR)("$_all_$"),I=(0,d.EW)(()=>O.value.find(t=>t.teamId===T.value)?.displayName);async function R(t){E.value=""===t?(0,l.t)("core","Loading your contacts …"):(0,l.t)("core","Looking for {term} …",{term:t}),S.value=!1;try{const{data:e}=await c.Ay.post((0,u.Jv)("/contactsmenu/contacts"),{filter:t,teamId:"$_all_$"!==T.value?T.value:void 0});p.value=e.contacts,f.value=e.contactsAppEnabled,E.value=void 0}catch(e){$.error("could not load contacts",{error:e,searchTerm:t}),S.value=!0}}(0,d.sV)(async()=>{const t=e.getItem("core:contacts:team");if(t&&(T.value=JSON.parse(t)),0===Y.length)try{const{data:t}=await c.Ay.get((0,u.Jv)("/contactsmenu/teams"));Y.push(...t)}catch(t){$.error("could not load user teams",{error:t})}O.value=[...Y]}),(0,d.wB)(T,()=>{e.setItem("core:contacts:team",JSON.stringify(T.value)),R(k.value)});const M=(0,g.A)(function(){R(k.value)},500);function j(){(0,d.dY)(()=>{i.value?.focus(),i.value?.select()})}return{__sfc:!0,userTeams:Y,storage:e,user:r,contactsAppURL:n,contactsAppMgmtURL:o,contactsMenuInput:i,actions:a,contactsAppEnabled:f,contacts:p,loadingText:E,hasError:S,searchTerm:k,teams:O,selectedTeam:T,selectedTeamName:I,onOpened:async function(){await R("")},getContacts:R,onInputDebounced:M,onReset:function(){k.value="",p.value=[],j()},focusInput:j,mdiAccountGroupOutline:h.dgQ,mdiContacts:h.aB4,mdiMagnify:h.U4M,t:l.t,NcActionButton:m.A,NcActions:y.A,NcButton:A.A,NcEmptyContent:b.A,NcHeaderMenu:w.A,NcIconSvgWrapper:x.A,NcLoadingIcon:C.A,NcTextField:_.A,ContactMenuEntry:W}}}),Q=J;var X=n(32351),Z={};Z.styleTagTransform=z(),Z.setAttributes=D(),Z.insert=P().bind(null,"head"),Z.domAPI=j(),Z.insertStyleElement=U(),R()(X.A,Z),X.A&&X.A.locals&&X.A.locals;const tt=(0,q.A)(Q,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 et{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 rt=n(61338),nt=n(81222),ot=n(54562);const it={name:"CogIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},at=(0,q.A)(it,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,st={name:"DotsGridIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},ct=(0,q.A)(st,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,ut=(0,d.pM)({__name:"AppIcon",props:{icon:null,outlined:{type:Boolean,default:!1}},setup(t){const e=t,r=(0,d.EW)(()=>({"--app-icon-url":`url("${e.icon.replace(/["\\]/g,"\\$&")}")`}));return{__sfc:!0,props:e,iconStyle:r}}});var lt=n(53628),ft={};ft.styleTagTransform=z(),ft.setAttributes=D(),ft.insert=P().bind(null,"head"),ft.domAPI=j(),ft.insertStyleElement=U(),R()(lt.A,ft),lt.A&<.A.locals&<.A.locals;const pt=(0,q.A)(ut,function(){var t=this,e=t._self._c,r=t._self._setupProxy;return e("span",{staticClass:"app-icon",class:{"app-icon--outlined":t.outlined}},[t.icon?e("span",{staticClass:"app-icon__img",style:r.iconStyle,attrs:{"aria-hidden":"true"}}):t._e(),t._v(" "),t._t("default")],2)},[],!1,null,"42bb03fc",null).exports,dt=(0,d.pM)({__name:"AppItem",props:{app:null,newTab:{type:Boolean},outlined:{type:Boolean},tabindex:{default:-1}},setup(t){const e=t,r=(0,d.EW)(()=>{if(e.app.unread)return(0,l.n)("core","{count} notification","{count} notifications",e.app.unread,{count:e.app.unread})});return{__sfc:!0,props:e,unreadLabel:r,AppIcon:pt}}});var ht=n(12481),vt={};vt.styleTagTransform=z(),vt.setAttributes=D(),vt.insert=P().bind(null,"head"),vt.domAPI=j(),vt.insertStyleElement=U(),R()(ht.A,vt),ht.A&&ht.A.locals&&ht.A.locals;const gt=(0,q.A)(dt,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},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(r.AppIcon,{attrs:{icon:t.app.icon,outlined:t.outlined}},[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)},[],!1,null,"5ea5a006",null).exports,mt=new Set(["logout"]),yt=(0,d.pM)({name:"AppMenu",components:{AppItem:gt,IconCog:at,IconDotsGrid:ct,NcButton:A.A,NcPopover:ot.A},setup(){const t=(0,d.KR)(!1);return{t:l.t,n:l.n,opened:t}},data:()=>({appList:(0,nt.C)("core","apps",[]),settingsList:(0,nt.C)("core","settingsNavEntries",{}),isAdmin:(0,s.HW)()?.isAdmin??!1,focusedIndex:0,openedFrom:null,moreAppsEntry:{id:"more-apps",active:!1,order:Number.MAX_SAFE_INTEGER,href:(0,u.Jv)("/settings/apps"),icon:(0,u.d0)("core","actions/add.svg"),type:"link",name:(0,l.t)("core","More apps"),unread:0},appStoreEntry:{id:"app-store",active:!1,order:Number.MAX_SAFE_INTEGER,href:"https://apps.nextcloud.com/",icon:(0,u.d0)("core","actions/add.svg"),type:"link",name:(0,l.t)("core","App store"),unread:0},popoverSkidding:(0,l.V8)()?82:-82}),computed:{currentApp(){return this.appList.find(t=>t.active)??Object.values(this.settingsList).find(t=>t.active&&!mt.has(t.id))},displayName(){return this.currentApp?"settings"===this.currentApp.type?(0,l.t)("core","Settings"):this.currentApp.name:""},currentAppLabel(){return this.currentApp?(0,l.t)("core","Open apps menu, currently in {app}",{app:this.displayName}):(0,l.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,rt.B1)("nextcloud:app-menu.refresh",this.setApps),this.focusedIndex=this.activeGridIndex(),this.$refs.popover.$on("after-hide",this.onPopoverAfterHide)},beforeUnmount(){(0,rt.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:$.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 At=n(47559),bt={};bt.styleTagTransform=z(),bt.setAttributes=D(),bt.insert=P().bind(null,"head"),bt.domAPI=j(),bt.insertStyleElement=U(),R()(At.A,bt),At.A&&At.A.locals&&At.A.locals;var wt=n(49783),xt={};xt.styleTagTransform=z(),xt.setAttributes=D(),xt.insert=P().bind(null,"head"),xt.domAPI=j(),xt.insertStyleElement=U(),R()(wt.A,xt),wt.A&&wt.A.locals&&wt.A.locals;const Ct=(0,q.A)(yt,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,"d8dfb304",null).exports;var _t=n(87485),Et=n(1522);const St=(0,nt.C)("core","versionHash",""),kt=(0,d.pM)({name:"AccountMenuEntry",components:{NcListItem:Et.A,NcLoadingIcon:C.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=${St}`}},methods:{onClick(t){this.$emit("click",t),t.defaultPrevented||(this.loading=!0)}}});var Ot=n(51286),Tt={};Tt.styleTagTransform=z(),Tt.setAttributes=D(),Tt.insert=P().bind(null,"head"),Tt.domAPI=j(),Tt.insertStyleElement=U(),R()(Ot.A,Tt),Ot.A&&Ot.A.locals&&Ot.A.locals;const It=(0,q.A)(kt,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 Rt=n(77690),Mt=n(98469);const jt={name:"QrcodeScanIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Nt=(0,q.A)(jt,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 Pt=n(17816),Lt=n.n(Pt),Dt=n(55581),Bt=n(94219);const Ut=(0,d.pM)({__name:"AccountQRLoginDialog",props:{data:null},emits:["close"],setup(t,{emit:e}){const r=t,n=window.OC.theme.productName,o=[{label:(0,l.t)("spreed","Done"),variant:"primary",callback:()=>{}}],i=3===(r.data?.deviceToken?.type??1),a=(0,d.EW)(()=>{const t=r.data?.loginName??"",e=r.data?.token??"";return`nc://${i?"onetime-login":"login"}/user:${t}&password:${e}&server:${(0,u.$_)()}`}),s=(r.data?.deviceToken?.lastActivity?1e3*r.data.deviceToken.lastActivity:Date.now())+12e4,c=setTimeout(()=>{p("expired")},s-Date.now()),f=(0,Dt.SX)(s);function p(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:f,onClosing:p,QR:Lt(),t:l.t,NcDialog:Bt.A}}}),Ft=Ut;var zt=n(35644),Ht={};Ht.styleTagTransform=z(),Ht.setAttributes=D(),Ht.insert=P().bind(null,"head"),Ht.domAPI=j(),Ht.insertStyleElement=U(),R()(zt.A,Ht),zt.A&&zt.A.locals&&zt.A.locals;const Vt=(0,q.A)(Ft,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,Rt.IF)(c.Ay);const{profileEnabled:qt}=(0,nt.C)("user_status","profileEnabled",{profileEnabled:!1}),Wt=(0,_t.F)().core?.["can-create-app-token"]??!1,Gt=(0,d.pM)({name:"AccountMenuProfileEntry",components:{IconQrcodeScan:Nt,NcButton:A.A,NcListItem:Et.A,NcLoadingIcon:C.A},props:{id:{type:String,required:!0},name:{type:String,required:!0},href:{type:String,required:!0},active:{type:Boolean,required:!0}},setup:()=>({canCreateAppToken:Wt,displayName:(0,s.HW)().displayName,profileEnabled:qt,t:l.t}),data:()=>({loading:!1}),mounted(){(0,rt.B1)("settings:profile-enabled:updated",this.handleProfileEnabledUpdate),(0,rt.B1)("settings:display-name:updated",this.handleDisplayNameUpdate)},beforeDestroy(){(0,rt.al)("settings:profile-enabled:updated",this.handleProfileEnabledUpdate),(0,rt.al)("settings:display-name:updated",this.handleDisplayNameUpdate)},methods:{handleClick(){this.profileEnabled&&(this.loading=!0)},async handleQrCodeClick(){const{data:t}=await c.Ay.post((0,u.Jv)("/settings/personal/authtokens"),{qrcodeLogin:!0},{confirmPassword:Rt.mH.Strict});await(0,Mt.S)(Vt,{data:t})},handleProfileEnabledUpdate(t){this.profileEnabled=t},handleDisplayNameUpdate(t){this.displayName=t}}}),$t=Gt,Kt=(0,q.A)($t,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,Yt=[{type:"online",label:(0,l.t)("user_status","Online")},{type:"away",label:(0,l.t)("user_status","Away")},{type:"busy",label:(0,l.t)("user_status","Busy")},{type:"dnd",label:(0,l.t)("user_status","Do not disturb"),subline:(0,l.t)("user_status","Mute all notifications")},{type:"invisible",label:(0,l.t)("user_status","Invisible"),subline:(0,l.t)("user_status","Appear offline")}],Jt=(0,d.pM)({name:"AccountMenu",components:{AccountMenuEntry:It,AccountMenuProfileEntry:Kt,NcAvatar:O.A,NcHeaderMenu:w.A},setup(){const t=(0,nt.C)("core","settingsNavEntries",{}),{profile:e,...r}=t;return{currentDisplayName:(0,s.HW)()?.displayName??(0,s.HW)().uid,currentUserId:(0,s.HW)().uid,profileEntry:e,otherEntries:r,t:l.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,l.t)("core","Avatar of {displayName}",{displayName:this.currentDisplayName}),...Object.values(this.translatedUserStatus).filter(Boolean)].join(" — ")}},async created(){if(!(0,_t.F)()?.user_status?.enabled)return;const t=(0,u.KT)("/apps/user_status/api/v1/user_status");try{const e=await c.Ay.get(t),{status:r,icon:n,message:o}=e.data.ocs.data;this.userStatus={status:r,icon:n,message:o}}catch(t){$.error("Failed to load user status",{error:t})}this.showUserStatus=!0},mounted(){(0,rt.B1)("user_status:status.updated",this.handleUserStatusUpdated),(0,rt.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(Yt.map(({type:t,label:e})=>[t,e]));return e[t]?e[t]:t}}});var Qt=n(33096),Xt={};Xt.styleTagTransform=z(),Xt.setAttributes=D(),Xt.insert=P().bind(null,"head"),Xt.domAPI=j(),Xt.insertStyleElement=U(),R()(Qt.A,Xt),Qt.A&&Qt.A.locals&&Qt.A.locals;const Zt=(0,q.A)(Jt,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 te(){return document.head.dataset.requesttoken}const{auto_logout:ee,session_keepalive:re,session_lifetime:ne}=(0,nt.C)("core","config",{});async function oe(){try{await async function(){const t=(0,u.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,rt.Ic)("csrf-token-update",{token:t})}(r),r}()}catch(t){$.error("session heartbeat failed",{error:t})}}function ie(){const t=window.setInterval(oe,1e3*function(){const t=ne?Math.floor(ne/2):900;return Math.min(86400,Math.max(60,t))}());return $.info("session heartbeat polling started"),t}function ae(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,l.t)("core","Clipboard not available, please copy manually"),t),$.error("files Unable to copy to clipboard",{error:e})}document.body.removeChild(e)}function se(t){const e=window.location.protocol+"//"+window.location.host+(0,u.aU)();return t.startsWith(e)||function(t){return!t.startsWith("https://")&&!t.startsWith("http://")}(t)&&t.startsWith((0,u.aU)())}async function ce(){if(null!==(0,s.HW)()&&!0!==ce.running){ce.running=!0;try{const{status:t}=await window.fetch((0,u.Jv)("/apps/files"));401===t&&($.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);$.debug("Browser storages cleared")}catch(t){$.error("Could not clear browser storages",{error:t})}}(),window.location=(0,u.Jv)("/login?redirect_url={url}",{url:window.location.pathname+window.location.search+window.location.hash}))}catch(t){$.warn("Could not check login-state",{error:t})}finally{delete ce.running}}}const ue={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 le=(0,l.JK)();function fe(){var t;XMLHttpRequest.prototype.open=(t=XMLHttpRequest.prototype.open,function(e,r){t.apply(this,arguments),se(r)&&(this.getResponseHeader("X-Requested-With")||this.setRequestHeader("X-Requested-With","XMLHttpRequest"),this.addEventListener("loadend",function(){401===this.status&&ce()}))}),window.fetch=function(t){return async(e,r)=>{if(!se(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&&ce(),n}}(window.fetch),window.navigator?.clipboard?.writeText||($.info("Clipboard API not available, using fallback"),Object.defineProperty(window.navigator,"clipboard",{value:{writeText:ae},writable:!1})),function(){if(function(){if(!ee||!(0,s.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*(ne??86400);if(t{$.info("Browser is online again, resuming heartbeat"),t=ie();try{await oe(),$.info("Session token successfully updated after resuming network"),(0,rt.Ic)("networkOnline",{success:!0})}catch(t){$.error("could not update session token after resuming network",{error:t}),(0,rt.Ic)("networkOnline",{success:!1})}}),window.addEventListener("offline",()=>{$.info("Browser is offline, stopping heartbeat"),(0,rt.Ic)("networkOffline",{}),clearInterval(t),$.info("Session heartbeat polling stopped")})}(),function(){d.Ay.mixin({methods:{t:l.Tl,n:l.zw}});const t=document.getElementById("header-start__appmenu");if(!t)return;const e=new(d.Ay.extend(Ct))({}).$mount(t);Object.assign(OC,{setNavigationCounter(t,r){e.setNavigationCounter(t,r)}})}(),function(){const t=document.getElementById("user-menu");t&&new d.Ay({name:"AccountMenuRoot",el:t,render:t=>t(Zt)})}(),function(){const t=document.getElementById("contactsmenu");t&&(window.OC.ContactsMenu=new et,new d.Ay({name:"ContactsMenuRoot",el:t,render:t=>t(tt)}))}()}Object.hasOwn(ue,le)&&(le=ue[le]),p().locale(le);var pe=n(71225);const de=!!window._oc_isadmin,he=window.oc_appconfig||{},ve=void 0!==window._oc_appswebroots&&window._oc_appswebroots,ge=window._oc_config||{},me=document.getElementsByTagName("head")[0].getAttribute("data-user"),ye=document.getElementsByTagName("head")[0].getAttribute("data-user-displayname"),Ae=void 0!==me&&me,be=window._oc_debug;var we=n(21363),xe=n(85168),Ce=n(43627);const _e={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",_e.OK_BUTTON,r,n)},info:function(t,e,r,n){this.message(t,e,"info",_e.OK_BUTTON,r,n)},confirm:function(t,e,r,n){return this.message(t,e,"notice",_e.YES_NO_BUTTONS,r,n)},confirmDestructive:function(t,e,r=_e.OK_BUTTONS,n=()=>{}){return(new xe.ik).setName(e).setText(t).setButtons(r===_e.OK_BUTTONS?[{label:(0,l.t)("core","Yes"),variant:"error",callback:()=>{n.clicked=!0,n(!0)}}]:_e._getLegacyButtons(r,n)).build().show().then(()=>{n.clicked||n(!1)})},confirmHtml:function(t,e,r){return(new xe.ik).setName(e).setText("").setButtons([{label:(0,l.t)("core","No"),callback:()=>{}},{label:(0,l.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,Mt.S)((0,d.$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=xe.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,xe.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,Ce.basename)(r);return i===xe.bh.Choose&&n.push({callback:c(e,xe.bh.Choose),label:o&&!this.multiSelect?(0,l.t)("core","Choose {file}",{file:a}):(0,l.t)("core","Choose"),variant:"primary"}),i!==xe.bh.CopyMove&&i!==xe.bh.Copy||n.push({callback:c(e,xe.bh.Copy),label:a?(0,l.t)("core","Copy to {target}",{target:a}):(0,l.t)("core","Copy"),variant:"primary",icon:we}),i!==xe.bh.Move&&i!==xe.bh.CopyMove||n.push({callback:c(e,xe.bh.Move),label:a?(0,l.t)("core","Move to {target}",{target:a}):(0,l.t)("core","Move"),variant:i===xe.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 xe.ik).setName(e).setText(a?"":t).setButtons(_e._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 _e.YES_NO_BUTTONS:r.push({label:t?.cancel??(0,l.t)("core","No"),callback:()=>{e._clicked=!0,e(!1)}}),r.push({label:t?.confirm??(0,l.t)("core","Yes"),variant:"primary",callback:()=>{e._clicked=!0,e(!0)}});break;case _e.OK_BUTTONS:r.push({label:t?.confirm??(0,l.t)("core","OK"),variant:"primary",callback:()=>{e._clicked=!0,e(!0)}});break;default:$.error("Invalid call to OC.dialogs")}return r}},Ee=_e;function Se(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(te()),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")}},Ne={requiresPasswordConfirmation:()=>(0,Rt.oB)(),requirePasswordConfirmation(t,e,r){(0,Rt.C5)().then(t,r)}},Pe={_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 Ue={History:{_handlers:[],_pushState(t,e,r){let n;if(n="string"==typeof t?t:He.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=He.parseQueryString(this._decodeQuery(t))),{...e||{},...He.parseQueryString(this._decodeQuery(location.search))}},_onPopState(t){if(this._cancelPop)return void(this._cancelPop=!1);let e;if(this._handlers.length){e=t&&t.state,"string"==typeof e?e=He.parseQueryString(e):e||(e=this.parseUrlQuery()||{});for(let t=0;t(void 0===window.TESTING&&He.debug&&$.warn("OC.Util.formatDate is deprecated and will be removed in Nextcloud 21. See @nextcloud/moment"),e=e||"LLL",p()(t).format(e)),relativeModifiedDate(e){void 0===window.TESTING&&He.debug&&$.warn("OC.Util.relativeModifiedDate is deprecated and will be removed in Nextcloud 21. See @nextcloud/moment");const r=p()().diff(p()(e));return r>=0&&r<45e3?t("core","seconds ago"):p()(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=Be(t),o=Be(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],He.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:he,appswebroots:ve,config:ge,currentUser:Ae,dialogs:Ee,EventSource:ke,MimeType:o,getCurrentUser:function(){return{uid:Ae,displayName:ye}},isUserAdmin:()=>de,L10N:Oe,registerXHRForErrorProcessing:()=>{},getCapabilities:function(){return OC.debug&&$.warn("OC.getCapabilities is deprecated and will be removed in Nextcloud 21. See @nextcloud/capabilities"),(0,_t.F)()},basename:pe.P8,encodePath:pe.O0,dirname:pe.pD,isSamePath:pe.ys,joinPaths:pe.fj,getCanonicalLocale:l.lO,getLocale:l.JK,getLanguage:l.Z0,buildQueryString:function(t){return t?new URLSearchParams(t).toString():""},parseQueryString:function(t){const e=new URLSearchParams(t);return Object.fromEntries(e.entries())},msg:je,PasswordConfirmation:Ne,Plugins:Pe,theme:Le,Util:Ue,debug:be,filePath:u.fg,generateUrl:u.Jv,getRootPath:u.aU,imagePath:u.d0,requestToken:te(),linkTo:u.uM,linkToOCS:(t,e)=>(0,u.KT)(t,{},{ocsVersion:e||1})+"/",linkToRemote:u.dC,linkToRemoteBase:function(t){return(0,u.aU)()+"/remote.php/"+t},webroot:ze};(0,rt.B1)("csrf-token-update",t=>{OC.requestToken=t.token,$.info("OC.requestToken changed",{token:t.token})}),n(84315),n(7452);const Ve={disableKeyboardShortcuts:()=>(0,nt.C)("theming","shortcutsDisabled",!1),setPageHeading:function(t){const e=document.getElementById("page-heading-level-1");e&&(e.textContent=t)}};async function qe(t,e,r={}){"post"!==t&&"delete"!==t||!(0,Rt.oB)(Rt.mH.Lax)||await(0,Rt.C5)();try{const{data:n}=await c.Ay.request({method:t.toLowerCase(),url:(0,u.KT)("apps/provisioning_api/api/v1/config/apps")+e,data:r.data||{}});r.success?.(n.ocs.data)}catch(t){r.error?.(t)}}function We(t){qe("get","",t)}function Ge(t,e){qe("get","/"+t,e)}function $e(t,e,r,n){(n=n||{}).data={defaultValue:r},qe("get","/"+t+"/"+e,n)}function Ke(t,e,r,n){(n=n||{}).data={value:r},qe("post","/"+t+"/"+e,n)}function Ye(t,e,r){qe("delete","/"+t+"/"+e,r)}var Je=n(70580),Qe=n.n(Je);const Xe={},Ze={registerType(t,e){Xe[t]=e},trigger:t=>Xe[t].action(),getTypes:()=>Object.keys(Xe),getIcon:t=>Xe[t].typeIconClass||"",getLabel:t=>Qe()(Xe[t].typeString||t),getLink:(t,e)=>void 0!==Xe[t]?Xe[t].link(e):""},tr=/(\s|^)(https?:\/\/)([-A-Z0-9+_.]+(?::[0-9]+)?(?:\/[-A-Z0-9+&@#%?=~_|!:,.;()]*)*)(\s|$)/gi;function er(t){return nr(t)}function rr(t){return or(t)}function nr(t){return t.replace(tr,function(t,e,r,n,o){let i=n;return r?"http://"===r&&(i=r+n):r="https://",e+''+i+""+o})}function or(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 ir={},ar={},sr={loadScript(t,e){const r=t+e;return Object.hasOwn(ir,r)?Promise.resolve():(ir[r]=!0,new Promise(function(r,n){const o=(0,u.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(ar,r)?Promise.resolve():(ar[r]=!0,new Promise(function(r,n){const o=(0,u.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)}))}},cr={success:(t,e)=>(0,xe.Te)(t,e),warning:(t,e)=>(0,xe.I9)(t,e),error:(t,e)=>(0,xe.Qg)(t,e),info:(t,e)=>(0,xe.cf)(t,e),message:(t,e)=>(0,xe.rG)(t,e)},ur={Accessibility:Ve,AppConfig:i,Collaboration:Ze,Comments:a,InitialState:{loadState:nt.C},Loader:sr,Toast:cr};window.OC=He,function(t,e,r){(Array.isArray(t)?t:[t]).forEach(t=>{void 0!==window[t]&&delete window[t],Object.defineProperty(window,t,{get:()=>(function(...t){void 0===window.TESTING&&He.debug&&console.warn.apply(console,t)}(r?`${t} is deprecated: ${r}`:`${t} is deprecated`),fe)})})}("initCore",0,"this is an internal function"),window.OCP=ur,window.OCA={},window.t=l.t,window.n=l.n,n.nc=(0,s.aV)(),window.addEventListener("DOMContentLoaded",function(){fe(),window.history.pushState?window.onpopstate=He.Util.History._onPopState.bind(He.Util.History):window.onhashchange=He.Util.History._onPopState.bind(He.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,u.Jv)("/csrftoken"),e=await c.Ay.get(t);r.value=e.data.token}t.submit()})})},51286(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,".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},53628(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-icon[data-v-42bb03fc]{--app-icon-circle-size: calc(var(--default-grid-baseline) * 12);--app-icon-icon-size: calc(var(--app-icon-circle-size) * 7 / 12);--app-icon-bevel: inset 0 -1px 0 0 color-mix(in srgb, var(--color-primary-element-light), 10% var(--color-primary-element)), inset 0 -4px 6px -4px color-mix(in srgb, var(--color-primary-element-light), 16% var(--color-primary-element));box-sizing:border-box;position:relative;display:flex;align-items:center;justify-content:center;width:var(--app-icon-circle-size);height:var(--app-icon-circle-size);border-radius:50%;transform:scale(var(--app-icon-scale, 1));transition:transform var(--animation-quick) ease-out;background-color:var(--color-primary-element-light);background-image:linear-gradient(to bottom, color-mix(in srgb, var(--color-primary-element-light), 15% var(--color-main-background)) 0%, var(--color-primary-element-light) 100%);box-shadow:var(--app-icon-bevel)}@media(prefers-color-scheme: dark){.app-icon[data-v-42bb03fc]{--app-icon-bevel: none}}@media(prefers-reduced-motion: reduce){.app-icon[data-v-42bb03fc]{transition:none}}.app-icon__img[data-v-42bb03fc]{width:var(--app-icon-icon-size);height:var(--app-icon-icon-size);background-color:var(--color-primary-element);background-image:linear-gradient(to bottom, color-mix(in srgb, var(--color-primary-element), 28% var(--color-primary-element-light)) 0%, var(--color-primary-element) 100%);mask:var(--app-icon-url) center/contain no-repeat}@media(forced-colors: active){.app-icon__img[data-v-42bb03fc]{background-color:CanvasText;background-image:none}}.app-icon--outlined[data-v-42bb03fc]{background:rgba(0,0,0,0);background-image:none;box-shadow:inset 0 0 0 2px var(--color-border-maxcontrast)}.app-icon--outlined .app-icon__img[data-v-42bb03fc]{background-color:var(--color-main-text);background-image:none}[data-themes*=dark] .app-icon{--app-icon-bevel: none}[data-themes*=light] .app-icon{--app-icon-bevel: inset 0 -1px 0 0 color-mix(in srgb, var(--color-primary-element-light), 10% var(--color-primary-element)), inset 0 -4px 6px -4px color-mix(in srgb, var(--color-primary-element-light), 16% var(--color-primary-element))}","",{version:3,sources:["webpack://./core/src/components/AppIcon.vue"],names:[],mappings:"AAKA,2BACC,+DAAA,CAEA,gEAAA,CACA,2OAAA,CACA,qBAAA,CACA,iBAAA,CACA,YAAA,CACA,kBAAA,CACA,sBAAA,CACA,iCAAA,CACA,kCAAA,CACA,iBAAA,CACA,yCAAA,CACA,oDAAA,CACA,mDAAA,CACA,iLAAA,CAKA,gCAAA,CAEA,mCAvBD,2BAwBE,sBAAA,CAAA,CAGD,uCA3BD,2BA4BE,eAAA,CAAA,CAGD,gCACC,+BAAA,CACA,gCAAA,CAGA,6CAAA,CACA,2KAAA,CAKA,iDAAA,CAID,8BACC,gCACC,2BAAA,CACA,qBAAA,CAAA,CAIF,qCACC,wBAAA,CACA,qBAAA,CACA,0DAAA,CAGD,oDACC,uCAAA,CACA,qBAAA,CAKF,8BACC,sBAAA,CAGD,+BACC,2OAAA",sourcesContent:["\n$bevel:\n\tinset 0 -1px 0 0 color-mix(in srgb, var(--color-primary-element-light), 10% var(--color-primary-element)),\n\tinset 0 -4px 6px -4px color-mix(in srgb, var(--color-primary-element-light), 16% var(--color-primary-element));\n\n.app-icon {\n\t--app-icon-circle-size: calc(var(--default-grid-baseline) * 12);\n\t// 28px on a 48px circle, so it follows when consumers resize the circle.\n\t--app-icon-icon-size: calc(var(--app-icon-circle-size) * 7 / 12);\n\t--app-icon-bevel: #{$bevel};\n\tbox-sizing: border-box;\n\tposition: relative;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\twidth: var(--app-icon-circle-size);\n\theight: var(--app-icon-circle-size);\n\tborder-radius: 50%;\n\ttransform: scale(var(--app-icon-scale, 1));\n\ttransition: transform var(--animation-quick) ease-out;\n\tbackground-color: var(--color-primary-element-light);\n\tbackground-image: linear-gradient(\n\t\tto bottom,\n\t\tcolor-mix(in srgb, var(--color-primary-element-light), 15% var(--color-main-background)) 0%,\n\t\tvar(--color-primary-element-light) 100%\n\t);\n\tbox-shadow: var(--app-icon-bevel);\n\n\t@media (prefers-color-scheme: dark) {\n\t\t--app-icon-bevel: none;\n\t}\n\n\t@media (prefers-reduced-motion: reduce) {\n\t\ttransition: none;\n\t}\n\n\t&__img {\n\t\twidth: var(--app-icon-icon-size);\n\t\theight: var(--app-icon-icon-size);\n\t\t// Masked rather than shown: app icons ship a hardcoded fill, so\n\t\t// currentColor never applies and a filter could only flip black and white.\n\t\tbackground-color: var(--color-primary-element);\n\t\tbackground-image: linear-gradient(\n\t\t\tto bottom,\n\t\t\tcolor-mix(in srgb, var(--color-primary-element), 28% var(--color-primary-element-light)) 0%,\n\t\t\tvar(--color-primary-element) 100%\n\t\t);\n\t\tmask: var(--app-icon-url) center / contain no-repeat;\n\t}\n\n\t// Masked backgrounds are not force-adjusted the way is.\n\t@media (forced-colors: active) {\n\t\t&__img {\n\t\t\tbackground-color: CanvasText;\n\t\t\tbackground-image: none;\n\t\t}\n\t}\n\n\t&--outlined {\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 &__img {\n\t\tbackground-color: var(--color-main-text);\n\t\tbackground-image: none;\n\t}\n}\n\n// An explicit theme choice must beat the media query above, which only sees the OS.\n:global([data-themes*=dark] .app-icon) {\n\t--app-icon-bevel: none;\n}\n\n:global([data-themes*=light] .app-icon) {\n\t--app-icon-bevel: #{$bevel};\n}\n"],sourceRoot:""}]);const s=a},12481(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-5ea5a006]{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-5ea5a006]:focus-visible{outline:none;box-shadow:inset 0 0 0 2px var(--color-primary-element)}.app-item[data-v-5ea5a006]:hover,.app-item[data-v-5ea5a006]:focus-visible{--app-icon-scale: 1.08}.app-item[data-v-5ea5a006]:active{--app-icon-scale: 0.96}.app-item__unread[data-v-5ea5a006]{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-5ea5a006]{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-5ea5a006]{font-weight:bold}","",{version:3,sources:["webpack://./core/src/components/AppItem.vue"],names:[],mappings:"AACA,2BACC,YAAA,CACA,qBAAA,CACA,kBAAA,CACA,gCAAA,CAEA,0CAAA,CACA,0CAAA,CACA,oBAAA,CACA,4BAAA,CACA,WAAA,CAKA,yCACC,YAAA,CACA,uDAAA,CAGD,0EAEC,sBAAA,CAGD,kCACC,sBAAA,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",sourcesContent:["\n.app-item {\n\tdisplay: flex;\n\tflex-direction: column;\n\talign-items: center;\n\tgap: var(--default-grid-baseline);\n\t// Keeps the grown circle and the focus ring off the tile's 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// 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 tile's own bounds.\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&:hover,\n\t&:focus-visible {\n\t\t--app-icon-scale: 1.08;\n\t}\n\n\t&:active {\n\t\t--app-icon-scale: 0.96;\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"],sourceRoot:""}]);const s=a},47559(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-d8dfb304]{display:flex;align-items:center}.app-menu__waffle[data-v-d8dfb304]{--color-main-text: var(--color-background-plain-text);color:var(--color-background-plain-text)}.app-menu__waffle[data-v-d8dfb304]:hover:not(:disabled){background-color:rgba(0,0,0,.1) !important}.app-menu__waffle[data-v-d8dfb304]:active:not(:disabled){background-color:rgba(0,0,0,.15) !important}.app-menu__waffle[data-v-d8dfb304]: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-d8dfb304]{--color-main-text: var(--color-background-plain-text);color:var(--color-background-plain-text)}.app-menu__current-app[data-v-d8dfb304]:hover:not(:disabled){background-color:rgba(0,0,0,.1) !important}.app-menu__current-app[data-v-d8dfb304]:active:not(:disabled){background-color:rgba(0,0,0,.15) !important}.app-menu__current-app[data-v-d8dfb304]: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-d8dfb304] .button-vue__text{min-width:0}@media only screen and (max-width: 1024px){.app-menu__current-app[data-v-d8dfb304]{display:none !important}}.app-menu__current-app-icon[data-v-d8dfb304]{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-d8dfb304]{mask:var(--header-menu-icon-mask)}.app-menu__current-app-name[data-v-d8dfb304]{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-d8dfb304]{max-width:calc(100vw - var(--default-grid-baseline)*4);background-color:var(--color-main-background)}.app-menu__grid[data-v-d8dfb304]{--app-item-col-width: 69px;--app-item-row-height: 72px;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;overflow-x:hidden}.app-menu__grid[data-v-d8dfb304]>:nth-child(-n+4){padding-block-start:calc(var(--default-grid-baseline)*2) !important}.app-menu__grid[data-v-d8dfb304]{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,CACA,iBAAA,CAKA,kDACC,mEAAA,CAlBF,iCAuBC,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