1import{c as Je,f as Xe,g as Ze}from"./chunk-JC5PZU5R.js";import{A as We,E as z,F as K,G as be,J as Ye,M as ye,O as we,Pa as X,Va as Ae,Xa as Fe,Za as Ee,_a as Ie,a as qe,ab as Qe,b as H,c as A,e as W,f as Y,h as Le,i as Ue,jb as ze,k as Q,l as Oe,m as ve,o as Ge,q as je,r as He,s as _e,t as xe,tb as F,ua as Se,ub as Ke,xa as Te,z as Ce,za as J}from"./chunk-LJH5OBMW.js";import{Ag as N,Bg as I,Cb as w,Ec as R,F as ee,Fc as E,Jc as s,Kc as a,Lb as d,Le as Me,Mb as l,Mg as he,Mh as U,Nb as o,Nc as de,Ob as m,Oe as pe,Qa as re,S as Be,Sb as G,Tb as j,Vb as P,Xb as C,Z as te,Zb as g,Zf as me,_f as ue,a as Pe,cb as i,d as O,eg as De,hc as oe,jd as ce,ka as Ne,kb as _,kd as $,mc as c,nc as T,nd as q,ob as M,oc as f,pc as D,qa as ie,rh as Re,sc as se,sg as L,ta as B,tb as x,tc as ae,u as V,ua as ne,uc as le,v as ke,vg as ge,wg as fe,xe as Ve,ya as b,yc as S,za as y,zh as $e}from"./chunk-PMSJWPYZ.js";function it(r,h){r&1&&(l(0,"div")(1,"div",10),m(2,"cx-spinner"),o()())}function nt(r,h){if(r&1){let e=P();l(0,"div",11)(1,"p",12),c(2),s(3,"cxTranslate"),o()(),l(4,"div",13)(5,"button",14),C("click",function(){b(e);let n=g(2);return y(n.closeAccount())}),c(6),s(7,"cxTranslate"),o(),l(8,"button",15),C("click",function(){b(e);let n=g(2);return y(n.dismissModal("Cancel"))}),c(9),s(10,"cxTranslate"),o()()}r&2&&(i(2),f(" ",a(3,3,"closeAccount.confirmAccountClosureMessage")," "),i(4),f(" ",a(7,5,"closeAccount.closeMyAccount")," "),i(3),f(" ",a(10,7,"common.cancel")," "))}function rt(r,h){if(r&1){let e=P();G(0),l(1,"div",2),C("esc",function(){b(e);let n=g();return y(n.dismissModal("Escape click"))}),l(2,"div",3)(3,"div",4)(4,"h3",5),c(5),s(6,"cxTranslate"),o(),l(7,"button",6),s(8,"cxTranslate"),s(9,"cxTranslate"),C("click",function(){b(e);let n=g();return y(n.dismissModal("Cross click"))}),l(10,"span",7),m(11,"cx-icon",8),o()()(),x(12,it,3,0,"div",9),s(13,"async"),x(14,nt,11,9,"ng-template",null,0,de),o()(),j()}if(r&2){let e=oe(15),t=g();i(),d("cxFocus",t.focusConfig),i(4),f(" ",a(6,8,"closeAccount.confirmAccountClosure")," "),i(2),d("title",S(a(8,10,"common.close"))),w("aria-label",a(9,12,"common.close")),i(4),d("type",t.iconTypes.CLOSE),i(),d("ngIf",a(13,14,t.isLoading$))("ngIfElse",e)}}var k=r=>({label:r});var ot=()=>[],st=()=>({}),at=()=>({cxRoute:"termsAndConditions"}),lt=()=>({cxRoute:"login"});function dt(r,h){if(r&1&&(l(0,"label"),m(1,"input",33),l(2,"span",25),c(3),o()()),r&2){let e=g().ngIf,t=g(2);i(),d("checked",t.isConsentGiven(e.consent)),i(2),f(" ",e.template," ")}}function ct(r,h){if(r&1&&(G(0),x(1,dt,4,2,"label",22),j()),r&2){let e=h.ngIf;i(),d("ngIf",e.template)}}function pt(r,h){r&1&&(G(0),m(1,"cx-form-required-asterisks"),j())}function mt(r,h){if(r&1){let e=P();l(0,"div")(1,"label")(2,"input",37),C("change",function(n){b(e);let p=g().index,v=g(3);return y(v.updateAdditionalConsents(n,p))}),o(),l(3,"span",25),c(4),x(5,pt,2,0,"ng-container",22),o(),m(6,"cx-form-errors",30),o()()}if(r&2){let e=h.ngIf,t=g(),n=t.$implicit,p=t.index,v=g().ngIf;i(2),d("required",v[p].required)("name",e),i(2),f(" ",v[p].template.description," "),i(),d("ngIf",v[p].required),i(),d("control",n.get("isConsentGranted"))}}function ut(r,h){if(r&1&&(l(0,"div",36),x(1,mt,7,5,"div",22),o()),r&2){let e=h.index,t=g().ngIf;d("formGroupName",e),i(),d("ngIf",t[e]==null||t[e].template==null?null:t[e].template.id)}}function gt(r,h){if(r&1&&(l(0,"div",34),x(1,ut,2,2,"div",35),o()),r&2){let e=g(2);i(),d("ngForOf",e.additionalConsents.controls)}}function ft(r,h){if(r&1){let e=P();l(0,"section",2)(1,"div",3)(2,"div",4)(3,"div",5),m(4,"cx-form-required-legend"),l(5,"form",6),C("ngSubmit",function(){b(e);let n=g();return y(n.submitForm())}),l(6,"div",7)(7,"label")(8,"span",8),c(9),s(10,"cxTranslate"),o(),m(11,"ng-select",9),s(12,"cxTranslate"),s(13,"async"),s(14,"cxTranslate"),o()(),l(15,"div",7)(16,"label")(17,"span",8),c(18),s(19,"cxTranslate"),m(20,"cx-form-required-asterisks"),o(),m(21,"input",10),s(22,"cxTranslate"),m(23,"cx-form-errors",11),s(24,"cxTranslate"),o()(),l(25,"div",7)(26,"label")(27,"span",8),c(28),s(29,"cxTranslate"),m(30,"cx-form-required-asterisks"),o(),m(31,"input",12),s(32,"cxTranslate"),m(33,"cx-form-errors",13),s(34,"cxTranslate"),o()(),l(35,"div",7)(36,"label")(37,"span",8),c(38),s(39,"cxTranslate"),m(40,"cx-form-required-asterisks"),o(),m(41,"input",14),s(42,"cxTranslate"),m(43,"cx-form-errors",15),s(44,"cxTranslate"),o()(),l(45,"div",7)(46,"label")(47,"span",8),c(48),s(49,"cxTranslate"),m(50,"cx-form-required-asterisks"),o(),m(51,"input",16),s(52,"cxTranslate"),s(53,"cxTranslate"),l(54,"p",17),c(55),s(56,"cxTranslate"),o(),m(57,"cx-form-errors",18),s(58,"cxTranslate"),o()(),l(59,"div",7)(60,"label")(61,"span",8),c(62),s(63,"cxTranslate"),m(64,"cx-form-required-asterisks"),o(),m(65,"input",19),s(66,"cxTranslate"),s(67,"cxTranslate"),m(68,"cx-form-errors",20),s(69,"cxTranslate"),o()(),l(70,"div",7)(71,"div",21),x(72,ct,2,1,"ng-container",22),s(73,"async"),o()(),x(74,gt,2,1,"div",23),l(75,"div",7)(76,"div",21)(77,"label"),m(78,"input",24),l(79,"span",25)(80,"span",26),c(81),s(82,"cxTranslate"),o(),l(83,"a",27),s(84,"cxUrl"),c(85),s(86,"cxTranslate"),o(),m(87,"cx-form-required-asterisks"),o(),m(88,"cx-form-errors",28),s(89,"cxTranslate"),o()()(),l(90,"cx-captcha",29),C("confirmed",function(){b(e);let n=g();return y(n.captchaConfirmed())}),o(),m(91,"cx-form-errors",30),l(92,"button",31),c(93),s(94,"cxTranslate"),o(),l(95,"a",32),s(96,"cxUrl"),c(97),s(98,"cxTranslate"),o()()()()()()}if(r&2){let e,t,n,p,v,u=g();i(5),d("formGroup",u.registerForm),i(4),T(a(10,58,"register.titleOptional")),i(2),d("ariaLabelDropdown",S(a(12,60,"common.ngSelectDropdownOptionsList")))("clearable",!1)("items",a(13,62,u.titles$)??R(118,ot))("placeholder",a(14,64,"register.selectTitle"))("searchable",!1)("cxNgSelectA11y",R(119,st)),i(7),f("",a(19,66,"register.firstName.label")," "),i(3),d("placeholder",S(a(22,68,"register.firstName.placeholder"))),w("aria-invalid",((e=u.registerForm.get("firstName"))==null?null:e.touched)&&((e=u.registerForm.get("firstName"))==null?null:e.invalid))("aria-errormessage","firstNameError"),i(2),d("translationParams",E(120,k,a(24,70,"register.firstName.label")))("control",u.registerForm.get("firstName")),i(5),f("",a(29,72,"register.lastName.label")," "),i(3),d("placeholder",S(a(32,74,"register.lastName.placeholder"))),w("aria-invalid",((t=u.registerForm.get("lastName"))==null?null:t.touched)&&((t=u.registerForm.get("lastName"))==null?null:t.invali
1d))("aria-errormessage","lastNameError"),i(2),d("translationParams",E(122,k,a(34,76,"register.lastName.label")))("control",u.registerForm.get("lastName")),i(5),f("",a(39,78,"register.emailAddress.label")," "),i(3),d("placeholder",S(a(42,80,"register.emailAddress.placeholder"))),w("aria-invalid",((n=u.registerForm.get("email"))==null?null:n.touched)&&((n=u.registerForm.get("email"))==null?null:n.invalid))("aria-errormessage","emailError"),i(2),d("translationParams",E(124,k,a(44,82,"register.emailAddress.label")))("control",u.registerForm.get("email")),i(5),f("",a(49,84,"register.password.label")," "),i(3),d("placeholder",S(a(52,86,"register.password.placeholder"))),w("aria-label",a(53,88,"register.password.placeholder")),i(4),f(" ",a(56,90,"register.passwordMinRequirements")," "),i(2),d("translationParams",E(126,k,a(58,92,"register.password.label")))("control",u.registerForm.get("password")),i(5),f("",a(63,94,"register.confirmPassword.label")," "),i(3),d("placeholder",S(a(66,96,"register.confirmPassword.placeholder"))),w("aria-label",a(67,98,"register.confirmPassword.placeholder"))("aria-invalid",((p=u.registerForm.get("passwordconf"))==null?null:p.touched)&&((p=u.registerForm.get("passwordconf"))==null?null:p.invalid))("aria-errormessage","passwordconfError"),i(3),d("translationParams",E(128,k,a(69,100,"register.confirmPassword.label")))("control",u.registerForm.get("passwordconf")),i(4),d("ngIf",a(73,102,u.anonymousConsent$)),i(2),d("ngIf",u.additionalRegistrationConsents),i(4),w("aria-invalid",((v=u.registerForm.get("termsandconditions"))==null?null:v.touched)&&((v=u.registerForm.get("termsandconditions"))==null?null:v.invalid))("aria-errormessage","termsandconditionsError"),i(3),f(" ",a(82,104,"register.confirmThatRead")," "),i(2),d("routerLink",a(84,106,R(130,at))),i(2),f(" ",a(86,108,"register.termsAndConditions")," "),i(3),d("translationParams",E(131,k,a(89,110,"register.termsAndConditions")))("control",u.registerForm.get("termsandconditions")),i(3),d("control",u.registerForm.get("captcha")),i(2),f(" ",a(94,112,"register.register")," "),i(2),d("routerLink",a(96,114,R(133,lt))),i(2),T(a(98,116,"register.signIn"))}}function ht(r,h){r&1&&(l(0,"div",38),m(1,"cx-spinner"),o())}function vt(r,h){r&1&&m(0,"cx-spinner",2)}function _t(r,h){if(r&1){let e=P();l(0,"form",3),C("ngSubmit",function(){let n=b(e).ngIf,p=g();return y(p.onSubmit(n))}),m(1,"cx-form-required-legend"),l(2,"label")(3,"span",4),c(4),s(5,"cxTranslate"),m(6,"cx-form-required-asterisks"),o(),m(7,"input",5),s(8,"cxTranslate"),s(9,"cxTranslate"),m(10,"cx-form-errors",6),s(11,"cxTranslate"),o(),l(12,"label")(13,"span",4),c(14),s(15,"cxTranslate"),m(16,"cx-form-required-asterisks"),o(),m(17,"input",7),s(18,"cxTranslate"),s(19,"cxTranslate"),m(20,"cx-form-errors",8),s(21,"cxTranslate"),o(),l(22,"button",9),c(23),s(24,"cxTranslate"),o()()}if(r&2){let e,t,n=g();d("formGroup",n.form),i(4),f("",a(5,19,"register.newPassword")," "),i(3),d("placeholder",S(a(8,21,"register.password.placeholder"))),w("aria-label",a(9,23,"register.password.placeholder"))("aria-invalid",((e=n.form.get("password"))==null?null:e.touched)&&((e=n.form.get("password"))==null?null:e.invalid))("aria-errormessage","passwordError"),i(3),d("translationParams",E(37,k,a(11,25,"register.newPassword")))("control",n.form.get("password")),i(4),f("",a(15,27,"register.passwordMinRequirements")," "),i(3),d("placeholder",S(a(18,29,"register.confirmPassword.placeholder"))),w("aria-label",a(19,31,"register.confirmPassword.placeholder"))("aria-invalid",((t=n.form.get("passwordConfirm"))==null?null:t.touched)&&((t=n.form.get("passwordConfirm"))==null?null:t.invalid))("aria-errormessage","passwordConfirmError"),i(3),d("translationParams",E(39,k,a(21,33,"register.passwordMinRequirements")))("control",n.form.get("passwordConfirm")),i(2),d("disabled",n.form.disabled),i(),f(" ",a(24,35,"register.resetPassword")," ")}}function xt(r,h){if(r&1){let e=P();l(0,"div",12)(1,"input",23),le("ngModelChange",function(n){b(e);let p=g(2);return ae(p.selectedAddress,n)||(p.selectedAddress=n),y(n)}),o(),l(2,"label",24),c(3),s(4,"cxTranslate"),o(),l(5,"div",25)(6,"div",16)(7,"div",17),c(8),o(),l(9,"div",17),c(10),o(),l(11,"div",17),c(12),o(),l(13,"div",17)(14,"span"),c(15),o()(),l(16,"div",17),c(17),o(),l(18,"div",17),c(19),o(),l(20,"div",17),c(21),o()()()()}if(r&2){let e=h.$implicit,t=h.index,n=g().ngIf,p=g();i(),se("ngModel",p.selectedAddress),d("value",e)("id","suggested-addresses--suggested-"+t),i(),d("for","suggested-addresses--suggested-"+t),i(),D(" ",a(4,13,"addressSuggestion.suggestedAddress")," ",n.suggestedAddresses.length>1?t+1:null," "),i(5),T(e==null?null:e.firstName),i(2),T(e==null?null:e.lastName),i(2),T(e==null?null:e.line1),i(3),T(e==null?null:e.line2),i(2),T(e==null?null:e.town),i(2),f(" ",e==null||e.regi
1on==null?null:e.region.isocode," "),i(2),f(" ",e==null?null:e.postalCode," ")}}function Ct(r,h){if(r&1){let e=P();l(0,"div",2)(1,"div",3)(2,"h3",4),c(3),s(4,"cxTranslate"),o(),l(5,"button",5),s(6,"cxTranslate"),s(7,"cxTranslate"),C("click",function(){b(e);let n=g();return y(n.closeModal("Cross click"))}),l(8,"span",6),m(9,"cx-icon",7),o()()(),l(10,"div",8)(11,"div",9)(12,"p"),c(13),s(14,"cxTranslate"),s(15,"cxTranslate"),o()(),l(16,"div",10),x(17,xt,22,15,"div",11),l(18,"div",12)(19,"input",13),le("ngModelChange",function(n){b(e);let p=g();return ae(p.selectedAddress,n)||(p.selectedAddress=n),y(n)}),o(),l(20,"label",14),c(21),s(22,"cxTranslate"),o(),l(23,"div",15)(24,"div",16)(25,"div",17),c(26),o(),l(27,"div",17),c(28),o(),l(29,"div",17)(30,"span"),c(31),o()(),l(32,"div",17),c(33),o(),l(34,"div",17),c(35),o()()()()()(),l(36,"div",18)(37,"div",19)(38,"div",20)(39,"button",21),C("click",function(){b(e);let n=g();return y(n.closeModal("Edit address"))}),c(40),s(41,"cxTranslate"),o(),l(42,"button",22),C("click",function(){b(e);let n=g();return y(n.closeModal(n.selectedAddress))}),c(43),s(44,"cxTranslate"),o()()()()()}if(r&2){let e=h.ngIf,t=g();i(3),f(" ",a(4,20,"addressSuggestion.verifyYourAddress")," "),i(2),d("title",S(a(6,22,"common.close"))),w("aria-label",a(7,24,"common.close")),i(4),d("type",t.iconTypes.CLOSE),i(4),D(" ",a(14,26,"addressSuggestion.ensureAccuracySuggestChange")," ",a(15,28,"addressSuggestion.chooseAddressToUse")," "),i(4),d("ngForOf",e.suggestedAddresses),i(2),se("ngModel",t.selectedAddress),d("value",e.enteredAddress),i(2),f(" ",a(22,30,"addressSuggestion.enteredAddress")," "),i(5),D(" ",e.enteredAddress==null?null:e.enteredAddress.firstName," ",e.enteredAddress==null?null:e.enteredAddress.lastName," "),i(2),T(e.enteredAddress==null?null:e.enteredAddress.line1),i(3),T(e.enteredAddress==null?null:e.enteredAddress.line2),i(2),D(" ",e.enteredAddress==null?null:e.enteredAddress.town," ",e.enteredAddress==null||e.enteredAddress.region==null?null:e.enteredAddress.region.isocode," "),i(2),f(" ",e.enteredAddress==null?null:e.enteredAddress.postalCode," "),i(5),f(" ",a(41,32,"addressSuggestion.editAddress")," "),i(3),f(" ",a(44,34,"addressSuggestion.saveAddress")," ")}}var bt=(()=>{class r{handleClick(e){e.target.tagName===this.el.nativeElement.tagName&&this.dismissModal("Cross click")}constructor(e,t,n,p,v,u,Z){this.authService=e,this.globalMessageService=t,this.routingService=n,this.translationService=p,this.userProfile=v,this.launchDialogService=u,this.el=Z,this.iconTypes=ye,this.focusConfig={trap:!0,block:!0,autofocus:"button",focusOnEscape:!0},this.loading$=new O(!1)}get isLoading$(){return this.loading$.asObservable()}ngOnInit(){this.isLoggedIn$=this.authService.isUserLoggedIn()}onSuccess(){this.dismissModal("Success"),this.translationService.translate("closeAccount.accountClosedSuccessfully").pipe(te()).subscribe(e=>{this.globalMessageService.add(e,I.MSG_TYPE_CONFIRMATION)}),this.authService.coreLogout().then(()=>{this.routingService.go({cxRoute:"home"})})}onError(){this.dismissModal("Error"),this.translationService.translate("closeAccount.accountClosedFailure").pipe(te()).subscribe(e=>{this.globalMessageService.add(e,I.MSG_TYPE_ERROR)})}dismissModal(e){this.launchDialogService.closeDialog(e)}closeAccount(){this.loading$.next(!0),this.userProfile.close().subscribe({next:()=>{this.onSuccess(),this.loading$.next(!1)},error:()=>{this.onError(),this.loading$.next(!1)}})}static{this.\u0275fac=function(t){return new(t||r)(_(ge),_(N),_(L),_(Re),_(Je),_(J),_(re))}}static{this.\u0275cmp=M({type:r,selectors:[["cx-close-account-modal"]],hostBindings:function(t,n){t&1&&C("click",function(v){return n.handleClick(v)})},decls:2,vars:3,consts:[["loaded",""],[4,"ngIf"],[1,"modal-dialog","modal
1-dialog-centered","cx-close-account-modal",3,"esc","cxFocus"],[1,"modal-content","cx-close-account-modal-container"],[1,"cx-close-account-modal-header","cx-modal-header"],[1,"cx-close-account-modal-title"],["type","button",1,"close",3,"click","title"],["aria-hidden","true"],[3,"type"],[4,"ngIf","ngIfElse"],[1,"cx-spinner"],[1,"modal-body"],[1,"cx-confirmation"],[1,"cx-close-account-modal-footer","cx-modal-footer"],[1,"btn","btn-primary",3,"click"],[1,"btn","btn-block","btn-secondary",3,"click"]],template:function(t,n){t&1&&(x(0,rt,16,16,"ng-container",1),s(1,"async")),t&2&&d("ngIf",a(1,1,n.isLoggedIn$))},dependencies:[$,Se,we,X,q,U],encapsulation:2,changeDetection:0})}}return r})(),Xi={launch:{CLOSE_ACCOUNT:{inline:!0,component:bt,dialogType:Te.DIALOG}}};var yt=(()=>{class r{constructor(e,t,n){this.userRegisterFacade=e,this.globalMessageService=t,this.fb=n}register(e){return this.userRegisterFacade.register(e)}getTitles(){return this.userRegisterFacade.getTitles()}postRegisterMessage(){this.globalMessageService.add({key:"register.postRegisterSuccessMessage"},I.MSG_TYPE_CONFIRMATION)}getAdditionalConsents(){return[]}generateAdditionalConsentsFormControl(){return this.fb?.array([])??void 0}collectDataFromRegisterForm(e){let{firstName:t,lastName:n,email:p,password:v,titleCode:u}=e;return{firstName:t,lastName:n,password:v,titleCode:u,uid:p.toLowerCase()}}static{this.\u0275fac=function(t){return new(t||r)(B(Ze),B(N),B(z))}}static{this.\u0275prov=ie({token:r,factory:r.\u0275fac})}}return r})(),Zi=(()=>{class r{get additionalConsents(){return this.registerForm?.get("additionalConsents")}updateAdditionalConsents(e,t){let{checked:n}=e.target;this.registerForm.value.additionalConsents[t].isConsentGranted=n}constructor(e,t,n,p,v,u,Z){this.globalMessageService=e,this.fb=t,this.router=n,this.anonymousConsentsService=p,this.anonymousConsentsConfig=v,this.authConfigService=u,this.registerComponentService=Z,this.featureToggles=ne(pe),this.passwordValidators=this.featureToggles.useEnhancedSecurePasswordValidators?[...F.securePasswordValidators,F.mustEndWithLegalCharacter]:F.securePasswordValidators,this.isLoading$=new O(!1),this.subscription=new Pe,this.registerForm=this.fb.group({titleCode:[null],firstName:["",A.required],lastName:["",A.required],email:["",[A.required,F.emailValidator]],password:["",[A.required,...this.passwordValidators]],passwordconf:["",A.required],newsletter:new Q({value:!1,disabled:this.isConsentRequired()}),additionalConsents:this.registerComponentService.generateAdditionalConsentsFormControl?.()??this.fb.array([]),termsandconditions:[!1,A.requiredTrue],captcha:[!1,A.requiredTrue]},{validators:F.passwordsMustMatch("password","passwordconf")}),De("a11yRegistrationTermsAsteriskMargin")}ngOnInit(){this.titles$=this.registerComponentService.getTitles().pipe(V(t=>t.sort(Ke))),this.subscription.add(this.globalMessageService.get().pipe(ee(t=>!!Object.keys(t).length)).subscribe(t=>{(t&&t[I.MSG_TYPE_ERROR])?.some(p=>p.raw==="This field is required.")&&(this.globalMessageService.remove(I.MSG_TYPE_ERROR),this.globalMessageService.add({key:"register.titleRequired"},I.MSG_TYPE_ERROR))}));let e=this.anonymousConsentsConfig?.anonymousConsents?.registerConsent??"";this.anonymousConsent$=ke([this.anonymousConsentsService.getConsent(e),this.anonymousConsentsService.getTemplate(e)]).pipe(V(([t,n])=>({consent:t,template:n?.description?n.description:""}))),this.additionalRegistrationConsents=this.registerComponentService?.getAdditionalConsents()||[],this.subscription.add(this.registerForm.get("newsletter").valueChanges.subscribe(()=>{this.toggleAnonymousConsent()}))}submitForm(){this.registerForm.valid?this.registerUser():this.registerForm.markAllAsTouched()}registerUser(){this.isLoading$.next(!0),this.registerComponentService.register(this.collectDataFromRegisterForm(this.registerForm.value)).subscribe({next:()=>this.onRegisterUserSuccess(),complete:()=>this.isLoading$.next(this.authConfigService.getOAuthFlow()===me.AuthorizationCode),error:()=>this.isLoading$.next(!1)})}titleSelected(e){this.registerForm.controls.titleCode.setValue(e.code)}collectDataFromRegisterForm(e){return this.registerComponentService.collectDataFromRegisterForm(e)}isConsentGiven(e){return this.anonymousConsentsService.isConsentGiven(e)}isConsentRequired(){let e=this.anonymousConsentsConfig?.anonymousConsents?.requiredConsents,t=this.anonymousConsentsConfig?.anonymousConsents?.registerConsent;return e&&t?e.includes(t):!1}onRegisterUserSuccess(){this.featureToggles.authorizationCodeFlowByDefault?this.router.go({cxRoute:"login"}):this.authConfigService.getOAuthFlow()===me.ResourceOwnerPasswordFlow&&this.router.go("login"),this.registerComponentService.postRegisterMessage()}toggleAnonymousConsent(){let e=this.anonymousConsentsConfig?.anonymousConsents?.registerConsent;e&&(this.registerForm.get("newsletter")?.value?this.anonymousConsentsService.g
1iveConsent(e):this.anonymousConsentsService.withdrawConsent(e))}captchaConfirmed(){this.registerForm.get("captcha")?.setValue(!0)}ngOnDestroy(){this.subscription.unsubscribe()}static{this.\u0275fac=function(t){return new(t||r)(_(N),_(z),_(L),_(fe),_(he),_(ue),_(yt))}}static{this.\u0275cmp=M({type:r,selectors:[["cx-register"]],hostAttrs:["ngSkipHydration","true"],decls:4,vars:4,consts:[["loading",""],["class","cx-page-section container",4,"ngIf","ngIfElse"],[1,"cx-page-section","container"],[1,"row","justify-content-center"],[1,"col-md-6"],[1,"cx-section"],[3,"ngSubmit","formGroup"],[1,"form-group"],[1,"label-content"],["bindLabel","name","bindValue","code","formControlName","titleCode","id","title-select",3,"clearable","items","placeholder","searchable","ariaLabelDropdown","cxNgSelectA11y"],["required","true","type","text","name","firstname","formControlName","firstName",1,"form-control",3,"placeholder"],["id","firstNameError",3,"translationParams","control"],["required","true","type","text","name","lastname","formControlName","lastName",1,"form-control",3,"placeholder"],["id","lastNameError",3,"translationParams","control"],["required","true","type","email","name","email","formControlName","email",1,"form-control",3,"placeholder"],["id","emailError",3,"translationParams","control"],["required","true","type","password","name","password","formControlName","password","aria-describedby","password-input-hint","cxPasswordVisibilitySwitch","",1,"form-control",3,"placeholder"],["id","password-input-hint",1,"input-hint"],[3,"translationParams","control"],["required","true","type","password","name","confirmpassword","formControlName","passwordconf","cxPasswordVisibilitySwitch","",1,"form-control",3,"placeholder"],["id","passwordconfError",3,"translationParams","control"],[1,"form-check"],[4,"ngIf"],["formArrayName","additionalConsents","class","form-group",4,"ngIf"],["required","true","type","checkbox","name","termsandconditions","formControlName","termsandconditions"],[1,"form-check-label"],["id","confirm-read-label"],["target","_blank","rel","noopener noreferrer","aria-describedby","confirm-read-label",3,"routerLink"],["id","termsandconditionsError",3,"translationParams","control"],[3,"confirmed"],[3,"control"],["type","submit",1,"btn","btn-block","btn-primary"],[1,"cx-login-link","btn-link",3,"routerLink"],["type","checkbox","name","newsletter","formControlName","newsletter",1,"form-check-input",3,"checked"],["formArrayName","additionalConsents",1,"form-group"],["class","form-check",3,"formGroupName",4,"ngFor","ngForOf"],[1,"form-check",3,"formGroupName"],["type","checkbox","formControlName","isConsentGranted",3,"change","required","name"],[1,"cx-spinner"]],template:function(t,n){if(t&1&&(x(0,ft,99,134,"section",1),s(1,"async"),x(2,ht,2,0,"ng-template",null,0,de)),t&2){let p=oe(3);d("ngIf",!a(1,2,n.isLoading$))("ngIfElse",p)}},dependencies:[$,Ie,K,ve,H,qe,W,Y,Ce,We,be,xe,_e,je,He,Ye,Qe,Ee,Ae,Fe,ce,Ve,ze,X,q,$e,U],encapsulation:2})}}return r})();var wt=(()=>{class r{constructor(e,t,n){this.userPasswordService=e,this.routingService=t,this.globalMessage=n,this.featureToggles=ne(pe),this.passwordValidators=this.featureToggles.useEnhancedSecurePasswordValidators?[...F.securePasswordValidators,F.mustEndWithLegalCharacter]:F.securePasswordValidators,this.busy$=new O(!1),this.isUpdating$=this.busy$.pipe(Ne(p=>p===!0?this.form.disable():this.form.enable())),this.resetToken$=this.routingService.getRouterState().pipe(V(p=>p.state.queryParams.token)),this.form=new Le({password:new Q("",[A.required,...this.passwordValidators]),passwordConfirm:new Q("",A.required)},{validators:F.passwordsMustMatch("password","passwordConfirm")})}resetPassword(e){if(!this.form.valid){this.form.markAllAsTouched();return}this.busy$.next(!0);let t=this.form.get("password").value;this.userPasswordService.reset(e,t).subscribe({next:()=>this.onSuccess(),error:n=>this.onError(n)})}onSuccess(){this.globalMessage.add({key:"forgottenPassword.passwordResetSuccess"},I.MSG_TYPE_CONFIRMATION),this.busy$.next(!1),this.form.reset(),this.redirect()}onError(e){this.busy$.next(!1),e instanceof Me&&(e.details??[]).forEac
1h(t=>{t.message&&this.globalMessage.add({raw:t.message},I.MSG_TYPE_ERROR)})}redirect(){this.routingService.go({cxRoute:"login"})}static{this.\u0275fac=function(t){return new(t||r)(B(Xe),B(L),B(N))}}static{this.\u0275prov=ie({token:r,factory:r.\u0275fac})}}return r})(),en=(()=>{class r{constructor(e){this.service=e,this.form=this.service.form,this.isUpdating$=this.service.isUpdating$,this.token$=this.service.resetToken$}onSubmit(e){this.service.resetPassword(e)}static{this.\u0275fac=function(t){return new(t||r)(_(wt))}}static{this.\u0275cmp=M({type:r,selectors:[["cx-reset-password"]],hostAttrs:["ngSkipHydration","true",1,"user-form"],decls:4,vars:6,consts:[["class","overlay",4,"ngIf"],[3,"formGroup","ngSubmit",4,"ngIf"],[1,"overlay"],[3,"ngSubmit","formGroup"],[1,"label-content"],["required","true","type","password","formControlName","password","cxPasswordVisibilitySwitch","",1,"form-control",3,"placeholder"],["id","passwordError",3,"translationParams","control"],["required","true","type","password","formControlName","passwordConfirm","cxPasswordVisibilitySwitch","",1,"form-control",3,"placeholder"],["id","passwordConfirmError",3,"translationParams","control"],[1,"btn","btn-block","btn-primary",3,"disabled"]],template:function(t,n){t&1&&(x(0,vt,1,0,"cx-spinner",0),s(1,"async"),x(2,_t,25,41,"form",1),s(3,"async")),t&2&&(d("ngIf",a(1,2,n.isUpdating$)),i(2),d("ngIf",a(3,4,n.token$)))},dependencies:[$,X,K,ve,H,W,Y,Ce,be,xe,_e,Ie,Ee,Fe,Ae,q,U],encapsulation:2,changeDetection:0})}}return r})();var St=(()=>{class r{handleClick(e){e.target.tagName===this.el.nativeElement.tagName&&this.closeModal("Cross click")}constructor(e,t){this.launchDialogService=e,this.el=t,this.iconTypes=ye,this.focusConfig={trap:!0,block:!0,autofocus:"button",focusOnEscape:!0},this.data$=this.launchDialogService.data$}ngOnInit(){this.data$.pipe(Be(1)).subscribe(e=>this.setSelectedAddress(e))}closeModal(e){this.launchDialogService.closeDialog(e)}setSelectedAddress(e){this.selectedAddress=e.suggestedAddresses?.length?e.suggestedAddresses[0]:e.enteredAddress}static{this.\u0275fac=function(t){return new(t||r)(_(J),_(re))}}static{this.\u0275cmp=M({type:r,selectors:[["cx-suggested-addresses-dialog"]],hostBindings:function(t,n){t&1&&C("click",function(v){return n.handleClick(v)})},decls:3,vars:4,consts:[["role","dialog","aria-labelledby","dialogTitle",1,"modal-dialog","modal
1-dialog-centered","modal-lg","cx-suggested-addresses-dialog",3,"esc","cxFocus"],["class","modal-content cx-suggested-addresses-container",4,"ngIf"],[1,"modal-content","cx-suggested-addresses-container"],[1,"cx-suggested-addresses-header","cx-modal-header"],["id","dialogTitle",1,"cx-suggested-addresses-title"],["type","button",1,"close",3,"click","title"],["aria-hidden","true"],[3,"type"],["ngForm","",1,"modal-body"],[1,"cx-dialog-info"],[1,"cx-dialog-options"],["class","form-check",4,"ngFor","ngForOf"],[1,"form-check"],["type","radio","name","selectedAddress","id","suggested-addresses--entered",1,"form-check-input",3,"ngModelChange","ngModel","value"],["for","suggested-addresses--entered",1,"form-check-label","cx-dialog-label"],[1,"cx-dialog-entered"],[1,"cx-card-container"],[1,"cx-card-label"],[1,"cx-suggested-addresses-footer","cx-modal-footer"],[1,"row"],[1,"cx-dialog-actions","col-sm-12","col-md-12","col-lg-6","offset-lg-6"],[1,"btn","btn-secondary","cx-dialog-buttons",3,"click"],["cxAutoFocus","",1,"btn","btn-primary","cx-dialog-buttons",3,"click"],["type","radio","name","selectedAddress",1,"form-check-input",3,"ngModelChange","ngModel","value","id"],[1,"form-check-label","cx-dialog-label",3,"for"],[1,"cx-dialog-suggested"]],template:function(t,n){t&1&&(l(0,"div",0),C("esc",function(){return n.closeModal("Escape clicked")}),x(1,Ct,45,36,"div",1),s(2,"async"),o()),t&2&&(d("cxFocus",n.focusConfig),i(),d("ngIf",a(2,2,n.data$)))},dependencies:[Se,$,we,K,H,Ge,W,Y,Oe,Ue,ce,q,U],encapsulation:2,changeDetection:0})}}return r})();var tn={launch:{SUGGESTED_ADDRESSES:{inlineRoot:!0,component:St,dialogType:Te.DIALOG}}};export{yt as a,Zi as b,wt as c,en as d};
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.