1import{a as Gt}from"./chunk-2LDQPDYR.js";import{f as zt}from"./chunk-XFHCXCQO.js";import"./chunk-Z24AQNHL.js";import{a as Qt}from"./chunk-4Z5JRYUT.js";import{a as Kt,b as Ht,d as qt}from"./chunk-RIGSESDV.js";import{$a as $e,$b as et,Ae as Z,Ag as Ue,Bf as Me,Cf as jt,Df as Bt,Ed as Mt,F as Re,Ff as Wt,G as vt,Ga as L,Gb as _t,Gd as Pe,Ha as h,I as qe,Ia as g,Ib as Tt,If as Xt,J as ze,K as E,L as I,Lc as K,Le as ee,Ma as G,Mc as x,Me as he,Na as j,Nc as H,Oa as B,Oc as Q,Oe as V,P as St,Pc as q,Pe as Ft,Ra as de,Rc as N,Rg as ve,Sc as Dt,Sf as Yt,Ta as ue,Tc as z,Td as Ce,Te as te,Tf as Ne,Ua as ne,Uf as $t,Va as Xe,Vc as xt,Vg as ei,W as Ct,Wa as be,Wb as A,Wc as X,Xc as Y,Yb as Rt,Zb as C,_a as Ye,_b as Ae,ab as Je,af as ke,ag as Jt,ah as Ge,ba as p,bb as Ze,cb as wt,cf as me,dd as Pt,df as Vt,dg as ie,ed as tt,fd as Lt,gd as k,ha as r,hd as D,he as ce,hf as b,ja as S,k as gt,ka as yt,ld as $,md as De,nc as bt,nd as O,ne as Le,pc as At,qg as Fe,ra as _,rd as kt,re as ge,rh as ti,sa as T,ta as Et,ua as It,ue as Nt,ug as Zt,va as Ot,w as ht,wa as u,wd as xe,we as R,wg as Ve,xa as c,xe as F,ya as a,yd as fe,za as m,ze as J,zf as Ut}from"./chunk-L3R4CA6E.js";import"./chunk-27WATYC3.js";var ii=(()=>{let o=class o{constructor(){this.document=ze(St),this.platformId=ze(Ct),this.documentIsAccessible=Tt(this.platformId)}static getCookieRegExp(e){let t=e.replace(/([[\]{}()|=;+?,.*^$\\])/gi,"\\$1");return new RegExp("(?:^"+t+"|;\\s*"+t+")=(.*?)(?:;|$)","g")}static safeDecodeURIComponent(e){try{return decodeURIComponent(e)}catch{return e}}check(e){return this.documentIsAccessible?(e=encodeURIComponent(e),o.getCookieRegExp(e).test(this.document.cookie)):!1}get(e){if(this.check(e)){e=encodeURIComponent(e);let i=o.getCookieRegExp(e).exec(this.document.cookie);return i?.[1]?o.safeDecodeURIComponent(i[1]):""}else return""}getAll(){if(!this.documentIsAccessible)return{};let e={},t=this.document;return t.cookie&&t.cookie!==""&&t.cookie.split(";").forEach(i=>{let[s,d]=i.split("=");e[o.safeDecodeURIComponent(s.replace(/^ /,""))]=o.safeDecodeURIComponent(d)}),e}set(e,t,i,s,d,f,v,M){if(!this.documentIsAccessible)return;if(typeof i=="number"||i instanceof Date||s||d||f||v){let oe={expires:i,path:s,domain:d,secure:f,sameSite:v||"Lax",partitioned:M};this.set(e,t,oe);return}let w=encodeURIComponent(e)+"="+encodeURIComponent(t)+";",y=i||{};if(y.expires)if(typeof y.expires=="number"){let oe=new Date(new Date().getTime()+y.expires*1e3*60*60*24);w+="expires="+oe.toUTCString()+";"}else w+="expires="+y.expires.toUTCString()+";";y.path&&(w+="path="+y.path+";"),y.domain&&(w+="domain="+y.domain+";"),y.secure===!1&&y.sameSite==="None"&&(y.secure=!0,console.warn(`[ngx-cookie-service] Cookie ${e} was forced with secure flag because sameSite=None.More details : https://github.com/stevermeister/ngx-cookie-service/issues/86#issuecomment-597720130`)),y.secure&&(w+="secure;"),y.sameSite||(y.sameSite="Lax"),w+="sameSite="+y.sameSite+";",y.partitioned&&(w+="Partitioned;"),this.document.cookie=w}delete(e,t,i,s,d="Lax"){if(!this.documentIsAccessible)return;let f=new Date("Thu, 01 Jan 1970 00:00:01 GMT");this.set(e,"",{expires:f,path:t,domain:i,secure:s,sameSite:d})}deleteAll(e,t,i,s="Lax"){if(!this.documentIsAccessible)return;let d=this.getAll();for(let f in d)d.hasOwnProperty(f)&&this.delete(f,e,t,i,s)}};o.\u0275fac=function(t){return new(t||o)}
1,o.\u0275prov=Re({token:o,factory:o.\u0275fac,providedIn:"root"});let n=o;return n})();function pi(n,o){if(n&1){let l=L();c(0,"section",21)(1,"h2"),m(2,"app-format-translation",22),a(),c(3,"div",23)(4,"app-button",24),h("click",function(){E(l);let t=g();return I(t.router.navigateByUrl("/account/signup"))}),a()()()}}var Ie=(()=>{let o=class o{get showCreateAccountSection(){return this.registrationOpen||this.activationAllowed}constructor(e,t,i,s,d,f,v,M,w,y,oe,Se,se,Qe,Te){this.authService=e,this.toaster=t,this.router=i,this.logging=s,this.route=d,this.lookup=f,this.layoutService=v,this.shoppingCartService=M,this.accountService=w,this.loginService=y,this.initiativeService=oe,this.configService=Se,this.cookieService=se,this.cookieConsent=Qe,this.dialog=Te,this.registrationOpen=!1,this.activationAllowed=!1,this.loading=!1,this.message=null,this.validationMessages={username:[{type:"required",message:"FORM.VALIDATION.REQUIRED"},{type:"email",message:"FORM.VALIDATION.EMAIL"}],password:[{type:"required",message:"FORM.VALIDATION.REQUIRED"}]},this.headerTitle="VIEWS.ACCOUNT.LOGIN.HEADER",v.updateLayout(new k("VIEW.LOGIN.HEADER",!0,"VIEW.LOGIN.HELPTEXT.TITLE","VIEW.LOGIN.HELPTEXT.CONTENT")),this.route.params.subscribe(le=>{le.reason&&(this.message=le.reason)}),this.route.queryParams.subscribe(le=>{le.redirectUrl&&sessionStorage.setItem("loginRedirectUrl",le.redirectUrl)}),this.configService.getRegistrationConfig().subscribe(le=>{this.registrationOpen=le.IsRegistrationOpen,this.activationAllowed=le.IsActivationAllowed})}ngOnInit(){this.form=new q({username:new N("",[x.required,x.email]),password:new N("",x.required)})}ngAfterViewInit(){if(this.message===null)return;let e=null,t=0;switch(this.message){case"loggedoff":{e="MSG.LOGGEDOUT";break}case"timeout":{e="MSG.SESSION-TIMEDOUT";break}case"pwdreset":{e="MSG.PWDSENT";break}case"invalidresetkey":{e="MSG.INVALIDKEY";break}case"pwdchanged":{e="MSG.PWDUPDATED";break}case"invalid-activationkey":{e="MSG.INVALIDACTIVATION";break}case"account-activated":{e="MSG.ACCOUNTACTIVATED";break}case"register-ok":{e="MSG.ACCOUNTREGISTERED";break}}e!==null&&(t>0?this.toaster.infoTimeOut(e,t):this.toaster.info(e))}signin(){let e=this.form.value;this.loading=!0;let t={Username:e.username,Password:e.password},i=this.shoppingCartService.getPendingOrderId();(i==null?this.accountService.authenticate(t,!1):this.accountService.authenticateWithPendingOrder(i,t,!1)).subscribe(d=>{if(d.AuthResult==Ce.Ok){sessionStorage.setItem("jwt",d.Token);let f=sessionStorage.getItem("loginRedirectUrl");if(f!=null&&f!==""){let v=this.extractTopLevelDomain(window.location.hostname);this.cookieService.set("tymes4.bearer",d.Token,1,"/",v,null,null),sessionStorage.removeItem("loginRedirectUrl"),document.location.href=f}this.accountService.getCurrent(!1).pipe(ht(v=>this.loginService.handleAfterLogin(v))).subscribe(v=>{this.loading=!1})}else if(d.AuthResult==Ce.RedirectNeeded)d.ShopRedirects.length>1?this.showRedirectModal(d.ShopRedirects):window.location.href=d.ShopRedirects[0].RedirectUrl,this.loginOK=!1,this.loading=!1;else{let f=this.lookup.getTextByValue(this.lookup.authenticateContactResults,d.AuthResult);this.toaster.error(f),this.loginOK=!1,this.loading=!1}})}extractTopLevelDomain(e){let t;e.indexOf("://")>-1?t=e.split("/")[2]:t=e.split("/")[0],t=t.split(":")[0],t=t.split("?")[0];let i=t.split(".");return t=i[i.length-2]+"."+i[i.length-1],t}showRedirectModal(e){this.dialog.open(ei,{width:"500px",data:{ShopRedirects:e},maxWidth:"100%",panelClass:"mat-dialog--new-style"}).afterClosed().subscribe(i=>{this.loginOK=!1,this.loading=!1})}};o.\u0275fac=function(t){return new(t||o)(r(Z),r(ve),r(C),r(ce),r(A),r(Ge),r(D),r(J),r(O),r(me),r(fe),r(kt),r(ii),r(Ft),r(Nt))},o.\u0275cmp=S({type:o,selectors:[["app-login"]],viewQuery:function(t,i){if(t&1&&G(Me,5),t&2){let s;j(s=B())&&(i.submitButton=s.first)}},standalone:!1,decls:23,vars:11,consts:[[3,"title"],[2,"height","100%"],["fxLayout","row","fxLayout.lt-lg","column",1,"login",2,"height","100%"],[1,"content",3,"fxFlex"],["fxHide","true","fxHide.gt-lg","false"],["translationKey","VIEWS.ACCOUNT.LOGIN.HEADER"],[1,"login__form",3,"ngSubmit","formGroup"],[1,"form-group"],["for","username"],["translationKey","FORM.FIELDS.USERNAME"],["
1id","username","name","username","formControlName","username","value","","data-testid","login-username-input",1,"form-control"],["controlName","username",3,"form","messages"],["fxLayout","row","fxLayoutAlign","space-between"],["for","password"],["translationKey","FORM.FIELDS.PASSWORD"],[1,"forgot-password",3,"routerLink"],["translationKey","FORM.FIELDS.FORGOT-PASSWORD"],["id","password","type","password","name","password","formControlName","password","value","","data-testid","login-password-input",1,"form-control"],["controlName","password",3,"form","messages"],[1,"text-center"],["type","green","size","full","text","BTN.LOGIN","data-testid","login-submit-button",1,"login__submit",3,"showLoader","disabled"],["fxFlex","1 1 auto",1,"login__no-account","content","content--alternative"],["translationKey","VIEWS.ACCOUNT.LOGIN.NO-ACCOUNT"],[1,"login__submit-wrap"],["type","green","size","full","text","VIEW.LOGIN.REGISTER",3,"click"]],template:function(t,i){t&1&&(m(0,"app-title-bar",0),c(1,"div",1)(2,"div",2)(3,"section",3)(4,"h2",4),m(5,"app-format-translation",5),a(),c(6,"form",6),h("ngSubmit",function(){return i.signin()}),c(7,"div",7)(8,"label",8),m(9,"app-format-translation",9),a(),m(10,"input",10)(11,"app-display-validation",11),a(),c(12,"div",7)(13,"div",12)(14,"label",13),m(15,"app-format-translation",14),a(),c(16,"a",15),m(17,"app-format-translation",16),a()(),m(18,"input",17)(19,"app-display-validation",18),a(),c(20,"div",19),m(21,"app-button",20),a()()(),_(22,pi,5,0,"section",21),a()()),t&2&&(u("title",i.headerTitle),p(3),u("fxFlex",i.showCreateAccountSection?"1 1 auto":"1 1 100%"),p(3),u("formGroup",i.form),p(5),u("form",i.form)("messages",i.validationMessages),p(5),u("routerLink","/account/forgot-password"),p(3),u("form",i.form)("messages",i.validationMessages),p(2),u("showLoader",i.loading)("disabled",i.form.invalid),p(),T(i.showCreateAccountSection?22:-1))},dependencies:[z,K,H,Q,X,Y,F,ie,b,R,V,he,ee,Le,Ae],styles:[".forgot-password[_ngcontent-%COMP%]{font-size:.8em;padding-top:.2em;color:#ed1c24}"]});let n=o;return n})();function di(n,o){if(n&1&&(c(0,"div",9)(1,"b"),m(2,"app-format-translation",10),ne(3,":"),a(),ne(4),a()),n&2){let l=g();p(4),be(" ",l.errorDetails)}}var nt=(()=>{let o=class o{constructor(e,t){this.route=e,this.layoutService=t,t.updateLayout(new k("",!1))}ngOnInit(){this.route.paramMap.subscribe(e=>{this.errorDetails=e.get("errorDetails")})}};o.\u0275fac=function(t){return new(t||o)(r(A),r(D))},o.\u0275cmp=S({type:o,selectors:[["app-error"]],standalone:!1,decls:12,vars:1,consts:[[1,"content"],[1,"app-error"],[1,"fix"],["color","warn",1,"error-icon"],["translationKey","VIEWS.ACCOUNT.ERROR.WARNING"],[1,"error-text"],[1,"error-title"],[1,"error-subtitle"],["translationKey","VIEWS.ACCOUNT.ERROR.SUBTITLE"],[2,"padding-top","20px"],["translationKey","VIEWS.ACCOUNT.ERROR.DETAILS"]],template:function(t,i){t&1&&(m(0,"app-title-bar"),c(1,"div",0)(2,"div",1)(3,"div",2)(4,"mat-icon",3),m(5,"app-format-translation",4),a(),c(6,"div",5)(7,"h1",6),ne(8,"500"),a(),c(9,"div",7),m(10,"app-format-translation",8),a()()(),_(11,di,5,1,"div",9),a()()),t&2&&(p(11),T(i.errorDetails!=null?11:-1))},dependencies:[b,R,Kt],encapsulation:2});let n=o;return n})();var rt=(()=>{let o=class o{constructor(e,t,i,s,d){this.accountService=e,this.toaster=t,this.router=i,this.logging=s,this.layoutService=d,this.loading=!1,this.validationMessages={email:[{type:"required",message:"FORM.VALIDATION.REQUIRED"},{type:"email",message:"FORM.VALIDATION.EMAIL"}]},d.updateLayout(new k("VIEW.REQUESTPWDRESET.HEADER",!0,"VIEWS.ACCOUNT.FORGOT-PWD.HELPTITLE","VIEWS.ACCOUNT.FORGOT-PWD.HELPTEXT"))}ngOnInit(){this.form=new q({email:new N("",[x.required,x.email])})}requestPasswordReset(){let e=this.form.value;this.loading=!0,this.accountService.requestPasswordReset(e.email,!1).subscribe(t=>{this.loading=!1,this.router.navigate(["/account/login/pwdreset"])})}};o.\u0275fac=function(t){return new(t||o)(r(O),r(ve),r(C),r(ce),r(D))},o.\u0275cmp=S({type:o,selectors:[["app-forgot-password"]],standalone:!1,decls:12,vars:5,consts:[["backLink","/account/login"],[1,"content"],["translationKey","VIEWS.ACCOUNT.FORGOT-PWD.HEADER"],[3,"ngSubmit","formGroup"],[1,"form-group","pad-top"],["for","email"],["translationKey","FORM.FIELDS.EMAIL"],["
1id","email","name","email","formControlName","email","value","",1,"form-control"],["controlName","email",3,"form","messages"],["fxLayout","row","fxLayoutAlign","flex-end"],["fxFlex","1 1 50%","fxFlex.lt-lg","1 1 100%","type","green","size","full","text","BTN.REQUEST-PWD",3,"showLoader","disabled"]],template:function(t,i){t&1&&(m(0,"app-title-bar",0),c(1,"div",1)(2,"h3"),m(3,"app-format-translation",2),a(),c(4,"form",3),h("ngSubmit",function(){return i.requestPasswordReset()}),c(5,"div",4)(6,"label",5),m(7,"app-format-translation",6),a(),m(8,"input",7)(9,"app-display-validation",8),a(),c(10,"div",9),m(11,"app-button",10),a()()()),t&2&&(p(4),u("formGroup",i.form),p(5),u("form",i.form)("messages",i.validationMessages),p(2),u("showLoader",i.loading)("disabled",i.form.invalid))},dependencies:[z,K,H,Q,X,Y,F,ie,b,R,V,he,ee],encapsulation:2});let n=o;return n})();var at=(()=>{let o=class o{constructor(e,t,i,s){this.route=e,this.router=t,this.accountService=i,this.layoutService=s,this.resetPwdKey=null,this.savingPwd=!1,this.layoutService.updateLayout(new k("VIEW.RESETPWD.HEADER",!1))}ngOnInit(){this.route.params.subscribe(e=>{e.resetpwdkey&&(this.resetPwdKey=e.resetpwdkey,this.ensureValidaty())})}ensureValidaty(){this.accountService.validateResetPasswordKey(this.resetPwdKey,!1).subscribe(e=>{e||this.router.navigate(["/account/login/invalidresetkey"])})}savePwd(e){this.savingPwd=!0;let i={CurrentPassword:null,NewPassword:e.data.newPassword1,Pincode:null};this.accountService.resetPasswordByKey(this.resetPwdKey,i,!1).subscribe(s=>{this.savingPwd=!1,this.router.navigate(["/account/login/pwdchanged"])})}};o.\u0275fac=function(t){return new(t||o)(r(A),r(C),r(O),r(D))},o.\u0275cmp=S({type:o,selectors:[["app-reset-password"]],standalone:!1,decls:6,vars:1,consts:[[1,"content"],[1,"card-subtitle","mb-2","text-muted","pad-top"],["translationKey","VIEW.RESETPWD.SUBTITLE"],[1,"pad-top"],[3,"onFormSubmit","showLoader"]],template:function(t,i){t&1&&(m(0,"app-title-bar"),c(1,"div",0)(2,"h6",1),m(3,"app-format-translation",2),a(),c(4,"div",3)(5,"app-set-password-form",4),h("onFormSubmit",function(d){return i.savePwd(d)}),a()()()),t&2&&(p(5),u("showLoader",i.savingPwd))},dependencies:[b,Ve,R],encapsulation:2});let n=o;return n})();var hi=["profileForm"];function vi(n,o){n&1&&(c(0,"div",1)(1,"div",2),m(2,"i",3),a()())}function Si(n,o){if(n&1){let l=L();c(0,"div",1)(1,"h3"),m(2,"app-format-translation",7),a(),c(3,"p"),m(4,"app-format-translation",8),a(),c(5,"div",9)(6,"div",10)(7,"button",11),h("click",function(){E(l);let t=g(2);return I(t.setState("existing"))}),m(8,"app-format-translation",12),a()(),c(9,"div",10)(10,"button",11),h("click",function(){E(l);let t=g(2);return I(t.setState("new"))}),m(11,"app-format-translation",13),a()()()(),m(12,"hr")}if(n&2){let l=g(2);p(7),ue(l.determineClass("existing")),p(3),ue(l.determineClass("new")),de("btn-secondary",l.knownCustomerState==="new")}}function Ci(n,o){n&1&&(c(0,"div",4)(1,"div",28),m(2,"app-format-translation",29),a()())}function yi(n,o){if(n&1){let l=L();c(0,"app-button",30),h("click",function(){E(l);let t=g(3);return I(t.preRegister())}),a()}if(n&2){let l=g(3);u("showLoader",l.checkingPregister)("disabled",l.form.invalid)}}function Ei(n,o){if(n&1){let l=L();c(0,"div",4)(1,"h3"),m(2,"app-format-translation",14),a(),c(3,"p"),m(4,"app-format-translation",15),a(),c(5,"form",16)(6,"div",9)(7,"div",17)(8,"div",18)(9,"label",19),m(10,"app-format-translation",20),a(),c(11,"input",21),h("blur",function(t){E(l);let i=g(2);return I(i.inputBlur(t))}),a(),m(12,"app-display-validation",22),a()(),c(13,"div",17)(14,"div",18)(15,"label",23),m(16,"app-format-translation",24),a(),c(17,"input",25),h("blur",function(t){E(l);let i=g(2);return I(i.inputBlur(t))}),a(),m(18,"app-display-validation",26),a()()(),_(19,Ci,3,0,"div",4),_(20,yi,1,2,"app-button",27),a()()}if(n&2){let l=g(2);p(5),u("formGroup",l.form),p(6),u("disableControl",l.contactDetails!==null),p(),u("form",l.form)("messages",l.validationMessages),p(5),u("disableControl",l.contactDetails!==null),p(),u("form",l.form)("messages",l.validationMessages),p(),T(l.preRegisterCheckPerformed&&l.contactDetails===null?19:-1),p(),T(l.dis
1playRegisterForm?-1:20)}}function Ii(n,o){if(n&1){let l=L();_(0,Si,13,6),c(1,"div",1),_(2,Ei,21,9,"div",4),a(),m(3,"div",5),c(4,"div")(5,"app-profile-form",6,0),h("onFormSubmit",function(t){E(l);let i=g();return I(i.profileSubmit(t))}),a()()}if(n&2){let l=g();T(l.showChoices?0:-1),p(),de("content--no-top",l.showChoices),p(),T(l.knownCustomerState==="existing"?2:-1),p(3),u("hidden",!l.displayRegisterForm)}}var st=(()=>{let o=class o{get showChoices(){return this.registrationOpen&&this.activationAllowed}constructor(e,t,i,s,d){this.router=e,this.accountService=t,this.logger=i,this.shoppingCartService=s,this.configService=d,this.registrationOpen=!1,this.activationAllowed=!1,this.loaded=!1,this.validationMessages={PostalCode:[{type:"required",message:"FORM.VALIDATION.REQUIRED"}],Externalnumber:[{type:"required",message:"FORM.VALIDATION.REQUIRED"}]},this.checkingPregister=!1,this.displayRegisterForm=!1,this.preRegisterCheckPerformed=!1,this.contactDetails=null,this.knownCustomerState=null}ngOnInit(){this.form=new q({PostalCode:new N("",[x.required]),Externalnumber:new N("",[x.required])}),this.configService.getRegistrationConfig().subscribe(e=>{this.registrationOpen=e.IsRegistrationOpen,this.activationAllowed=e.IsActivationAllowed,this.handleRegistrationConfig(),this.loaded=!0},e=>{this.logger.log(e),this.registrationOpen=!0,this.activationAllowed=!0,this.loaded=!0})}handleRegistrationConfig(){if(!this.registrationOpen&&!this.activationAllowed){this.router.navigate(["/account/login"]);return}if(this.registrationOpen&&!this.activationAllowed){this.knownCustomerState="new",this.updateDisplayForm();return}if(!this.registrationOpen&&this.activationAllowed){this.knownCustomerState="existing",this.updateDisplayForm();return}}inputBlur(e){let t=e.target.value,i=e.target.getAttribute("formControlName");this.form.controls[i].patchValue(t)}setState(e){this.knownCustomerState=e,this.updateDisplayForm()}updateDisplayForm(){this.knownCustomerState==="new"?this.displayRegisterForm=!0:this.displayRegisterForm=this.contactDetails!=null}determineClass(e){return this.knownCustomerState===e?"btn btn--uppercase btn-secondary full-width":"btn btn--uppercase btn-outline-secondary full-width"}preRegister(){let e=this.form.value;this.checkingPregister=!0,this.accountService.preRegister(e.PostalCode,e.Externalnumber,!1).subscribe(t=>{this.contactDetails=t,this.preRegisterCheckPerformed=!0,this.checkingPregister=!1,this.loadContactDetails()})}loadContactDetails(){this.updateDisplayForm(),this.contactDetails!=null&&this.profileForm.setProfile(this.contactDetails,!1)}profileSubmit(e){let t=e.data;t.Email||delete t.Email;let i=this.shoppingCartService.getPendingOrderId();i&&(t.PendingOrderId=i,t.PendingOrderUID=this.shoppingCartService.getPendingOrderUID()),this.logger.log(t),this.contactDetails!==null&&(t.PreRegisterKey=this.contactDetails.PreRegisterKey),this.accountService.registerProfile(t,!1).subscribe(s=>{this.shoppingCartService.clearPendingOrder(),this.shoppingCartService.cancelTimer(),this.router.navigate(["/account/login/register-ok"])},s=>{throw this.profileForm.notifyReady(),s})}};o.\u0275fac=function(t){return new(t||o)(r(C),r(O),r(ce),r(J),r($))},o.\u0275cmp=S({type:o,selectors:[["app-pre-register"]],viewQuery:function(t,i){if(t&1&&G(hi,7),t&2){let s;j(s=B())&&(i.profileForm=s.first)}},standalone:!1,decls:4,vars:1,consts:[["profileForm",""],[1,"content","content--no-bottom"],[1,"text-center"],[1,"fas","fa-spinner","fa-spin","fa-2x"],[1,"pad-top"],[2,"margin-top","20px","margin-bottom","-60px"],[3,"onFormSubmit","hidden"],["translationKey","VIEW.REGISTER.HEADER"],["translationKey","VIEW.REGISTER.SUBTITLE"],[1,"row"],[1,"col-sm-6","pad-top"],[3,"click"],["translationKey","BTN.EXISTINGCUSTOMER"],["translationKey","BTN.NEWCUSTOMER"],["translationKey","VIEW.PREREGISTER.HEADER"],["translationKey","VIEW.PREREGISTER.SUBTITLE"],[1,"form",3,"formGroup"],[1,"col"],[1,"form-group"],["for","externalnr"],["translationKey","FORM.FIELDS.EXTERNALNR"],["id","externalnr","trim","blur","type","text","name","Externalnumber","formControlName","Externalnumber",1,"form-control",3,"blur","disableControl"],["controlName","Externalnumber",3,"form","messages"],["for","postalcode"],["translationKey","FORM.FIELDS.POSTALCODE"],["id","postalcode","type","text","name","PostalCode","formControlName","PostalCode","trim","blur",1,"form-control",3,"blur","disableControl"],["controlName","PostalCode",3,"form","messages"],["type","primary","text","BTN.CHECK",3,"showLoader","disabled"],[1,"invalid-feedback"],["translationKey","FORM.VALIDATION.UNKNOWN-PREREG-CUSTOMER"],["type","primary","text","BTN.CHECK",3,"click","
1showLoader","disabled"]],template:function(t,i){t&1&&(c(0,"div"),m(1,"app-title-bar"),_(2,vi,3,0,"div",1)(3,Ii,7,5),a()),t&2&&(p(2),T(i.loaded?3:2))},dependencies:[z,K,H,Q,X,Y,Fe,F,ie,b,Zt,R,Ne],encapsulation:2});let n=o;return n})();var lt=(()=>{let o=class o{constructor(e,t,i,s){this.route=e,this.router=t,this.accountService=i,this.layoutService=s,this.savingPwd=!1,this.activationKey=null,this.email=null,this.layoutService.updateLayout(new k("VIEW.ACTIVATEACCOUNT.HEADER",!0,"VIEWS.ACCOUNT.ACTIVATE-ACCOUNT.HELPTITLE","VIEWS.ACCOUNT.ACTIVATE-ACCOUNT.HELPTEXT"))}ngOnInit(){this.route.params.subscribe(e=>{e.activationkey&&(this.activationKey=e.activationkey),e.email&&(this.email=e.email),this.ensureValidity()})}ensureValidity(){(!this.email||!this.activationKey)&&this.router.navigate(["/account/login/invalid-activationkey"]),this.accountService.validateActivationKey(this.email,this.activationKey,!1).subscribe(e=>{e||this.router.navigate(["/account/login/invalid-activationkey"])})}savePwd(e){this.savingPwd=!0;let i={NewPassword:e.data.newPassword1,CurrentPassword:null,Pincode:null};this.accountService.activateAccount(this.email,this.activationKey,i,!1).subscribe(s=>{this.savingPwd=!1,this.router.navigate(["/account/login/account-activated"])})}};o.\u0275fac=function(t){return new(t||o)(r(A),r(C),r(O),r(D))},o.\u0275cmp=S({type:o,selectors:[["app-activate-account"]],standalone:!1,decls:6,vars:1,consts:[[1,"content"],[1,"card-subtitle","mb-2","text-muted","pad-top"],["translationKey","VIEW.ACTIVATEACCOUNT.SUBTITLE"],[3,"onFormSubmit","showLoader"]],template:function(t,i){t&1&&(m(0,"app-title-bar"),c(1,"div",0)(2,"h6",1),m(3,"app-format-translation",2),a(),m(4,"br"),c(5,"app-set-password-form",3),h("onFormSubmit",function(d){return i.savePwd(d)}),a()()),t&2&&(p(5),u("showLoader",i.savingPwd))},dependencies:[b,Ve,R],encapsulation:2});let n=o;return n})();var Oi=["pagerComponent"];function wi(n,o){if(n&1){let l=L();c(0,"div",7)(1,"app-my-orders-order",9),h("onOrderOpen",function(){E(l);let t=g();return I(t.orderOpened())}),a()()}if(n&2){let l=o.$implicit;p(),u("order",l)}}var ct=(()=>{let o=class o{constructor(e,t,i){this.layoutService=e,this.loader=t,this.orderService=i,this.pageSize=5,this.layoutService.updateLayout(new k("VIEWS.ORDERS.MY.TITLE",!1,"VIEWS.ORDERS.MY.HELPTITLE","VIEWS.ORDERS.MY.HELPTEXT"))}ngOnInit(){this.fetchData(1)}fetchData(e){let t=this.loader.open("fetchdata@my-orders");this.orderService.getPagedOrders("",e,this.pageSize,"OrderDate",!1).subscribe(i=>{this.orders=i.Records;let s=i.TotalRecords;this.pagerComponent.setObjectCount(s),this.pagerComponent.setPage(e),this.loader.close(t)})}doPage(e){this.fetchData(e)}orderOpened(){for(let e of this.orderComponents.toArray())e.closeOrder()}};o.\u0275fac=function(t){return new(t||o)(r(D),r(ge),r(Mt))},o.\u0275cmp=S({type:o,selectors:[["app-my-orders"]],viewQuery:function(t,i){if(t&1&&(G(Oi,7),G(Ue,5)),t&2){let s;j(s=B())&&(i.pagerComponent=s.first),j(s=B())&&(i.orderComponents=s)}},standalone:!1,decls:11,vars:1,consts:[["pagerComponent",""],["fxLayout","column","fxLayout.lt-lg","column",2,"height","100%"],["backLink","/"],[1,"content"],["translationKey","VIEWS.ORDERS.MY.HEADER"],[1,"content-pad__line"],["translationKey","VIEWS.ORDERS.MY.INTRO"],[1,"summary-header-small-padding"],[3,"onPage","pagesize"],[3,"onOrderOpen","order"]],template:function(t,i){if(t&1){let s=L();c(0,"div",1),m(1,"app-title-bar",2),c(2,"div",3)(3,"h3"),m(4,"app-format-translation",4),a(),c(5,"p",5),m(6,"app-format-translation",6),a(),It(7,wi,2,1,"div",7,Et),c(9,"app-pager",8,0),h("onPage",function(f){return E(s),I(i.doPage(f.pageNr))}),a()()()}t&2&&(p(7),Ot(i.orders),p(2),u("pagesize",i.pageSize))},dependencies:[Jt,b,R,Ue,V],styles:[".divider[_ngcontent-%COMP%], .divider__title[_ngcontent-%COMP%]{height:100%}.summary-header-small-padding[_ngcontent-%COMP%]{padding:0}"]});let n=o;return n})();var mt=(()=>{let o=class o{constructor(e,t,i,s,d){this.authService=e,this.route=t,this.router=i,this.accountService=s,this.configService=d}ngOnInit(){this.route.params.subscribe(e=>{e.token&&this.configService.getSSOConfig().subscribe(t=>{this.authService.ensureAnonymousToken().subscribe(()=>{this.impersonate(e)})})})}impersonate(e){this.accountService.authenticateByImpersonation(e.id,e.token,e.IsUsingRulesDraft,!1).subscribe(t=>{sessionStorage.setItem("isImpersonated","1"),sessionStorage.setItem("jwt",t.Token),this.accountService.getCurrent(!1).subscribe(i=>{this.authService.setLoggedInUser(i),this.authService.setLanguageForLoggedInUser(i),this.router.navigateByUrl("/")},i=>{this.router.navigateByUrl("/")})},t=>{})}};o.\u0275fac=function(t){return new(t||o)(r(Z),r(A),r(C),r(O),r($))}
1,o.\u0275cmp=S({type:o,selectors:[["app-imp-login"]],standalone:!1,decls:0,vars:0,template:function(t,i){},encapsulation:2});let n=o;return n})();var Oe=(()=>{let o=class o{constructor(e,t,i,s,d,f,v,M,w,y,oe,Se){this.route=e,this.router=t,this.layoutService=i,this.shoppingCartService=s,this.accountService=d,this.pendingOrderService=f,this.saleFlowHelper=v,this.loginService=M,this.eventService=w,this.initiativeService=y,this.ssoHelper=oe,this.loader=Se,this.podid=null,this.poduid=null,this.route.params.subscribe(se=>{se.podid&&(this.podid=se.podid),se.poduid&&(this.poduid=se.poduid)})}getCookieValue(e){let t=document.cookie.match(`(^|[^;]+)\\s*${e}\\s*=\\s*([^;]+)`);return t?t.pop():""}ngOnInit(){let e=this.route.snapshot.queryParamMap.get("tokenpayload"),t=this.loader.open();if(!e&&this.route.snapshot.queryParamMap.get("code")&&(e="code:"+this.route.snapshot.queryParamMap.get("code")),!e&&this.route.snapshot.queryParamMap.get("ticket")&&(e="ticket:"+this.route.snapshot.queryParamMap.get("ticket")),!e){this.ssoHelper.handlePotentialModifiedCookie(),this.loader.close(t),this.getToOriginalPage();return}let i=this.getCookieValue("_sa_sso_upid");sessionStorage.setItem("storedCookie",i);let s=this.shoppingCartService.getPendingOrderId();(s==null?this.accountService.authenticateBySSOToken({AccessToken:e},!1):this.accountService.authenticateBySSOTokenWithPendingOrder(s,{AccessToken:e},!1)).subscribe(f=>{if(f.NewSASSOUrl!=null&&(document.location.href=f.NewSASSOUrl),f.Token===null){f.AuthResult===Ce.SSONotFound&&this.router.navigateByUrl("/account/sso-account-connect");return}sessionStorage.setItem("storedSSOToken",e),sessionStorage.setItem("jwt",f.Token),this.ssoHelper.handlePotentialModifiedCookie(),this.accountService.getCurrent(!1).subscribe(v=>{this.loginService.handleAfterLogin(v).subscribe(M=>{this.loader.close(t)})},v=>{this.loader.close(t),this.router.navigateByUrl("/")})})}getToOriginalPage(){this.shoppingCartService.linkAndFetchPendingOrder().subscribe(e=>{this.pendingOrderService.getCurrentActive().subscribe(t=>{if(!t){this.afterSignIn();return}this.shoppingCartService.setPendingOrderId(t.Id,null),this.shoppingCartService.setPendingOrderDetails(t);let i=sessionStorage.getItem("ai"),s=te.for("events.index");i?s=t.InitiativeGuid!==i?"initiative":te.for("shopping-cart.index"):t.InitiativeGuid&&(sessionStorage.setItem("ai",t.InitiativeGuid),this.initiativeService.getStyling(t.InitiativeGuid).subscribe(d=>{d!==null&&(sessionStorage.setItem("ai_style",JSON.stringify(d)),this.layoutService.updateBackgroun
1d())})),i||(this.shoppingCartService.isTicketChangeBasket()||this.shoppingCartService.getEventIds().length>0||this.shoppingCartService.getMembershipIds().length>0?s=te.for("shopping-cart.index"):this.shoppingCartService.getPassePartoutIds().length>0&&(s=te.for("renewals.shopping-cart"))),this.router.navigateByUrl(s)})})}afterSignIn(){let e=sessionStorage.getItem("ai"),t=this.loginService.getAction();if(!t){this.router.navigateByUrl("");return}switch(this.loginService.clearAction(),t.action){case"startNewEventFlow":{let i;e&&e!=null?i=this.eventService.findWithGuid(t.params[1],t.params[0],e,!1):i=this.eventService.find(t.params[1],t.params[0]),i.subscribe(s=>{this.saleFlowHelper.startNewEventFlow(t.params[0],s,e).subscribe()});break}case"pageNavigation":{this.router.navigateByUrl(t[0]);break}case"compensation2021":{let i="tegemoetkoming2021/";t.params[0]===!1?i+="geentegemoetkoming":i+="tegemoetkoming",this.router.navigateByUrl(i);break}case"restitution1920":{let i="restitutie1920/";t.params[0]===!1?i+="geenrestitutie":i+="restitutie",this.router.navigateByUrl(i);break}case"restitution2122":{let i="restitutie2122/";t.params[0]===!1?i+="geenrestitutie":i+="restitutie",this.router.navigateByUrl(i);break}case"startNewSalesPeriodFlow":{this.saleFlowHelper.startNewPassePartoutFlow(t.params[0]);break}}}};o.\u0275fac=function(t){return new(t||o)(r(A),r(C),r(D),r(J),r(O),r(Pe),r(ke),r(me),r(xe),r(fe),r(De),r(ge))},o.\u0275cmp=S({type:o,selectors:[["app-sso-login"]],standalone:!1,decls:0,vars:0,template:function(t,i){},encapsulation:2});let n=o;return n})();var we=(()=>{let o=class o{constructor(e,t){this.configService=e,this.shoppingCartService=t}canActivate(e,t){return new Promise(i=>{this.configService.getSSOConfig().subscribe(s=>{if(s.isUsingSSO||i(!0),s&&s.loginUrl)if(s.ssoProvider==="Okta"||s.ssoProvider==="Azerion"){let v=document.location.href.replace(document.location.origin,"");var d=s.loginUrl;d=d.replace("#STATE#",encodeURI(v)),document.location.href=d}else{let v="",M=this.shoppingCartService.getPendingOrderId(),w=this.shoppingCartService.getPendingOrderUID();M&&w&&(v="%2f"+M+"%2f"+w,(s.ssoProvider=="SA"||s.ssoProvider=="Arenametrix")&&(v=decodeURIComponent(v)));var f=s.ssoProvider!=="SA"&&s.ssoProvider!=="Arenametrix"?"&mandatory=true":"";document.location.href=s.loginUrl+v+f}i(!1)})})}};o.\u0275fac=function(t){return new(t||o)(qe($),qe(J))},o.\u0275prov=Re({token:o,factory:o.\u0275fac});let n=o;return n})();var _e=(()=>{let o=class o{constructor(e,t,i,s,d,f,v,M,w,y,oe,Se,se,Qe){this.accountService=e,this.authService=t,this.toaster=i,this.router=s,this.route=d,this.lookup=f,this.layoutService=v,this.shoppingCartService=M,this.pendingOrderService=w,this.eventService=y,this.saleFlowHelper=oe,this.loginService=Se,this.configService=se,this.initiativeService=Qe,this.loading=!1,this.message=null,this.validationMessages={username:[{type:"required",message:"FORM.VALIDATION.REQUIRED"},{type:"email",message:"FORM.VALIDATION.EMAIL"}],password:[{type:"required",message:"FORM.VALIDATION.REQUIRED"}]},this.headerTitle="VIEWS.ACCOUNT.SSO-CONNECT.HEADER",v.updateLayout(new k("VIEWS.SSO-CONNECT.HEADER",!0,"VIEW.SSO-CONNECT.HELPTEXT.TITLE","VIEW.SSO-CONNECT.HELPTEXT.CONTENT")),this.route.params.subscribe(Te=>{Te.message&&(this.message=Te.message)})}ngOnInit(){this.form=new q({username:new N("",[x.required,x.email]),password:new N("",x.required)}),this.configService.getSSOConfig().subscribe(e=>{if(!(e.isUsingSSO&&e.ssoProvider==="SA")){this.router.navigateByUrl("/");return}this.message==="register-sso"&&this.accountService.registerProfileFromSSO(!1).subscribe(t=>{if(!t){this.router.navigate(["/account/login"]);return}this.message=t;let i=null;this.message==="loggedoff"?i="MSG.LOGGEDOUT":this.message==="timeout"?i="MSG.SESSION-TIMEDOUT":this.message==="pwdreset"?i="MSG.PWDSENT":this.message==="invalidresetkey"?i="MSG.INVALIDKEY":this.message==="pwdchanged"?i="MSG.PWDUPDATED":this.message==="invalid-activationkey"?i="MSG.INVALIDACTIVATION":this.message==="account-activated"?i="MSG.ACCOUNTACTIVATED":this.message==="register-ok"?i="MSG.ACCOUNTREGIST
1ERED":this.message==="sso-register-mailduplicate"?i="MSG.SSOMAILDUPLICATE":this.message==="sso-register-tmpfailure"?i="MSG.SSOTMPFAILURE":this.message==="sso-register-deffailure"&&(i="MSG.SSODEFFAILURE"),i!==null&&this.toaster.info(i)})})}ngAfterViewInit(){if(this.message===null)return;let e=null;this.message==="loggedoff"?e="MSG.LOGGEDOUT":this.message==="timeout"?e="MSG.SESSION-TIMEDOUT":this.message==="pwdreset"?e="MSG.PWDSENT":this.message==="invalidresetkey"?e="MSG.INVALIDKEY":this.message==="pwdchanged"?e="MSG.PWDUPDATED":this.message==="invalid-activationkey"?e="MSG.INVALIDACTIVATION":this.message==="account-activated"?e="MSG.ACCOUNTACTIVATED":this.message==="register-ok"?e="MSG.ACCOUNTREGISTERED":this.message==="sso-register-mailduplicate"?e="MSG.SSOMAILDUPLICATE":this.message==="sso-register-tmpfailure"?e="MSG.SSOTMPFAILURE":this.message==="sso-register-deffailure"?e="MSG.SSODEFFAILURE":this.message==="3"?e="MSG.SSOTMPFAILURE":e="Unknown error: "+this.message,e!==null&&this.toaster.info(e)}signin(){let e=this.form.value;this.loading=!0;let t={Username:e.username,Password:e.password};this.accountService.authenticate(t,!1).subscribe(i=>{if(i.Token===null){let s=this.lookup.getTextByValue(this.lookup.authenticateContactResults,i.AuthResult);this.toaster.error(s),this.loginOK=!1,this.loading=!1;return}sessionStorage.setItem("jwt",i.Token),this.accountService.getCurrent(!1).subscribe(s=>{this.authService.setLoggedInUser(s),this.authService.setLanguageForLoggedInUser(s),this.shoppingCartService.linkAndFetchPendingOrder().subscribe(d=>{this.pendingOrderService.getCurrentActive().subscribe(f=>{if(this.loading=!1,!f){this.afterSignIn();return}let v=te.for("events.index");this.shoppingCartService.setPendingOrderId(f.Id,null),this.shoppingCartService.setPendingOrderDetails(f);let M=sessionStorage.getItem("ai");M?v=f.InitiativeGuid!==M?"initiative":te.for("shopping-cart.index"):f.InitiativeGuid&&(sessionStorage.setItem("ai",f.InitiativeGuid),this.initiativeService.getStyling(f.InitiativeGuid).subscribe(w=>{w!==null&&(sessionStorage.setItem("ai_style",JSON.stringify(w)),this.layoutService.updateBackgroun
1d())})),M||(this.shoppingCartService.isTicketChangeBasket()||this.shoppingCartService.getEventIds().length>0||this.shoppingCartService.getMembershipIds().length>0?v=te.for("shopping-cart.index"):this.shoppingCartService.getPassePartoutIds().length>0&&(v=te.for("renewals.shopping-cart"))),this.router.navigateByUrl(v)})})})})}afterSignIn(){let e=sessionStorage.getItem("ai"),t=this.loginService.getAction();if(!t){this.router.navigateByUrl("");return}switch(this.loginService.clearAction(),t.action){case"startNewEventFlow":{let i;e&&e!=null?i=this.eventService.findWithGuid(t.params[1],t.params[0],e,!1):i=this.eventService.find(t.params[1],t.params[0]),i.subscribe(s=>{this.saleFlowHelper.startNewEventFlow(t.params[0],s,e).subscribe()});break}case"pageNavigation":{this.router.navigateByUrl(t[0]);break}case"compensation2021":{let i="tegemoetkoming2021/";t.params[0]===!1?i+="geentegemoetkoming":i+="tegemoetkoming",this.router.navigateByUrl(i);break}case"restitution2122":{let i="restitutie2122/";t.params[0]===!1?i+="geenrestitutie":i+="restitutie",this.router.navigateByUrl(i);break}}}};o.\u0275fac=function(t){return new(t||o)(r(O),r(Z),r(ve),r(C),r(A),r(Ge),r(D),r(J),r(Pe),r(xe),r(ke),r(me),r($),r(fe))},o.\u0275cmp=S({type:o,selectors:[["app-sso-account-connect"]],viewQuery:function(t,i){if(t&1&&G(Me,5),t&2){let s;j(s=B())&&(i.submitButton=s.first)}},standalone:!1,decls:26,vars:9,consts:[[3,"title"],[2,"height","100%"],["fxLayout","row","fxLayout.lt-lg","column",2,"height","100%"],["fxFlex","1 1 auto",1,"content"],["fxHide","true","fxHide.gt-lg","false"],["translationKey","VIEWS.ACCOUNT.SSO-CONNECT.HEADER"],[3,"ngSubmit","formGroup"],[1,"form-group"],["for","username"],["translationKey","FORM.FIELDS.USERNAME"],["id","username","name","username","formControlName","username","value","",1,"form-control"],["controlName","username",3,"form","messages"],["fxLayout","row","fxLayoutAlign","space-between"],["for","password"],["translationKey","FORM.FIELDS.PASSWORD"],[1,"forgot-password",3,"routerLink"],["translationKey","FORM.FIELDS.FORGOT-PASSWORD"],["id","password","type","password","name","password","formControlName","password","value","",1,"form-control"],["controlName","password",3,"form","messages"],[1,"text-center"],["type","green","size","full","text","BTN.LOGIN",3,"showLoader","disabled"],["fxFlex","1 1 auto",1,"content","content--alternative"],["translationKey","VIEWS.ACCOUNT.SSO-CONNECT.NO-ACCOUNT"],["type","green","size","full","text","VIEWS.ACCOUNT.SSO-CONNECT.BTN-NO-ACCOUNT",3,"click"]],template:function(t,i){t&1&&(m(0,"app-title-bar",0),c(1,"div",1)(2,"div",2)(3,"section",3)(4,"h2",4),m(5,"app-format-translation",5),a(),c(6,"form",6),h("ngSubmit",function(){return i.signin()}),c(7,"div",7)(8,"label",8),m(9,"app-format-translation",9),a(),m(10,"input",10)(11,"app-display-validation",11),a(),c(12,"div",7)(13,"div",12)(14,"label",13),m(15,"app-format-translation",14),a(),c(16,"a",15),m(17,"app-format-translation",16),a()(),m(18,"input",17)(19,"app-display-validation",18),a(),c(20,"div",19),m(21,"app-button",20),a()()(),c(22,"section",21)(23,"h2"),m(24,"app-format-translation",22),a(),c(25,"app-button",23),h("click",function(){return i.router.navigateByUrl("/account/sso-pre-register")}),a()()()()),t&2&&(u("title",i.headerTitle),p(6),u("formGroup",i.form),p(5),u("form",i.form)("messages",i.validationMessages),p(5),u("routerLink","/account/forgot-password"),p(3),u("form",i.form)("messages",i.validationMessages),p(2),u("showLoader",i.loading)("disabled",i.form.invalid))},dependencies:[z,K,H,Q,X,Y,F,ie,b,R,V,he,ee,Le,Ae],styles:[".forgot-password[_ngcontent-%COMP%]{font-size:.8em;padding-top:.2em;color:#ed1c24}"]});let n=o;return n})();var Ri=["profileForm"];function bi(n,o){n&1&&(c(0,"div",0)(1,"div",1),m(2,"i",2),a()())}function Ai(n,o){if(n&1){let l=L();c(0,"div",0)(1,"h3"),m(2,"app-format-translation",5),a(),c(3,"p"),m(4,"app-format-translation",6),a(),c(5,"div",7)(6,"div",8)(7,"button",9),h("click",function(){E(l);let t=g(2);return I(t.setState("existing"))}),m(8,"app-format-translation",10),a()(),c(9,"div",8)(10,"button",9),h("click",function(){E(l);let t=g(2);return I(t.redirectRegistration())}),m(11,"app-format-translation",11),a()()()(),m(12,"hr")}if(n&2){let l=g(2);p(7),ue(l.determineClass("existing")),p(3),ue(l.determineClass("new")),de("btn-secondary",l.knownCustomerState==="new")}}function Di(n,o){n&1&&(c(0,"div",3)(1,"div",26),m(2,"app-format-translation",27),a()())}function xi(n,o){if(n&1){let l=L();c(0,"app-button",28),h("click",function(){E(l);let t=g(3);return I(t.preRegister())}),a()}if(n&2){let l=g(3);
1u("showLoader",l.checkingPregister)("disabled",l.form.invalid)}}function Pi(n,o){if(n&1){let l=L();c(0,"div",3)(1,"h3"),m(2,"app-format-translation",12),a(),c(3,"p"),m(4,"app-format-translation",13),a(),c(5,"form",14)(6,"div",7)(7,"div",15)(8,"div",16)(9,"label",17),m(10,"app-format-translation",18),a(),c(11,"input",19),h("blur",function(t){E(l);let i=g(2);return I(i.inputBlur(t))}),a(),m(12,"app-display-validation",20),a()(),c(13,"div",15)(14,"div",16)(15,"label",21),m(16,"app-format-translation",22),a(),c(17,"input",23),h("blur",function(t){E(l);let i=g(2);return I(i.inputBlur(t))}),a(),m(18,"app-display-validation",24),a()()(),_(19,Di,3,0,"div",3),_(20,xi,1,2,"app-button",25),a()()}if(n&2){let l=g(2);p(5),u("formGroup",l.form),p(6),u("disableControl",l.contactDetails!==null),p(),u("form",l.form)("messages",l.validationMessages),p(5),u("disableControl",l.contactDetails!==null),p(),u("form",l.form)("messages",l.validationMessages),p(),T(l.preRegisterCheckPerformed&&l.contactDetails===null?19:-1),p(),T(l.displayRegisterForm?-1:20)}}function Li(n,o){n&1&&(c(0,"p"),m(1,"app-format-translation",34),a())}function ki(n,o){if(n&1){let l=L();c(0,"div")(1,"p"),m(2,"app-format-translation",35),a(),c(3,"div",36)(4,"div",37)(5,"input",38),Je("ngModelChange",function(t){E(l);let i=g(3);return $e(i.selectedEmail,t)||(i.selectedEmail=t),I(t)}),a(),c(6,"label",39),ne(7),a()()(),c(8,"div",36)(9,"div",40)(10,"input",41),Je("ngModelChange",function(t){E(l);let i=g(3);return $e(i.selectedEmail,t)||(i.selectedEmail=t),I(t)}),a(),c(11,"label",42),ne(12),a()()()()}if(n&2){let l=g(3);p(5),u("value",Ze(l.emailLocal)),Ye("ngModel",l.selectedEmail),p(2),Xe(l.emailLocal),p(3),u("value",Ze(l.emailSSO)),Ye("ngModel",l.selectedEmail),p(2),Xe(l.emailSSO)}}function Mi(n,o){if(n&1){let l=L();c(0,"div")(1,"div",29),_(2,Li,2,0,"p")(3,ki,13,8,"div"),c(4,"p"),m(5,"app-format-translation",30),a()(),c(6,"section",31)(7,"app-button",32),h("click",function(){E(l);let t=g(2);return I(t.cancelPreregister())}),a(),c(8,"app-button",33),h("click",function(){E(l);let t=g(2);return I(t.handlePreregister())}),a()()()}if(n&2){let l=g(2);p(2),T(l.contactDetails.CheckNeeded?3:2),p(5),u("uppercase",!1)}}function Ni(n,o){if(n&1&&(_(0,Ai,13,6),c(1,"div",0),_(2,Pi,21,9,"div",3),a(),m(3,"div",4),_(4,Mi,9,2,"div")),n&2){let l=g();T(l.showChoices?0:-1),p(),de("content--no-top",l.showChoices),p(),T(l.knownCustomerState==="existing"?2:-1),p(2),T(l.displayRegisterForm?4:-1)}}var pt=(()=>{let o=class o{get showChoices(){return this.registrationOpen&&this.activationAllowed}constructor(e,t,i,s){this.router=e,this.accountService=t,this.logger=i,this.configService=s,this.registrationOpen=!1,this.activationAllowed=!1,this.loaded=!1,this.validationMessages={PostalCode:[{type:"required",message:"FORM.VALIDATION.REQUIRED"}],Externalnumber:[{type:"required",message:"FORM.VALIDATION.REQUIRED"}]},this.checkingPregister=!1,this.displayRegisterForm=!1,this.preRegisterCheckPerformed=!1,this.contactDetails=null,this.knownCustomerState=null,this.selectedEmail=null}ngOnInit(){gt({ssoConfig:this.configService.getSSOConfig(),registrationConfig:this.configService.getRegistrationConfig()}).subscribe(({ssoConfig:e,registrationConfig:t})=>{if(!(e.isUsingSSO&&e.ssoProvider==="SA")){this.router.navigateByUrl("/");return}this.form=new q({PostalCode:new N("",[x.required]),Externalnumber:new N("",[x.required])}),this.registrationOpen=t.IsRegistrationOpen,this.activationAllowed=t.IsActivationAllowed,this.handleRegistrationConfig(),this.loaded=!0},e=>{this.logger.log(e),this.registrationOpen=!0,this.activationAllowed=!0,this.loaded=!0})}handleRegistrationConfig(){if(!this.registrationOpen&&!this.activationAllowed){this.router.navigate(["/account/login"]);return}if(this.registrationOpen&&!this.activationAllowed){this.redirectRegistration();return}if(!this.registrationOpen&&this.activationAllowed){this.knownCustomerState="existing",this.updateDisplayForm();return}}inputBlur(e){let t=e.target.value,i=e.target.getAttribute("formControlName");this.form.controls[i].patchValue(t)}setState(e){this.knownCustomerState=e,this.updateDisplayForm()}updateDisplayForm(){this.knownCustomerState==="new"?this.displayRegisterForm=!0:this.displayRegisterForm=this.contactDetails!=null}determineClass(e){return this.knownCustomerState===e?"btn btn--uppercase btn-secondary full-width":"btn btn--uppercase btn-outline-secondary full-width"}handlePreregister(){this.accountService.getSSOPreregistrationConnect(this.contactDetails.PreRegisterKey,this.selectedEmail,!1).subscribe(e=>{e===""?this.router.navigate(["/account/login"]):this.router.navigate(["/account/sso-account-connect/"+e])})}cancelPreregister(){this.router.navigate(["/account/sso-account-connect"])}preRegister(){let e=this.form.value;this.checkingPregister=!0,this.accountService.preRegisterFromSSO(e.PostalCode,e.Externalnumber,!1).subscribe(t=>{this.contactDetails=t,this.preRegisterCheckPerformed=!0,this.checkingPregister=!1,this.contactDetails.CheckNeeded?(this.emailLocal=this.contactDetails.Email,this.emailSSO=this.contactDetails.SAUserModel.Email):this.selectedEmail=this.contactDetails.Email,this.loadContactDetails()})}loadContactDetails(){this.updateDisplayForm()}redirectRegistration(){this.accountService.getSSORegistrationLink(!1).subscribe(e=>{e&&(document.location.href=e)}
1)}};o.\u0275fac=function(t){return new(t||o)(r(C),r(O),r(ce),r($))},o.\u0275cmp=S({type:o,selectors:[["app-sso-pre-register"]],viewQuery:function(t,i){if(t&1&&G(Ri,5),t&2){let s;j(s=B())&&(i.profileForm=s.first)}},standalone:!1,decls:4,vars:1,consts:[[1,"content","content--no-bottom"],[1,"text-center"],[1,"fas","fa-spinner","fa-spin","fa-2x"],[1,"pad-top"],[2,"margin-top","20px","margin-bottom","-60px"],["translationKey","VIEW.SSO-REGISTER.HEADER"],["translationKey","VIEW.SSO-REGISTER.SUBTITLE"],[1,"row"],[1,"col-sm-6","pad-top"],[3,"click"],["translationKey","BTN.EXISTINGCUSTOMER"],["translationKey","BTN.NEWCUSTOMER"],["translationKey","VIEW.SSO-PREREGISTER.HEADER"],["translationKey","VIEW.SSO-PREREGISTER.SUBTITLE"],[1,"form",3,"formGroup"],[1,"col"],[1,"form-group"],["for","externalnr"],["translationKey","FORM.FIELDS.EXTERNALNR"],["id","externalnr","trim","blur","type","text","name","Externalnumber","formControlName","Externalnumber",1,"form-control",3,"blur","disableControl"],["controlName","Externalnumber",3,"form","messages"],["for","postalcode"],["translationKey","FORM.FIELDS.POSTALCODE"],["id","postalcode","type","text","name","PostalCode","formControlName","PostalCode","trim","blur",1,"form-control",3,"blur","disableControl"],["controlName","PostalCode",3,"form","messages"],["type","primary","text","BTN.CHECK",3,"showLoader","disabled"],[1,"invalid-feedback"],["translationKey","FORM.VALIDATION.UNKNOWN-PREREG-CUSTOMER"],["type","primary","text","BTN.CHECK",3,"click","showLoader","disabled"],[1,"content"],["translationKey","VIEW.SSO-PREREGISTER.PROFILE-OK"],["fxLayout","row","fxLayout.lt-lg","column",1,"content","content--no-top"],["fxFlex","1 1 100%","type","text","size","full","text","BTN.CANCEL",3,"click","uppercase"],["fxFlex","1 1 100%","type","green","size","full","text","BTN.SSO-ACCOUNT-CONNECT",3,"click"],["translationKey","VIEW.SSO-PREREGISTER.TEXT-EMAIL-OK"],["translationKey","VIEW.SSO-PREREGISTER.TEXT-EMAIL-NOT-OK"],[1,"form-group","form-group-radio"],[1,"form-check","form-check-first"],["id","emailLocal","type","radio","name","email",1,"form-check-input",3,"ngModelChange","value","ngModel"],["for","emailLocal",1,"form-check-label"],[1,"form-check"],["id","emailSSO","type","radio","name","email",1,"form-check-input",3,"ngModelChange","value","ngModel"],["for","emailSSO",1,"form-check-label"]],template:function(t,i){t&1&&(c(0,"div"),m(1,"app-title-bar"),_(2,bi,3,0,"div",0)(3,Ni,5,5),a()),t&2&&(p(2),T(i.loaded?3:2))},dependencies:[z,K,xt,H,Q,Dt,X,Y,Fe,F,ie,b,R,V,ee,Ne],encapsulation:2});let n=o;return n})();var dt=(()=>{let o=class o{constructor(e){this.auth=e}ngOnInit(){this.auth.isLoggedIn().subscribe(e=>{e?this.auth.logOff(!0,!0):window.location.href="/dashboard"})}};o.\u0275fac=function(t){return new(t||o)(r(Z))},o.\u0275cmp=S({type:o,selectors:[["app-logoff"]],standalone:!1,decls:0,vars:0,template:function(t,i){},encapsulation:2});let n=o;return n})();var ut=(()=>{let o=class o{constructor(e,t,i){this.accountService=e,this.ssoHelper=t,this.router=i}ngOnInit(){this.ssoHelper.SASSOCookieIsSet()?this.accountService.registerProfileFromSSO(!1).subscribe(e=>{e?this.router.navigate(["/account/sso-account-connect/"+e]):this.router.navigate(["/account/login"])}):this.router.navigate(["/account/login"])}};o.\u0275fac=function(t){return new(t||o)(r(O),r(De),r(C))},o.\u0275cmp=S({type:o,selectors:[["app-sso-account-tryconnect"]],standalone:!1,decls:0,vars:0,template:function(t,i){},encapsulation:2});let n=o;return n})();var ri=(()=>{let o=class o{constructor(e,t,i,s,d,f){this.authService=e,this.route=t,this.router=i,this.accountService=s,this.loginService=d,this.loader=f,this.token=null}getCookieValue(e){let t=document.cookie.match(`(^|[^;]+)\\s*${e}\\s*=\\s*([^;]+)`);return t?t.pop():""}ngOnInit(){this.token=this.route.snapshot.queryParamMap.get("sso-token");let e=this.loader.open(),t=this.getCookieValue("_sa_sso_upid");if(sessionStorage.setItem("storedCookie",t),this.token==null){this.router.navigateByUrl("/account/sso-account-connect");return}this.accountService.getCurrent(!1).subscribe(i=>{this.authService.setLoggedInUser(i),this.authService.setLanguageForLoggedInUser(i),this.loginService.handleAfterLogin(i).subscribe(s=>{this.loader.close(e)})},()=>{this.loader.close(e),this.router.navigateByUrl("/")})}};o.\u0275fac=function(t){return new(t||o)(r(Z),r(A),r(C),r(O),r(me),r(ge))}
1,o.\u0275cmp=S({type:o,selectors:[["app-sso-token"]],standalone:!1,decls:0,vars:0,template:function(t,i){},encapsulation:2});let n=o;return n})();function Fi(n,o){if(n&1&&(c(0,"div",6),m(1,"br"),c(2,"span",8),ne(3),a()()),n&2){let l=g();p(3),be("(",l.detailsText,")")}}var ft=(()=>{let o=class o{constructor(e,t,i,s){this.route=e,this.router=t,this.layoutService=i,this.translate=s,this.message=null,this.ssoId=null,this.email=null,this.headerTitle="VIEWS.ACCOUNT.SSO-LOGIN-FAILED.TITLE",this.route.params.subscribe(d=>{d.message&&(this.message=d.message)}),this.route.queryParams.subscribe(d=>{d.ssoId&&(this.ssoId=d.ssoId),d.email&&(this.email=d.email)}),this.layoutService.updateLayout(new k(this.translate.instant(this.headerTitle),!1))}get hasDetails(){return!!this.ssoId||!!this.email}get detailsText(){let e=[];return this.ssoId&&e.push(`SSO ID: ${this.ssoId}`),this.email&&e.push(this.email),e.join(", ")}goToDashboard(){this.router.navigateByUrl("")}};o.\u0275fac=function(t){return new(t||o)(r(A),r(C),r(D),r(bt))},o.\u0275cmp=S({type:o,selectors:[["app-sso-login-failed"]],standalone:!1,decls:14,vars:4,consts:[[3,"title"],[2,"height","100%"],["fxLayout","row","fxLayout.lt-lg","column",2,"height","100%"],["fxFlex","1 1 auto",1,"content"],["translationKey","VIEWS.ACCOUNT.SSO-LOGIN-FAILED.MSG"],[3,"translationKey"],[1,"sso-error-details"],["type","green","text","VIEWS.ACCOUNT.SSO-LOGIN-FAILED.GO-TO-DASHBOARD",3,"click"],[1,"details-label"]],template:function(t,i){t&1&&(m(0,"app-title-bar")(1,"app-title-bar",0),c(2,"div",1)(3,"div",2)(4,"section",3)(5,"span"),m(6,"app-format-translation",4)(7,"app-format-translation",5),a(),_(8,Fi,4,1,"div",6),m(9,"br")(10,"br")(11,"br")(12,"br"),c(13,"app-button",7),h("click",function(){return i.goToDashboard()}),a()()()()),t&2&&(p(),u("title",i.headerTitle),p(6),u("translationKey",wt("VIEWS.ACCOUNT.SSO-LOGIN-FAILED.MSG.REASON.",i.message.toUpperCase())),p(),T(i.hasDetails?8:-1))},dependencies:[F,b,R,V,ee],styles:[".sso-error-details[_ngcontent-%COMP%]{margin-top:8px}.sso-error-details[_ngcontent-%COMP%] .details-label[_ngcontent-%COMP%]{color:#666;font-size:.9em;font-style:italic}"]});let n=o;return n})();var ai=[{path:"login",component:Ie,data:{title:"login"},canActivate:[we]},{path:"login/:reason",component:Ie,canActivate:[we]},{path:"forgot-password",component:rt,data:{title:"Forgot password"}},{path:"reset-password/:resetpwdkey",component:at},{path:"activate/:email/:activationkey",component:lt},{path:"signup",component:st},{path:"error",component:nt,data:{title:"Error"}},{path:"login-imp/:id/:token/:IsUsingRulesDraft",component:mt,data:{title:"login"}},{path:"sso-login",component:Oe},{path:"sso-login/:podid/:poduid",component:Oe},{path:"sso-login-failed/:message",component:ft},{path:"sso-token",component:ri},{path:"sso-account-connect",component:_e},{path:"sso-account-connect/:message",component:_e},{path:"sso-account-tryconnect",component:ut},{path:"sso-pre-register",component:pt},{path:"sso-logoff",component:dt},{path:"my-orders",canActivate:[Vt,Ut],component:ct},{path:"",redirectTo:"login",pathMatch:"full"},{path:"**",redirectTo:"/system/404"}],si=[{path:"login",component:Ie,data:{title:"login"}},{path:"login/:reason",component:Ie},{path:"forgot-password",component:rt,data:{title:"Forgot password"}},{path:"reset-password/:resetpwdkey",component:at},{path:"activate/:email/:activationkey",component:lt},{path:"signup",component:st},{path:"error",component:nt,data:{title:"Error"}},{path:"login-imp/:id/:token/:IsUsingRulesDraft",component:mt,data:{title:"login"}},{path:"sso-login",component:Oe},{path:"sso-login/:podid/:poduid",component:Oe},{path:"sso-login-failed/:message",component:ft},{path:"sso-account-connect",component:_e},{path:"sso-account-connect/:message",component:_e},{path:"sso-account-tryconnect",component:ut},{path:"sso-pre-register",component:pt},{path:"sso-logoff",component:dt},{path:"bundeling-login",component:Gt},{path:"my-orders",component:ct},{path:"",redirectTo:"login",pathMatch:"full"},{path:"**",redirectTo:"/system/404"}];var $n=(()=>{let o=class o{};o.\u0275fac=function(t){return new(t||o)}
1,o.\u0275mod=yt({type:o}),o.\u0275inj=vt({providers:[{provide:Rt,useFactory:e=>e.IsBusinessShop?si:ai,multi:!0,deps:[Lt]},we],imports:[_t,Pt,tt,ti,Yt,qt,jt,Qt,Bt,Wt,Ht,Xt,tt,At,zt,$t,et.forChild([]),et]});let n=o;return n})();export{$n as AccountModule};
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.