/*! For license information please see core-profile.js.LICENSE.txt */ !function(){"use strict";var n,e={79335:function(n,e,a){var r,i=a(20144),o=a(22200),A=a(9944),s=a(34741),l=a(17499),c=null===(r=(0,o.getCurrentUser)())?(0,l.IY)().setApp("core").build():(0,l.IY)().setApp("core").setUid(r.uid).build(),d=a(78595),p=a(16453),C=a(79753),u=a(26932),_=a(75925),f=a.n(_),v=a(12945),g=a.n(v),h=a(76212),m=a.n(h),x=a(93050),b=a(91482),y=a(1203),k={name:"PrimaryActionButton",props:{disabled:{type:Boolean,default:!1},href:{type:String,required:!0},icon:{type:String,required:!0},target:{type:String,required:!0,validator:function(t){return["_self","_blank","_parent","_top"].includes(t)}}},computed:{colorPrimaryText:function(){return getComputedStyle(document.body).getPropertyValue("--color-primary-text").trim()}}},w=a(93379),B=a.n(w),E=a(7795),D=a.n(E),S=a(90569),P=a.n(S),I=a(3565),O=a.n(I),U=a(19216),z=a.n(U),Z=a(44589),j=a.n(Z),M=a(53155),G={};G.styleTagTransform=j(),G.setAttributes=O(),G.insert=P().bind(null,"head"),G.domAPI=D(),G.insertStyleElement=z(),B()(M.Z,G),M.Z&&M.Z.locals&&M.Z.locals;var T=a(51900),W=(0,T.Z)(k,(function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("a",t._g({staticClass:"profile__primary-action-button",class:{disabled:t.disabled},attrs:{href:t.href,target:t.target,rel:"noopener noreferrer nofollow"}},t.$listeners),[e("img",{staticClass:"icon",class:[t.icon,{"icon-invert":"#ffffff"===t.colorPrimaryText}],attrs:{src:t.icon}}),t._v(" "),t._t("default")],2)}),[],!1,null,"35d5c4b6",null).exports,Y=(0,p.loadState)("core","status",{}),q=(0,p.loadState)("core","profileParameters",{userId:null,displayname:null,address:null,organisation:null,role:null,headline:null,biography:null,actions:[],isUserAvatarVisible:!1}),$=q.userId,F=q.displayname,N=q.address,K=q.organisation,L=q.role,R=q.headline,V=q.biography,H=q.actions,J=q.isUserAvatarVisible,Q={name:"Profile",components:{AccountIcon:y.Z,NcActionLink:m(),NcActions:g(),NcAvatar:f(),MapMarkerIcon:x.Z,PencilIcon:b.default,PrimaryActionButton:W},data:function(){return{status:Y,userId:$,displayname:F,address:N,organisation:K,role:L,headline:R,biography:V,actions:H,isUserAvatarVisible:J,sections:OCA.Core.ProfileSections.getSections()}},computed:{isCurrentUser:function(){var t;return(null===(t=(0,o.getCurrentUser)())||void 0===t?void 0:t.uid)===this.userId},allActions:function(){return this.actions},primaryAction:function(){return this.allActions.length?this.allActions[0]:null},middleActions:function(){return this.allActions.slice(1,4).length?this.allActions.slice(1,4):null},otherActions:function(){return this.allActions.slice(4).length?this.allActions.slice(4):null},settingsUrl:function(){return(0,C.generateUrl)("/settings/user")},colorMainBackground:function(){return getComputedStyle(document.body).getPropertyValue("--color-main-background").trim()},emptyProfileMessage:function(){return this.isCurrentUser?t("core","You have not added any info yet"):t("core","{user} has not added any info yet",{user:this.displayname||this.userId})}},mounted:function(){document.title="".concat(this.displayname||this.userId," - ").concat(document.title),(0,d.Ld)("user_status:status.updated",this.handleStatusUpdate)},beforeDestroy:function(){(0,d.r1)("user_status:status.updated",this.handleStatusUpdate)},methods:{handleStatusUpdate:function(t){this.isCurrentUser&&t.userId===this.userId&&(this.status=t)},openStatusModal:function(){var n=document.querySelector(".user-status-menu-item__toggle");this.isCurrentUser&&(n?n.click():(0,u.x2)(t("core","Error opening the user status modal, try hard refreshing the page")))}}},X=a(52500),tt={};tt.styleTagTransform=j(),tt.setAttributes=O(),tt.insert=P().bind(null,"head"),tt.domAPI=D(),tt.insertStyleElement=z(),B()(X.Z,tt),X.Z&&X.Z.locals&&X.Z.locals;var nt=a(35069),et={};et.styleTagTransform=j(),et.setAttributes=O(),et.insert=P().bind(null,"head"),et.domAPI=D(),et.insertStyleElement=z(),B()(nt.Z,et),nt.Z&&nt.Z.locals&&nt.Z.locals;var at=(0,T.Z)(Q,(function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("div",{staticClass:"profile"},[e("div",{staticClass:"profile__header"},[e("div",{staticClass:"profile__header__container"},[e("div",{staticClass:"profile__header__container__placeholder"}),t._v(" "),e("h2",{staticClass:"profile__header__container__displayname"},[t._v("\n\t\t\t\t"+t._s(t.displayname||t.userId)+"\n\t\t\t\t"),t.isCurrentUser?e("a",{staticClass:"primary profile__header__container__edit-button",attrs:{href:t.settingsUrl}},[e("PencilIcon",{staticClass:"pencil-icon",attrs:{size:16}}),t._v("\n\t\t\t\t\t"+t._s(t.t("core","Edit Profile"))+"\n\t\t\t\t")],1):t._e()]),t._v(" "),t.status.icon||t.status.message?e("div",{staticClass:"profile__header__container__status-text",class:{interactive:t.isCurrentUser},on:{click:function(n){return n.preventDefault(),n.stopPropagation(),t.openStatusModal.apply(null,arguments)}}},[t._v("\n\t\t\t\t"+t._s(t.status.icon)+" "+t._s(t.status.message)+"\n\t\t\t")]):t._e()])]),t._v(" "),e("div",{staticClass:"profile__wrapper"},[e("div",{staticClass:"profile__content"},[e("div",{staticClass:"profile__sidebar"},[e("NcAvatar",{staticClass:"avatar",class:{interactive:t.isCurrentUser},attrs:{user:t.userId,size:180,"show-user-status":!0,"show-user-status-compact":!1,"disable-menu":!0,"disable-tooltip":!0,"is-no-user":!t.isUserAvatarVisible},nativeOn:{click:function(n){return n.preventDefault(),n.stopPropagation(),t.openStatusModal.apply(null,arguments)}}}),t._v(" "),e("div",{staticClass:"user-actions"},[t.primaryAction?e("PrimaryActionButton",{staticClass:"user-actions__primary",attrs:{href:t.primaryAction.target,icon:t.primaryAction.icon,target:"phone"===t.primaryAction.id?"_self":"_blank"}},[t._v("\n\t\t\t\t\t\t"+t._s(t.primaryAction.title)+"\n\t\t\t\t\t")]):t._e(),t._v(" "),e("div",{staticClass:"user-actions__other"},[t._l(t.middleActions,(function(n){return e("NcActions",{key:n.id,staticStyle:{"background-position":"14px center","background-size":"16px","background-repeat":"no-repeat"},style:Object.assign({},{backgroundImage:"url("+n.icon+")"},"#181818"===t.colorMainBackground&&{filter:"invert(1)"}),attrs:{"default-icon":n.icon}},[e("NcActionLink",{attrs:{"close-after-click":!0,icon:n.icon,href:n.target,target:"phone"===n.id?"_self":"_blank"}},[t._v("\n\t\t\t\t\t\t\t\t"+t._s(n.title)+"\n\t\t\t\t\t\t\t")])],1)})),t._v(" "),t.otherActions?[e("NcActions",{attrs:{"force-menu":!0}},t._l(t.otherActions,(function(n){return e("NcActionLink",{key:n.id,class:{"icon-invert":"#181818"===t.colorMainBackground},attrs:{"close-after-click":!0,icon:n.icon,href:n.target,target:"phone"===n.id?"_self":"_blank"}},[t._v("\n\t\t\t\t\t\t\t\t\t"+t._s(n.title)+"\n\t\t\t\t\t\t\t\t")])})),1)]:t._e()],2)],1)],1),t._v(" "),e("div",{staticClass:"profile__blocks"},[t.organisation||t.role||t.address?e("div",{staticClass:"profile__blocks-details"},[t.organisation||t.role?e("div",{staticClass:"detail"},[e("p",[t._v(t._s(t.organisation)+" "),t.organisation&&t.role?e("span",[t._v("•")]):t._e(),t._v(" "+t._s(t.role))])]):t._e(),t._v(" "),t.address?e("div",{staticClass:"detail"},[e("p",[e("MapMarkerIcon",{staticClass:"map-icon",attrs:{size:16}}),t._v("\n\t\t\t\t\t\t\t"+t._s(t.address)+"\n\t\t\t\t\t\t")],1)]):t._e()]):t._e(),t._v(" "),t.headline||t.biography||t.sections.length>0?[t.headline?e("div",{staticClass:"profile__blocks-headline"},[e("h3",[t._v(t._s(t.headline))])]):t._e(),t._v(" "),t.biography?e("div",{staticClass:"profile__blocks-biography"},[e("p",[t._v(t._s(t.biography))])]):t._e(),t._v(" "),t._l(t.sections,(function(n,a){return e("div",{key:a,ref:"section-"+a,refInFor:!0,staticClass:"profile__additionalContent"},[e(n(t.$refs["section-"+a],t.userId),{tag:"component",attrs:{userId:t.userId}})],1)}))]:[e("div",{staticClass:"profile__blocks-empty-info"},[e("AccountIcon",{attrs:{size:60,"fill-color":"var(--color-text-maxcontrast)"}}),t._v(" "),e("h3",[t._v(t._s(t.emptyProfileMessage))]),t._v(" "),e("p",[t._v(t._s(t.t("core","The headline and about sections will show up here")))])],1)]],2)])])])}),[],!1,null,"3d0c11af",null),rt=at.exports;function it(t,n){for(var e=0;e=i)&&Object.keys(r.O).every((function(t){return r.O[t](e[s])}))?e.splice(s--,1):(A=!1,i0&&n[c-1][2]>i;c--)n[c]=n[c-1];n[c]=[e,a,i]},r.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(n,{a:n}),n},r.d=function(t,n){for(var e in n)r.o(n,e)&&!r.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:n[e]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.nmd=function(t){return t.paths=[],t.children||(t.children=[]),t},r.j=9651,function(){r.b=document.baseURI||self.location.href;var t={9651:0};r.O.j=function(n){return 0===t[n]};var n=function(n,e){var a,i,o=e[0],A=e[1],s=e[2],l=0;if(o.some((function(n){return 0!==t[n]}))){for(a in A)r.o(A,a)&&(r.m[a]=A[a]);if(s)var c=s(r)}for(n&&n(e);l