1import {v as v$1,a6 as Ea,M as wE,a7 as G,a8 as Nt,a9 as H,aa as K,ab as Wo,aS as pr,af as ve,aG as Pd,ak as $t,K as Se,ah as f,aT as H$1,ai as o$1,aH as nf,m as mb,aI as J,aJ as Z,F as Fn,T as Tn,b as Rt,w as wt,R as Rt$1,aD as ci,aU as w,d as dy,c as Ny,j as jM,D as Dt,aK as tr,aL as Ie,X as Z$1,g as Ts,S as S_,aE as YM,aP as ju,i as Vu,Z as Z_,A as Aw,u as N_,aF as JM,x as xy,aO as PT,U as UM,P as Pg,l as $M,h as bM,W as Wu,e as H_,k as jy,n as zf,Q as Qf,aV as hx,aW as G$1}from'./main-FGWGGG6G.js';var I=(()=>{class t{constructor(){this.httpClient=v$1(tr),this.rmaApiUrl=v$1(Ie);}acceptInvite(i,n){let m=this.rmaApiUrl(`Member/Invite/${i}`);return this.httpClient.post(m,{acceptTermsAndConditions:n})}getDetailsFromToken(i){let n=this.rmaApiUrl(`Member/Invite/${i}`);return this.httpClient.get(n)}static{this.\u0275fac=function(n){return new(n||t)};}static{this.\u0275prov=Z$1({token:t,factory:t.\u0275fac,providedIn:"root"});}}return t})();var _t=t=>({error:t}),vt=(t,e)=>({invitedToProfileName:t,invitedByName:e});function ut(t,e){if(t&1&&xy(0,"p",3),t&2){let i=Z_().$implicit;Ny("innerHtml",i("accept.error",UM(1,_t,e)),PT);}}function ft(t,e){if(t&1&&bM(0),t&2){let i=Z_(3).$implicit;Wu(" ",i("accept.heading")," ");}}function ht(t,e){if(t&1&&bM(0),t&2){let i=Z_(3).$implicit;Wu(" ",i("accept.claimedHeading")," ");}}function Ct(t,e){if(t&1){let i=H_();Ts(0,"button",11),jy("click",function(){zf(i);let m=Z_(4);return Qf(m.acceptInvite())}),bM(1),xy(2,"rma-icon",12),Vu();}if(t&2){let i=Z_(3).$implicit;Aw(),Wu(" ",i("accept.cta")," ");}}function bt(t,e){t&1&&(Ts(0,"button",9),xy(1,"mat-spinner",13),Vu());}function xt(t,e){if(t&1&&xy(0,"p",10),t&2){let i=Z_(3).$implicit;Ny("innerHtml",i("accept.termsConditions"),PT);}}function gt(t,e){if(t&1&&(Ts(0,"h1",5),S_(1,ft,1,1)(2,ht,1,1),Vu(),xy(3,"img",6),YM(4,"staticImageUrl"),xy(5,"p",7),S_(6,Ct,3,1,"button",8),YM(7,"async"),ju(8,bt,2,0,"button",9),S_(9,xt,1,1,"p",10)),t&2){let i=e,n=Z_(2).$implicit,m=Z_();Aw(),N_(i.profileDetails.isClaimed?2:1),Aw(2),Ny("src",JM(4,5,"/promotion-banner/teams-callout/team-banner.png"),Pg),Aw(2),Ny("innerHtml",n("accept.subheading",$M(9,vt,i.invitedToProfileName,i.invitedByName)),PT),Aw(),N_(JM(7,7,m.pending$)===false?6:8),Aw(3),N_(i.profileDetails.isClaimed?-1:9);}}function It(t,e){t&1&&(Ts(0,"div",4),xy(1,"mat-spinner",13),Vu());}function Mt(t,e){if(t&1&&(S_(0,gt,10,12),YM(1,"async"),ju(2,It,2,0,"div",4)),t&2){let i,n=Z_(2);N_((i=JM(1,1,n.profileMemberInviteDetails$))?0:2,i);}}function yt(t,e){if(t&1&&(Ts(0,"div",1)(1,"div",2),S_(2,ut,1,3,"p",3),YM(3,"async"),ju(4,Mt,3,3),Vu()()),t&2){let i,n=Z_();Aw(2),N_((i=JM(3,1,n.error$))?2:4,i);}}var M=class S{constructor(){this.activatedRoute=v$1(G),this.document=v$1(Nt),this.memberInvitationService=v$1(I),this.router=v$1(H),this.tokenProviderService=v$1(K),this.userService=v$1(Wo),this.error=new pr,this.pending=new ve,this.error$=this.error.asObservable(),this.pending$=this.pending.asObservable().pipe(Pd(false)),this.activationCode$=this.activatedRoute.params.pipe($t(1),Se(({activationCode:e})=>e),f()),this.profileMemberInviteDetails$=this.activatedRoute.data.pipe(Se(({profileMemberInviteDetails:e})=>e));}ngOnInit(){this.activationCode$.pipe($t(1)).subscribe(e=>{e||this.router.navigate(["/"]);}),this.profileMemberInviteDetails$.pipe($t(1),H$1(this)).subscribe(e=>{e||this.error.next("An error occurred"),(e?.activationStatusType==="PendingAuthorisation"||e?.activationStatusType==="Deleted")&&this.error.next("Invite can't be accepted"),e?.activationStatusType==="Activated"&&(this.document.location.href="/dashboard");});}acceptInvite(){this.pending.next(true),this.activationCode$.pipe(o$1(),nf(e=>this.memberInvitationService.acceptInvite(e,true)),nf(e=>e.userToken?this.persistJwtAuth(e.userToken):wE(null)),H$1(this)).subscribe({next:e=>{this.pending.next(false),this.document.location.href="/dashboard";},error:e=>{this.pending.next(false),this.error.next(e?.error?.message??e.message);}});}persistJwtAuth(e){return this.tokenProviderService.setUserToken(e),this.userService.reloadUser()}static{this.\u0275fac=function(i){return new(i||S)};}static{this.\u0275cmp=mb({type:S,selectors:[["rma-accept-member-invitation"]],features:[jM([Dt("memberInvitation")])],decls:1,vars:1,consts:[["class","background md:p-10",4,"transloco","translocoPrefix"],[1,"background","md:p-10"],[1,"mx-auto","w-full","bg-white","p-6","text-center","md:w-[35rem]","md:p-10","md:drop-shadow-md"],[3,"innerHtml"],[1,"rma-loader"],[1,"text-center","text-2xl"],["alt","",1,"mx-auto","w-60","border-1","border-solid","drop-shadow-md",3,"src"],[1,"mb-6","text-steel-70",3,"innerHtml"],["type","button","mat-flat-button","","color","primary",1,"h-12!","min-h-full","w-52"],["type","button","disabled","true","mat-flat-button","","color","primary",1,"h-12!","min-h-full","w-52"],[1,"mt-6","text-steel-70",3,"innerHtml"],["type","button","mat-flat-button","","color","primary",1,"h-12!","min-h-full","w-52",3,"click"],["glyph","arrow_forward"],["diameter","30"]],template:function(i,n){i&1&&dy(0,yt,5,3,"div",0),i&2&&Ny("translocoPrefix","memberInvitation");},dependencies:[J,Z,Fn,Tn,Rt,wt,Rt$1,ci,w],styles:["[_ngcontent-%COMP%]:root{--header-height: 5rem}[_nghost-%COMP%]{display:block}[_nghost-%COMP%] .background[_ngcontent-%COMP%]{min-height:calc(100dvh - 5rem)}@media(min-width:64em){[_nghost-%COMP%] .background[_ngcontent-%COMP%]{background-color:#f4f4f5}}"]});}};M=hx([G$1()],M);var lt=(t,e)=>{let i=v$1(I),n=t.params.activationCode;return i.getDetailsFromToken(n).pipe(Ea(m=>(console.error(m),wE(null))))};var st=[{path:"activation/member-invitation/accept/:activationCode",component:M,resolve:{profileMemberInviteDetails:lt},data:{hideFooter:true}}];var ae=st;export{ae as default};//# sourceMappingURL=chunk-sK4aLLGK.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.