1import{b as Qe}from"./chunk-VLAAO4FH.js";import"./chunk-IWNMWJ2W.js";import"./chunk-H7CCOU6M.js";import"./chunk-TICZJ3OB.js";import"./chunk-RI5I43BI.js";import"./chunk-A7YH3TJI.js";import"./chunk-MCQQEV6H.js";import"./chunk-ZOCN6U4I.js";import"./chunk-2W7PDVXL.js";import"./chunk-Y7LV6N2E.js";import"./chunk-6WMWEIOS.js";import"./chunk-ZO4CFGV3.js";import"./chunk-JMFJFBUD.js";import"./chunk-MNDIYD7B.js";import"./chunk-3PGHLUKK.js";import"./chunk-X6WXLEJ5.js";import"./chunk-XUZPMCRD.js";import"./chunk-TMASSOMY.js";import"./chunk-Y52XVX6B.js";import"./chunk-D3VLNOII.js";import"./chunk-5N6ZNYUY.js";import"./chunk-P5BIUT3A.js";import"./chunk-2JPK6GHX.js";import"./chunk-QCZIRXSN.js";import"./chunk-5Q42DF5J.js";import"./chunk-IPAVTCJR.js";import"./chunk-CZQPPCI2.js";import"./chunk-EDINK3NC.js";import"./chunk-BOJ55PH3.js";import"./chunk-P6SMF36Q.js";import"./chunk-AKJJZDJ4.js";import"./chunk-G7MMMJCH.js";import{c as O,d as ze}from"./chunk-4MHYHNBE.js";import"./chunk-W74VQ2ZW.js";import"./chunk-MIXPOUNZ.js";import"./chunk-7IEM6YIL.js";import"./chunk-B4HBB6J6.js";import{B as Ae,Ga as Ve,Ha as Oe,J as Be,Ja as qe,K as Ue,Ka as He,ca as Pe,e as Ee,g as Z,i as De,j as Re,l as Te,ma as $e,o as Y,ob as We,q as Le,qa as J,u as Ne,x as ke,xa as Ge}from"./chunk-ROAQJP46.js";import{$e as T,$f as Se,Ac as ue,Ae as ye,Af as Fe,Bf as V,Ca as M,Da as l,Dc as fe,Ff as we,Gf as Q,Hb as m,He as G,Ib as c,Jb as v,K as ie,Kb as w,Ke as Ie,Lb as S,Na as re,Qb as pe,Tg as L,Ug as N,Vb as z,Yc as j,Zd as ve,ae as D,bc as de,cc as f,cd as $,ce as R,d as _,dc as x,eb as r,ec as C,fb as F,fc as le,fh as je,if as xe,jd as E,ka as P,ke as he,me as h,na as H,o as ee,oc as b,oh as k,p as te,pa as ne,pc as me,pf as Ce,ph as A,rb as se,sa as g,sd as ge,ta as d,tb as I,ua as W,ub as ae,va as u,vb as p,wa as oe,wf as be,xb as ce,xf as Me,yc as s,zc as a}from"./chunk-ADQO3XXX.js";import"./chunk-3JMZ37NM.js";var nt=()=>({cxRoute:"forgotPassword"});function ot(t,e){t&1&&v(0,"cx-spinner",8)}var rt=()=>({cxRoute:"register"}),st=()=>({cxRoute:"checkoutLogin"});function at(t,e){t&1&&(w(0),m(1,"a",3),s(2,"cxUrl"),f(3),s(4,"cxTranslate"),c(),S()),t&2&&(r(),p("routerLink",a(2,2,b(6,rt))),r(2),x(a(4,4,"loginForm.register")))}function ct(t,e){t&1&&(w(0),m(1,"a",4),s(2,"cxUrl"),f(3),s(4,"cxTranslate"),c(),S()),t&2&&(r(),p("routerLink",a(2,2,b(6,st))),r(2),x(a(4,4,"loginForm.guestCheckout")))}var pt=t=>({name:t}),dt=()=>({cxRoute:"login"});function lt(t,e){if(t&1&&(w(0),m(1,"div",2),f(2),s(3,"cxTranslate"),c(),v(4,"cx-page-slot",3),S()),t&2){let U=e.ngIf;r(2),C(" ",ue(3,1,"miniLogin.userGreeting",me(4,pt,U.name))," ")}}function mt(t,e){t&1&&(m(0,"a",4),s(1,"cxUrl"),f(2),s(3,"cxTranslate"),c()),t&2&&(p("routerLink",a(1,2,b(6,dt))),r(2),x(a(3,4,"miniLogin.signInRegister")))}var ut=()=>({cxRoute:"logout"});function ft(t,e){if(t&1&&(w(0),m(1,"div",2),f(2),c(),m(3,"a",3),s(4,"cxUrl"),f(5),s(6,"cxTranslate"),c(),S()),t&2){let U=e.ngIf;r(2),le("",U.title,"",U.name,""),r(),p("routerLink",a(4,4,b(8,ut))),r(2),C("",a(6,6,"myAccountV2User.signOut")," ")}}var K=(()=>{let e=class e{constructor(n,i,o){this.auth=n,this.globalMessage=i,this.winRef=o,this.busy$=new _(!1),this.isUpdating$=this.busy$.pipe(H(y=>{let X=this.winRef.nativeWindow?.history?.state?.newUid;X&&this.form.patchValue({userId:X}),y===!0?this.form.disable():this.form.enable()})),this.form=new Te({userId:new Y("",[Z.required,We.emailValidator]),password:new Y("",Z.required)})}login(){if(!this.form.valid){this.form.markAllAsTouched();return}this.busy$.next(!0),ee(this.auth.loginWithCredentials(this.form.value.userId.toLowerCase(),this.form.value.password)).pipe(ne(this.auth.isUserLoggedIn()),H(([n,i])=>this.onSuccess(i))).subscribe()}onSuccess(n){n&&(this.globalMessage.remove(Fe.MSG_TYPE_ERROR),this.form.reset()),this.busy$.next(!1)}};e.\u0275fac=function(i){return new(i||e)(u(T),u(V),u(G))},e.\u0275prov=g({token:e,factory:e.\u0275fac});let t=e;return t})(),gt=(()=>{let e=class e{constructor(n){this.service=n,this.form=this.service.form,this.isUpdating$=this.service.isUpdating$,this.style=!0}onSubmit(){this.service.login()}};e.\u0275fac=function(i){return new(i||e)(F(K))},e.\u0275cmp=M({type:e,selectors:[["cx-login-form"]],hostVars:2,hostBindings:function(i,o){i&2&&ce("user-form",o.style)},decls:25,vars:32,consts:[["class","overlay",4,"ngIf"],[3,"ngSubmit","formGroup"],[1,"label-content"],["required","true","type","email","formControlName","userId",1,"form-control",3,"placeholder"],[3,"control"],["required","true","type","password","formControlName","password","cxPasswordVisibilitySwitch","",1,"form-control",3,"placeholder"],[1,"btn-link",3,"routerLink"],["type","submit",1,"btn","btn-block","btn-primary",3,"disabled"],[1,"overlay"]],template:function(i,o){i&1&&(I(0,ot,1,0,"cx-spinner",0),s(1,"async"),m(2,"form",1),pe("ngSubmit",function(){return o.onSubmit()}),m(3,"label")(4,"span",2),f(5),s(6,"cxTranslate"),c(),v(7,"input",3),s(8,"cxTranslate"),v(9,"cx-form-errors",4),c(),m(10,"label")(11,"span",2),f(12),s(13,"cxTranslate"),c(),v(14,"input",5),s(15,"cxTranslate"),s(16,"cxTranslate"),v(17,"cx-form-errors",4),c(),m(18,"a",6),s(19,"cxUrl"),f(20),s(21,"cxTranslate"),c(),m(22,"button",7),f(23),s(24,"cxTranslate"),c()()),i&2&&(p("ngIf",a(1,13,o.isUpdating$)),r(2),p("formGroup",o.form),r(3),x(a(6,15,"loginForm.emailAddress.label")),r(2),z("placeholder",a(8,17,"loginForm.emailAddress.placeholder")),r(2),p("control",o.form.get("userId")),r(3),x(a(13,19,"loginForm.password.label")),r(2),z("placeholder",a(15,21,"loginForm.password.placeholder")),ae("aria-label",a(16,23,"loginForm.password.placeholder")),r(3),p("control",o.form.get("password")),r(),p("routerLink",a(19,25,b(31,nt))),r(2),C(" ",a(21,27,"loginForm.forgotPassword")," "),r(2),p("disabled",o.form.disabled),r(),C(" ",a(24,29,"loginForm.signIn")," "))},dependencies:[j,Le,Ee,De,Re,Ae,Ne,ke,D,Ve,Pe,qe,$,L,k],encapsulation:2,changeDetection:0});let t=e;return t})(),vt=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=l({type:e}),e.\u0275inj=d({providers:[h({cmsComponents:{ReturningCustomerLoginComponent:{component:gt,guards:[Q],providers:[{provide:K,useClass:K,deps:[T,V,G]}]}}})],imports:[E,Be,Ue,R,N,A,Oe,Ge,He]});let t=e;return t})(),ht=(()=>{let e=class e{constructor(n){this.activatedRoute=n,this.loginAsGuest=!1}ngOnInit(){this.loginAsGuest=this.activatedRoute.snapshot.queryParams.forced}};e.\u0275fac=function(i){return new(i||e)(F(ve))},e.\u0275cmp=M({type:e,selectors:[["cx-login-register"]],decls:6,vars:5,consts:[[1,"register"],[1,"cx-section-title"],[4,"ngIf"],[1,"btn","btn-block","btn-secondary","btn-register",3,"routerLink"],[1,"btn","btn-block","btn-secondary","btn-guest",3,"routerLink"]],template:function(i,o){i&1&&(m(0,"div",0)(1,"p",1),f(2),s(3,"cxTranslate"),c(),I(4,at,5,7,"ng-container",2)(5,ct,5,7,"ng-container",2),c()),i&2&&(r(2),C(" ",a(3,3,"loginForm.dontHaveAccount")," "),r(2),p("ngIf",!o.loginAsGuest),r(),p("ngIf",o.loginAsGuest))},dependencies:[j,D,L,k],encapsulation:2});let t=e;return t})(),yt=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=l({type:e}),e.\u0275inj=d({providers:[h({cmsComponents:{ReturningCustomerRegisterComponent:{component:ht,guards:[Q]}}})],imports:[E,R,N,J,A]});let t=e;return t})(),Ye=(()=>{let e=class e{constructor(n,i){this.auth=n,this.userAccount=i}ngOnInit(){this.user$=this.auth.isUserLoggedIn().pipe(P(n=>n?this.userAccount.get():te(void 0)))}};e.\u0275fac=function(i){return new(i||e)(F(T),F(O))},e.\u0275cmp=M({type:e,selectors:[["cx-login"]],decls:4,vars:4,consts:[["login",""],[4,"ngIf","ngIfElse"],[1,"cx-login-greet"],["id","account-nav","position","HeaderLinks"],["role","link",3,"routerLink"]],template:function(i,o){if(i&1&&(I(0,lt,5,6,"ng-container",1),s(1,"async"),I(2,mt,4,7,"ng-template",null,0,fe)),i&2){let y=de(3);p("ngIf",a(1,2,o.user$))("ngIfElse",y)}},dependencies:[j,D,$e,$,L,k],encapsulation:2});let t=e;return t})(),It=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=l({type:e}),e.\u0275inj=d({providers:[h({cmsComponents:{LoginComponent:{component:Ye}}})],imports:[E,R,N,J,A]});let t=e;return t})(),xt=(()=>{let e=class e extends Ye{};e.\u0275fac=(()=>{let n;return function(o){return(n||(n=re(e)))(o||e)}})(),e.\u0275cmp=M({type:e,selectors:[["cx-my-account-v2-user"]],features:[se],decls:3,vars:3,consts:[[1,"cx-my-account-v2-user"],[4,"ngIf"],[1,"cx-name"],[1,"cx-sign-out",3,"routerLink"]],template:function(i,o){i&1&&(m(0,"div",0),I(1,ft,7,9,"ng-container",1),s(2,"async"),c()),i&2&&(r(),p("ngIf",a(2,1,o.user$)))},dependencies:[j,D,$,L,k],encapsulation:2});let t=e;return t})(),Ct=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=l({type:e}),e.\u0275inj=d({providers:[h({cmsComponents:{MyAccountViewUserComponent:{component:xt,guards:[we]}}})],imports:[E,R,N,A]});let t=e;return t})(),Je=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=l({type:e}),e.\u0275inj=d({imports:[It,vt,yt,Ct]});let t=e;return t})();var Xe=new W("UserAccountNormalizer"),Ht=new W("UserAccountSerializer"),B=class{},_e=(()=>{let e=class e{constructor(n){this.adapter=n}get(n){return this.adapter.load(n)}};e.\u0275fac=function(i){return new(i||e)(u(B))},e.\u0275prov=g({token:e,factory:e.\u0275fac});let t=e;return t})(),Ke=(()=>{let e=class e{constructor(n,i,o){this.userAccountConnector=n,this.userIdService=i,this.query=o,this.userQuery=this.query.create(()=>this.userIdService.takeUserId(!0).pipe(P(y=>this.userAccountConnector.get(y))),{reloadOn:[ze],resetOn:[Me,be]})}getById(n){return this.userAccountConnector.get(n)}get(){return this.userQuery.get()}};e.\u0275fac=function(i){return new(i||e)(u(_e),u(ye),u(je))},e.\u0275prov=g({token:e,factory:e.\u0275fac});let t=e;return t})(),bt=[Ke,{provide:O,useExisting:Ke}],et=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=l({type:e}),e.\u0275inj=d({providers:[_e,...bt]});let t=e;return t})();var Mt={backend:{occ:{endpoints:{user:"users/${userId}"}}}},Ft=(()=>{let e=class e{constructor(n,i,o){this.http=n,this.occEndpoints=i,this.converter=o,this.logger=oe(Ie)}
1load(n){let i=this.occEndpoints.buildUrl("user",{urlParams:{userId:n}});return this.http.get(i).pipe(ie(o=>{throw Ce(o,this.logger)}),this.converter.pipeable(Xe))}};e.\u0275fac=function(i){return new(i||e)(u(ge),u(xe),u(Se))},e.\u0275prov=g({token:e,factory:e.\u0275fac});let t=e;return t})(),tt=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=l({type:e}),e.\u0275inj=d({providers:[h(Mt),{provide:B,useClass:Ft}]});let t=e;return t})();var it=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=l({type:e}),e.\u0275inj=d({imports:[et,tt,Je]});let t=e;return t})();var ai=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=l({type:e}),e.\u0275inj=d({providers:[he({cmsComponents:{ReturningCustomerLoginComponent:{component:Qe}}})],imports:[it]});let t=e;return t})();export{ai as SipUserAccountModule};
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.