nextcloud/dist/profile-main.mjs.map
Ferdinand Thiessen b4b5986be9 chore: compile assets
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2026-01-27 23:52:40 +01:00

1 line
No EOL
26 KiB
Text

{"version":3,"file":"profile-main.mjs","sources":["../node_modules/vue-material-design-icons/AccountOutline.vue","../node_modules/vue-material-design-icons/MapMarker.vue","../build/frontend/apps/profile/src/components/ProfileSection.vue","../build/frontend/apps/profile/src/views/ProfileApp.vue","../build/frontend/apps/profile/src/services/logger.ts","../build/frontend/apps/profile/src/services/ProfileSections.ts","../build/frontend/apps/profile/src/main.ts"],"sourcesContent":["<template>\n <span v-bind=\"$attrs\"\n :aria-hidden=\"title ? null : 'true'\"\n :aria-label=\"title\"\n class=\"material-design-icon account-outline-icon\"\n role=\"img\"\n @click=\"$emit('click', $event)\">\n <svg :fill=\"fillColor\"\n class=\"material-design-icon__svg\"\n :width=\"size\"\n :height=\"size\"\n viewBox=\"0 0 24 24\">\n <path d=\"M12,4A4,4 0 0,1 16,8A4,4 0 0,1 12,12A4,4 0 0,1 8,8A4,4 0 0,1 12,4M12,6A2,2 0 0,0 10,8A2,2 0 0,0 12,10A2,2 0 0,0 14,8A2,2 0 0,0 12,6M12,13C14.67,13 20,14.33 20,17V20H4V17C4,14.33 9.33,13 12,13M12,14.9C9.03,14.9 5.9,16.36 5.9,17V18.1H18.1V17C18.1,16.36 14.97,14.9 12,14.9Z\">\n <title v-if=\"title\">{{ title }}</title>\n </path>\n </svg>\n </span>\n</template>\n\n<script>\nexport default {\n name: \"AccountOutlineIcon\",\n emits: ['click'],\n props: {\n title: {\n type: String,\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n}\n</script>","<template>\n <span v-bind=\"$attrs\"\n :aria-hidden=\"title ? null : 'true'\"\n :aria-label=\"title\"\n class=\"material-design-icon map-marker-icon\"\n role=\"img\"\n @click=\"$emit('click', $event)\">\n <svg :fill=\"fillColor\"\n class=\"material-design-icon__svg\"\n :width=\"size\"\n :height=\"size\"\n viewBox=\"0 0 24 24\">\n <path d=\"M12,11.5A2.5,2.5 0 0,1 9.5,9A2.5,2.5 0 0,1 12,6.5A2.5,2.5 0 0,1 14.5,9A2.5,2.5 0 0,1 12,11.5M12,2A7,7 0 0,0 5,9C5,14.25 12,22 12,22C12,22 19,14.25 19,9A7,7 0 0,0 12,2Z\">\n <title v-if=\"title\">{{ title }}</title>\n </path>\n </svg>\n </span>\n</template>\n\n<script>\nexport default {\n name: \"MapMarkerIcon\",\n emits: ['click'],\n props: {\n title: {\n type: String,\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n}\n</script>","<!--\n - SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<script setup lang=\"ts\">\nimport type { IProfileSection } from '../services/ProfileSections.ts'\n\ndefineProps<{\n\tsection: IProfileSection\n\tuserId: string | undefined\n}>()\n</script>\n\n<template>\n\t<div :class=\"$style.profileSection\">\n\t\t<component\n\t\t\t:is=\"section.tagName\"\n\t\t\tv-bind.prop=\"section.params\"\n\t\t\t:user.prop=\"userId\" />\n\t</div>\n</template>\n\n<style module>\n.profileSection {\n\tmargin-top: 2rem;\n}\n</style>\n","<!--\n - SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<script setup lang=\"ts\">\nimport type { IProfileSection } from '../services/ProfileSections.ts'\n\nimport { getCurrentUser } from '@nextcloud/auth'\nimport { showError } from '@nextcloud/dialogs'\nimport { subscribe, unsubscribe } from '@nextcloud/event-bus'\nimport { loadState } from '@nextcloud/initial-state'\nimport { translate as t } from '@nextcloud/l10n'\nimport { generateUrl } from '@nextcloud/router'\nimport { computed, onBeforeMount, onBeforeUnmount, onMounted, ref } from 'vue'\nimport NcActionLink from '@nextcloud/vue/components/NcActionLink'\nimport NcActions from '@nextcloud/vue/components/NcActions'\nimport NcAppContent from '@nextcloud/vue/components/NcAppContent'\nimport NcAvatar from '@nextcloud/vue/components/NcAvatar'\nimport NcButton from '@nextcloud/vue/components/NcButton'\nimport NcContent from '@nextcloud/vue/components/NcContent'\nimport NcEmptyContent from '@nextcloud/vue/components/NcEmptyContent'\nimport NcRichText from '@nextcloud/vue/components/NcRichText'\nimport AccountIcon from 'vue-material-design-icons/AccountOutline.vue'\nimport MapMarkerIcon from 'vue-material-design-icons/MapMarker.vue'\nimport PencilIcon from 'vue-material-design-icons/PencilOutline.vue'\nimport ProfileSection from '../components/ProfileSection.vue'\n\ninterface IProfileAction {\n\ttarget: string\n\ticon: string\n\tid: string\n\ttitle: string\n}\n\ninterface IStatus {\n\ticon: string\n\tmessage: string\n\tuserId: string\n}\n\nconst profileParameters = loadState('profile', 'profileParameters', {\n\tuserId: undefined as string | undefined,\n\tdisplayname: undefined as string | undefined,\n\taddress: undefined as string | undefined,\n\torganisation: undefined as string | undefined,\n\trole: undefined as string | undefined,\n\theadline: undefined as string | undefined,\n\tbiography: undefined as string | undefined,\n\tactions: [] as IProfileAction[],\n\tisUserAvatarVisible: false,\n\tpronouns: undefined as string | undefined,\n})\n\nconst userStatus = ref(loadState<Partial<IStatus>>('profile', 'status', {}))\nconst sections = ref<IProfileSection[]>([])\nconst sortedSections = computed(() => [...sections.value].sort((a, b) => b.order - a.order))\nonBeforeMount(() => {\n\tsections.value = window.OCA.Profile.ProfileSections.getSections()\n})\n\nconst isCurrentUser = getCurrentUser()?.uid === profileParameters.userId\n\nconst primaryAction = profileParameters.actions[0]\nconst otherActions = profileParameters.actions.slice(1)\n\nconst settingsUrl = generateUrl('/settings/user')\nconst emptyProfileMessage = isCurrentUser\n\t? t('profile', 'You have not added any info yet')\n\t: t('profile', '{user} has not added any info yet', { user: (profileParameters.displayname || profileParameters.userId || '') })\n\nonMounted(() => {\n\t// Set the user's displayname or userId in the page title and preserve the default title of \"Nextcloud\" at the end\n\tdocument.title = `${profileParameters.displayname || profileParameters.userId} - ${document.title}`\n\tsubscribe('user_status:status.updated', handleStatusUpdate)\n})\n\nonBeforeUnmount(() => {\n\tunsubscribe('user_status:status.updated', handleStatusUpdate)\n})\n\n/**\n * Update the user status\n *\n * @param status - The new status\n */\nfunction handleStatusUpdate(status: IStatus) {\n\tif (isCurrentUser && status.userId === profileParameters.userId) {\n\t\tuserStatus.value = status\n\t}\n}\n\n/**\n * Open the user status modal by simulating a click on the hidden status menu item in the avatar menu\n */\nfunction openStatusModal() {\n\t// Changing the user status is only enabled if you are the current user\n\tif (!isCurrentUser) {\n\t\treturn\n\t}\n\n\tconst statusMenuItem = document.querySelector<HTMLButtonElement>('.user-status-menu-item')\n\tif (statusMenuItem) {\n\t\tstatusMenuItem.click()\n\t} else {\n\t\tshowError(t('profile', 'Error opening the user status modal, try hard refreshing the page'))\n\t}\n}\n</script>\n\n<template>\n\t<NcContent appName=\"profile\">\n\t\t<NcAppContent>\n\t\t\t<div class=\"profile__header\">\n\t\t\t\t<div class=\"profile__header__container\">\n\t\t\t\t\t<div class=\"profile__header__container__placeholder\" />\n\t\t\t\t\t<div class=\"profile__header__container__displayname\">\n\t\t\t\t\t\t<h2>{{ profileParameters.displayname || profileParameters.userId }}</h2>\n\t\t\t\t\t\t<span v-if=\"profileParameters.pronouns\">·</span>\n\t\t\t\t\t\t<span v-if=\"profileParameters.pronouns\" class=\"profile__header__container__pronouns\">{{ profileParameters.pronouns }}</span>\n\t\t\t\t\t\t<NcButton\n\t\t\t\t\t\t\tv-if=\"isCurrentUser\"\n\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\t:href=\"settingsUrl\">\n\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t<PencilIcon :size=\"20\" />\n\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t\t{{ t('profile', 'Edit Profile') }}\n\t\t\t\t\t\t</NcButton>\n\t\t\t\t\t</div>\n\t\t\t\t\t<NcButton\n\t\t\t\t\t\tv-if=\"userStatus.icon || userStatus.message\"\n\t\t\t\t\t\t:disabled=\"!isCurrentUser\"\n\t\t\t\t\t\t:variant=\"isCurrentUser ? 'tertiary' : 'tertiary-no-background'\"\n\t\t\t\t\t\t@click=\"openStatusModal\">\n\t\t\t\t\t\t{{ userStatus.icon }} {{ userStatus.message }}\n\t\t\t\t\t</NcButton>\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t<div class=\"profile__wrapper\">\n\t\t\t\t<div class=\"profile__content\">\n\t\t\t\t\t<div class=\"profile__sidebar\">\n\t\t\t\t\t\t<NcAvatar\n\t\t\t\t\t\t\tclass=\"avatar\"\n\t\t\t\t\t\t\t:class=\"{ interactive: isCurrentUser }\"\n\t\t\t\t\t\t\t:user=\"profileParameters.userId\"\n\t\t\t\t\t\t\t:size=\"180\"\n\t\t\t\t\t\t\t:disableMenu=\"true\"\n\t\t\t\t\t\t\t:disableTooltip=\"true\"\n\t\t\t\t\t\t\t:isNoUser=\"!profileParameters.isUserAvatarVisible\"\n\t\t\t\t\t\t\t@click.prevent.stop=\"openStatusModal\" />\n\n\t\t\t\t\t\t<div class=\"user-actions\">\n\t\t\t\t\t\t\t<!-- When a tel: URL is opened with target=\"_blank\", a blank new tab is opened which is inconsistent with the handling of other URLs so we set target=\"_self\" for the phone action -->\n\t\t\t\t\t\t\t<NcButton\n\t\t\t\t\t\t\t\tv-if=\"primaryAction\"\n\t\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\t\tclass=\"user-actions__primary\"\n\t\t\t\t\t\t\t\t:href=\"primaryAction.target\"\n\t\t\t\t\t\t\t\t:icon=\"primaryAction.icon\"\n\t\t\t\t\t\t\t\t:target=\"primaryAction.id === 'phone' ? '_self' : '_blank'\">\n\t\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t\t<!-- Fix for https://github.com/nextcloud-libraries/nextcloud-vue/issues/2315 -->\n\t\t\t\t\t\t\t\t\t<img :src=\"primaryAction.icon\" alt=\"\" class=\"user-actions__primary__icon\">\n\t\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t\t\t{{ primaryAction.title }}\n\t\t\t\t\t\t\t</NcButton>\n\t\t\t\t\t\t\t<NcActions class=\"user-actions__other\" :inline=\"4\">\n\t\t\t\t\t\t\t\t<NcActionLink\n\t\t\t\t\t\t\t\t\tv-for=\"action in otherActions\"\n\t\t\t\t\t\t\t\t\t:key=\"action.id\"\n\t\t\t\t\t\t\t\t\t:closeAfterClick=\"true\"\n\t\t\t\t\t\t\t\t\t:href=\"action.target\"\n\t\t\t\t\t\t\t\t\t:target=\"action.id === 'phone' ? '_self' : '_blank'\">\n\t\t\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t\t\t<!-- Fix for https://github.com/nextcloud-libraries/nextcloud-vue/issues/2315 -->\n\t\t\t\t\t\t\t\t\t\t<img :src=\"action.icon\" alt=\"\" class=\"user-actions__other__icon\">\n\t\t\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t\t\t\t{{ action.title }}\n\t\t\t\t\t\t\t\t</NcActionLink>\n\t\t\t\t\t\t\t</NcActions>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div class=\"profile__blocks\">\n\t\t\t\t\t\t<div v-if=\"profileParameters.organisation || profileParameters.role || profileParameters.address\" class=\"profile__blocks-details\">\n\t\t\t\t\t\t\t<div v-if=\"profileParameters.organisation || profileParameters.role\" class=\"detail\">\n\t\t\t\t\t\t\t\t<p>{{ profileParameters.organisation }} <span v-if=\"profileParameters.organisation && profileParameters.role\">•</span> {{ profileParameters.role }}</p>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div v-if=\"profileParameters.address\" class=\"detail\">\n\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t<MapMarkerIcon\n\t\t\t\t\t\t\t\t\t\tclass=\"map-icon\"\n\t\t\t\t\t\t\t\t\t\t:size=\"16\" />\n\t\t\t\t\t\t\t\t\t{{ profileParameters.address }}\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<template v-if=\"profileParameters.headline || profileParameters.biography || sections.length > 0\">\n\t\t\t\t\t\t\t<h3 v-if=\"profileParameters.headline\" class=\"profile__blocks-headline\">\n\t\t\t\t\t\t\t\t{{ profileParameters.headline }}\n\t\t\t\t\t\t\t</h3>\n\t\t\t\t\t\t\t<NcRichText v-if=\"profileParameters.biography\" :text=\"profileParameters.biography\" useExtendedMarkdown />\n\n\t\t\t\t\t\t\t<!-- additional entries, use it with cautious -->\n\t\t\t\t\t\t\t<ProfileSection\n\t\t\t\t\t\t\t\tv-for=\"section in sortedSections\"\n\t\t\t\t\t\t\t\t:key=\"section.id\"\n\t\t\t\t\t\t\t\t:section=\"section\"\n\t\t\t\t\t\t\t\t:userId=\"profileParameters.userId\" />\n\t\t\t\t\t\t</template>\n\t\t\t\t\t\t<NcEmptyContent\n\t\t\t\t\t\t\tv-else\n\t\t\t\t\t\t\tclass=\"profile__blocks-empty-info\"\n\t\t\t\t\t\t\t:name=\"emptyProfileMessage\"\n\t\t\t\t\t\t\t:description=\"t('profile', 'The headline and about sections will show up here')\">\n\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t<AccountIcon :size=\"60\" />\n\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t</NcEmptyContent>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</NcAppContent>\n\t</NcContent>\n</template>\n\n<style lang=\"scss\" scoped>\n$profile-max-width: 1024px;\n$content-max-width: 640px;\n\n:deep(#app-content-vue) {\n\tbackground-color: unset;\n}\n\n.profile {\n\twidth: 100%;\n\toverflow-y: auto;\n\n\t&__header {\n\t\tdisplay: flex;\n\t\tposition: sticky;\n\t\theight: 190px;\n\t\ttop: -40px;\n\t\tbackground-color: var(--color-main-background-blur);\n\t\tbackdrop-filter: var(--filter-background-blur);\n\t\t-webkit-backdrop-filter: var(--filter-background-blur);\n\n\t\t&__container {\n\t\t\talign-self: flex-end;\n\t\t\twidth: 100%;\n\t\t\tmax-width: $profile-max-width;\n\t\t\tmargin: 8px auto;\n\t\t\trow-gap: 8px;\n\t\t\tdisplay: grid;\n\t\t\tgrid-template-rows: max-content max-content;\n\t\t\tgrid-template-columns: 240px 1fr;\n\t\t\tjustify-content: center;\n\n\t\t\t&__placeholder {\n\t\t\t\tgrid-row: 1 / 3;\n\t\t\t}\n\n\t\t\t&__displayname {\n\t\t\t\tpadding-inline: 16px; // same as the status text button, see NcButton\n\t\t\t\twidth: $content-max-width;\n\t\t\t\theight: 45px;\n\t\t\t\tmargin-block: 125px 0;\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\t\t\t\tgap: 18px;\n\n\t\t\t\th2 {\n\t\t\t\t\tfont-size: 30px;\n\t\t\t\t\tmargin: 0;\n\t\t\t\t}\n\n\t\t\t\tspan {\n\t\t\t\t\tfont-size: 20px;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t&__sidebar {\n\t\tposition: sticky;\n\t\ttop: 0;\n\t\talign-self: flex-start;\n\t\tpadding-top: 20px;\n\t\tmin-width: 220px;\n\t\tmargin-block: -150px 0;\n\t\tmargin-inline: 0 20px;\n\n\t\t// Specificity hack is needed to override Avatar component styles\n\t\t:deep(.avatar.avatardiv) {\n\t\t\ttext-align: center;\n\t\t\tmargin: auto;\n\t\t\tdisplay: block;\n\t\t\tpadding: 8px;\n\n\t\t\t&.interactive {\n\t\t\t\t.avatardiv__user-status {\n\t\t\t\t\t// Show that the status is interactive\n\t\t\t\t\tcursor: pointer;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t.avatardiv__user-status {\n\t\t\t\tinset-inline-end: 14px;\n\t\t\t\tbottom: 14px;\n\t\t\t\twidth: 34px;\n\t\t\t\theight: 34px;\n\t\t\t\tbackground-size: 28px;\n\t\t\t\tborder: none;\n\t\t\t\t// Styles when custom status icon and status text are set\n\t\t\t\tbackground-color: var(--color-main-background);\n\t\t\t\tline-height: 34px;\n\t\t\t\tfont-size: 20px;\n\t\t\t}\n\t\t}\n\t}\n\n\t&__wrapper {\n\t\tbackground-color: var(--color-main-background);\n\t\tmin-height: 100%;\n\t}\n\n\t&__content {\n\t\tmax-width: $profile-max-width;\n\t\tmargin: 0 auto;\n\t\tdisplay: flex;\n\t\twidth: 100%;\n\t}\n\n\t&__blocks {\n\t\tmargin: 18px 0 80px 0;\n\t\tdisplay: grid;\n\t\tgap: 16px 0;\n\t\twidth: $content-max-width;\n\n\t\tp, h3 {\n\t\t\tcursor: text;\n\t\t\toverflow-wrap: anywhere;\n\t\t}\n\n\t\t&-details {\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\tgap: 2px 0;\n\n\t\t\t.detail {\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tcolor: var(--color-text-maxcontrast);\n\n\t\t\t\tp .map-icon {\n\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t\tvertical-align: middle;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t&-headline {\n\t\t\tmargin-inline: 0;\n\t\t\tmargin-block: 10px 0;\n\t\t\tfont-weight: bold;\n\t\t\tfont-size: 20px;\n\t\t}\n\t}\n}\n\n@media only screen and (max-width: 1024px) {\n\t.profile {\n\t\t&__header {\n\t\t\theight: 250px;\n\t\t\tposition: unset;\n\n\t\t\t&__container {\n\t\t\t\tgrid-template-columns: unset;\n\t\t\t\tmargin-bottom: 110px;\n\n\t\t\t\t&__displayname {\n\t\t\t\t\tmargin: 80px 20px 0px 0px!important;\n\t\t\t\t\twidth: unset;\n\t\t\t\t\ttext-align: center;\n\t\t\t\t\tpadding-inline: 12px;\n\t\t\t\t}\n\n\t\t\t\t&__edit-button {\n\t\t\t\t\twidth: fit-content;\n\t\t\t\t\tdisplay: block;\n\t\t\t\t\tmargin: 60px auto;\n\t\t\t\t}\n\n\t\t\t\t&__status-text {\n\t\t\t\t\tmargin: 4px auto;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t&__content {\n\t\t\tdisplay: block;\n\n\t\t\t .avatar {\n\t\t\t\t// Overlap avatar to top header\n\t\t\t\tmargin-top: -110px !important;\n\t\t\t }\n\t\t}\n\n\t\t&__blocks {\n\t\t\twidth: unset;\n\t\t\tmax-width: 600px;\n\t\t\tmargin: 0 auto;\n\t\t\tpadding: 20px 50px 50px 50px;\n\t\t}\n\n\t\t&__sidebar {\n\t\t\tmargin: unset;\n\t\t\tposition: unset;\n\t\t}\n\t}\n}\n\n.user-actions {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 8px 0;\n\tmargin-top: 20px;\n\tmax-width: 300px;\n\n\t&__primary {\n\t\tmargin: 0 auto;\n\t\tmax-width: 100%;\n\n\t\t&__icon {\n\t\t\tfilter: var(--primary-invert-if-dark);\n\t\t}\n\t}\n\n\t&__other {\n\t\tdisplay: flex;\n\t\tjustify-content: center;\n\t\tgap: 0 4px;\n\n\t\t&__icon {\n\t\t\theight: 20px;\n\t\t\twidth: 20px;\n\t\t\tobject-fit: contain;\n\t\t\tfilter: var(--background-invert-if-dark);\n\t\t\talign-self: center;\n\t\t\tmargin: 12px; // so we get 44px x 44px\n\t\t}\n\t}\n}\n</style>\n","/*\n * SPDX-FileCopyrightText: Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { getLoggerBuilder } from '@nextcloud/logger'\n\nexport const logger = getLoggerBuilder()\n\t.setApp('profile')\n\t.detectLogLevel()\n\t.build()\n","/**\n * SPDX-FileCopyrightText: Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { logger } from './logger.ts'\n\nexport interface IProfileSection {\n\t/**\n\t * Unique identifier for the section\n\t */\n\tid: string\n\t/**\n\t * The order in which the section should appear\n\t */\n\torder: number\n\t/**\n\t * The custom element tag name to be used for this section\n\t *\n\t * The custom element must have been registered beforehand,\n\t * and must have the a `user` property of type `string | undefined`.\n\t *\n\t * @see https://developer.mozilla.org/en-US/docs/Web/API/Web_components\n\t */\n\ttagName: string\n\t/**\n\t * Static parameters to be passed to the custom web component\n\t */\n\tparams?: Record<string, unknown>\n}\n\nexport default class ProfileSections {\n\t#sections: Map<string, IProfileSection>\n\n\tconstructor() {\n\t\tthis.#sections = new Map()\n\t}\n\n\t/**\n\t * @param section To be called to mount the section to the profile page\n\t */\n\tregisterSection(section: IProfileSection) {\n\t\tif (this.#sections.has(section.id)) {\n\t\t\tlogger.warn(`Profile section with id '${section.id}' is already registered.`)\n\t\t}\n\t\tthis.#sections.set(section.id, section)\n\t}\n\n\tgetSections() {\n\t\treturn [...this.#sections.values()]\n\t}\n}\n","/*\n * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { createApp } from 'vue'\nimport ProfileApp from './views/ProfileApp.vue'\nimport ProfileSections from './services/ProfileSections.js'\n\nimport 'vite/modulepreload-polyfill'\n\nwindow.OCA.Profile ??= {}\nwindow.OCA.Profile.ProfileSections = new ProfileSections()\n\nconst app = createApp(ProfileApp)\napp.mount('#content')\n"],"names":["_sfc_main","_hoisted_3","_createElementBlock","_mergeProps","_ctx","$props","_cache","$event","_createElementVNode","_openBlock","_normalizeClass","$style","_createBlock","_resolveDynamicComponent","__props","profileParameters","loadState","userStatus","ref","sections","sortedSections","computed","a","b","onBeforeMount","isCurrentUser","getCurrentUser","primaryAction","otherActions","settingsUrl","generateUrl","emptyProfileMessage","t","onMounted","subscribe","handleStatusUpdate","onBeforeUnmount","unsubscribe","status","openStatusModal","statusMenuItem","showError","_unref","NcContent","_createVNode","NcAppContent","_hoisted_1","_hoisted_2","_hoisted_5","_toDisplayString","NcButton","PencilIcon","_createTextVNode","_hoisted_6","_hoisted_7","_hoisted_8","NcAvatar","_hoisted_9","NcActions","_Fragment","_renderList","action","NcActionLink","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_16","MapMarkerIcon","_hoisted_17","NcRichText","section","ProfileSection","NcEmptyContent","AccountIcon","logger","getLoggerBuilder","ProfileSections","#sections","app","createApp","ProfileApp"],"mappings":"u8CAoBA,MAAKA,GAAU,CACb,KAAM,qBACN,MAAO,CAAC,OAAO,EACf,MAAO,CACL,MAAO,CACL,KAAM,QAER,UAAW,CACT,KAAM,OACN,QAAS,gBAEX,KAAM,CACJ,KAAM,OACN,QAAS,EACX,CACF,CACF,+DAxBYC,GAAA,CAAA,EAAE,gRAAgR,iDAX5RC,EAeO,OAfPC,EAAcC,EAAA,OAAM,CACb,cAAaC,EAAA,MAAK,KAAA,OAClB,aAAYA,EAAA,MACb,MAAM,4CACN,KAAK,MACJ,QAAKC,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAAC,GAAEH,EAAA,MAAK,QAAUG,CAAM,WACjCL,EAQM,MAAA,CARA,KAAMG,EAAA,UACP,MAAM,4BACL,MAAOA,EAAA,KACP,OAAQA,EAAA,KACT,QAAQ,cACXG,EAEO,OAFPP,GAEO,CADQI,EAAA,OAAbI,EAAA,EAAAP,EAAuC,aAAhBG,EAAA,KAAK,EAAA,CAAA,6DCO/BL,GAAU,CACb,KAAM,gBACN,MAAO,CAAC,OAAO,EACf,MAAO,CACL,MAAO,CACL,KAAM,QAER,UAAW,CACT,KAAM,OACN,QAAS,gBAEX,KAAM,CACJ,KAAM,OACN,QAAS,EACX,CACF,CACF,+DAxBYC,GAAA,CAAA,EAAE,yKAAyK,iDAXrLC,EAeO,OAfPC,EAAcC,EAAA,OAAM,CACb,cAAaC,EAAA,MAAK,KAAA,OAClB,aAAYA,EAAA,MACb,MAAM,uCACN,KAAK,MACJ,QAAKC,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAAC,GAAEH,EAAA,MAAK,QAAUG,CAAM,WACjCL,EAQM,MAAA,CARA,KAAMG,E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