1"use strict";(self.webpackChunkbwbmstore=self.webpackChunkbwbmstore||[]).push([[912],{1912(z,D,c){c.d(D,{UserProfileModule:()=>W});var s=c(1360),M=c(2731),i=c(7427),g=c(5558),I=c(6697),m=c(8141),C=c(6354),E=c(2917),A=c(9640),v=c(547);const T=new s.nKC("UserProfileNormalizer"),K=new s.nKC("UserProfileSerializer"),F=(new s.nKC("UserSerializer"),new s.nKC("UserSignUpSerializer")),V=new s.nKC("TitleNormalizer");class U{}let l=(()=>{class r{constructor(e){this.userProfileAdapter=e}update(e,t){return this.userProfileAdapter.update(e,t)}register(e){return this.userProfileAdapter.register(e)}registerGuest(e,t){return this.userProfileAdapter.registerGuest(e,t)}requestForgotPasswordEmail(e){return this.userProfileAdapter.requestForgotPasswordEmail(e)}resetPassword(e,t){return this.userProfileAdapter.resetPassword(e,t)}updateEmail(e,t,n){return this.userProfileAdapter.updateEmail(e,t,n)}updatePassword(e,t,n){return this.userProfileAdapter.updatePassword(e,t,n)}remove(e){return this.userProfileAdapter.close(e)}getTitles(){return this.userProfileAdapter.loadTitles()}static{this.\u0275fac=function(t){return new(t||r)(s.KVO(U))}}static{this.\u0275prov=s.jDH({token:r,factory:r.\u0275fac})}}return r})(),y=(()=>{class r{constructor(e,t,n){this.userIdService=e,this.userProfileConnector=t,this.command=n,this.updateCommand=this.command.create(o=>this.userIdService.takeUserId(!0).pipe((0,g.n)(a=>this.userProfileConnector.updateEmail(a,o.password,o.newUid))),{strategy:i.ZnJ.Queue})}update(e,t){return this.updateCommand.execute({password:e,newUid:t})}static{this.\u0275fac=function(t){return new(t||r)(s.KVO(i.y9w),s.KVO(l),s.KVO(i.NMT))}}static{this.\u0275prov=s.jDH({token:r,factory:r.\u0275fac})}}return r})(),R=(()=>{class r{constructor(e,t,n){this.userProfileConnector=e,this.userIdService=t,this.command=n,this.updateCommand=this.command.create(o=>this.userIdService.takeUserId(!0).pipe((0,I.s)(1),(0,g.n)(a=>this.userProfileConnector.updatePassword(a,o.oldPassword,o.newPassword)))),this.resetCommand=this.command.create(o=>this.userProfileConnector.resetPassword(o.token,o.password)),this.requestForgotPasswordEmailCommand=this.command.create(o=>this.userProfileConnector.requestForgotPasswordEmail(o.email))}update(e,t){return this.updateCommand.execute({oldPassword:e,newPassword:t})}reset(e,t){return this.resetCommand.execute({token:e,password:t})}requestForgotPasswordEmail(e){return this.requestForgotPasswordEmailCommand.execute({email:e})}static{this.\u0275fac=function(t){return new(t||r)(s.KVO(l),s.KVO(i.y9w),s.KVO(i.NMT))}}static{this.\u0275prov=s.jDH({token:r,factory:r.\u0275fac})}}return r})(),P=(()=>{class r{constructor(e,t,n,o,a,u,p){this.userAccountService=e,this.authService=t,this.userProfileConnector=n,this.eventService=o,this.userIdService=a,this.query=u,this.command=p,this.updateCommand=this.command.create(w=>this.userIdService.takeUserId(!0).pipe((0,g.n)(j=>this.userProfileConnector.update(j,w.details).pipe((0,m.M)(()=>{this.eventService.dispatch({user:w.details},E.lC)})))),{strategy:i.ZnJ.Queue}),this.closeCommand=this.command.create(()=>this.userIdService.takeUserId(!0).pipe((0,g.n)(w=>this.userProfileConnector.remove(w).pipe((0,m.M)(()=>this.authService.logout()))))),this.titleQuery=this.query.create(()=>this.userProfileConnector.getTitles(),{reloadOn:[i.ziu]})}get(){return this.userAccountService.get()}update(e){return this.updateCommand.execute({details:e})}close(){return this.closeCommand.execute(void 0)}getTitles(){return this.titleQuery.get().pipe((0,C.T)(e=>e??[]))}static{this.\u0275fac=function(t){return new(t||r)(s.KVO(E.zq),s.KVO(i.uRZ),s.KVO(l),s.KVO(i.USV),s.KVO(i.y9w),s.KVO(i.cqT),s.KVO(i.NMT))}}static{this.\u0275prov=s.jDH({token:r,factory:r.\u0275fac})}}return r})(),O=(()=>{class r{constructor(e,t,n,o,a){this.userProfile=e,this.userConnector=t,this.authService=n,this.command=o,this.store=a,this.featureConfigService=(0,s.WQX)(i.Ase),this.routingService=(0,s.WQX)(i.Oie),this.registerCommand=this.command.create(({user:u})=>this.userConnector.register(u).pipe((0,m.M)(()=>{this.store.dispatch(new i.zd8.RegisterUserSuccess)}))),this.registerGuestCommand=this.command.create(u=>this.userConnector.registerGuest(u.guid,u.password).pipe((0,m.M)(p=>{this.featureConfigService.isEnabled("authorizationCodeFlowByDefault")?this.routingService.go({cxRoute:"login"}):this.authService.loginWithCredentials(p.uid,u.password)})))}register(e){return this.registerCommand.execute({user:e})}registerGuest(e,t){return this.registerGuestCommand.execute({guid:e,password:t})}getTitles(){return this.userProfile.getTitles()}static{this.\u0275fac=function(t){return new(t||r)(s.KVO(P),s.KVO(l),s.KVO(i.uRZ),s.KVO(i.NMT),s.KVO(A.il))}}static{this.\u0275prov=s.jDH({token:r,factory:r.\u0275fac})}}return r})();const L=[y,R,P,O,{provide:v.Ir,useExisting:y},{provide:v.Dt,useExisting:R},{provide:v.t6,useExisting:P},{provide:v.LH,useExisting:O}];let x=(()=>{class r{static{this.\u0275fac=function(t){return new(t||r)}}static{this.\u0275mod=s.$C({type:r})}static{this.\u0275inj=s.G2t({providers:[l,...L]})}}return r})();var h=c(8989),S=c(5479),d=c(9437);const b={backend:{occ:{endpoints:{userRegister:"users",userForgotPassword:"forgottenpasswordtokens",userRestoreToken:"passwordRestoreToken",userResetPassword:"resetpassword",userUpdateLoginId:"users/${userId}/login",userUpdatePassword:"users/${userId}/password",titles:"titles"}}}},f={"Content-Type":"application/json"},N={"Content-Type":"application/x-www-form-urlencoded"};let k=(()=>
1{class r{constructor(e,t,n){this.http=e,this.occEndpoints=t,this.converter=n,this.logger=(0,s.WQX)(i.gPJ),this.captchaConfig=(0,s.WQX)(S.v$u,{optional:!0}),this.injector=(0,s.WQX)(s.zZn,{optional:!0})}update(e,t){const n=this.occEndpoints.isConfigured("userUpdateProfile")?"userUpdateProfile":"user",o=this.occEndpoints.buildUrl(n,{urlParams:{userId:e}});return t=this.converter.convert(t,K),this.http.patch(o,t).pipe((0,d.W)(a=>{throw(0,i.fT_)(a,this.logger)}))}register(e){const t=this.occEndpoints.buildUrl("userRegister");let n=new h.Lr({...f});return n=i.cXD.createHeader(i.ARF,!0,n),n=this.appendCaptchaToken(n),e=this.converter.convert(e,F),this.http.post(t,e,{headers:n}).pipe((0,d.W)(o=>{throw(0,i.fT_)(o,this.logger)}),this.converter.pipeable(T))}registerGuest(e,t){const n=this.occEndpoints.buildUrl("userRegister");let o=new h.Lr({...N});o=i.cXD.createHeader(i.ARF,!0,o),o=this.appendCaptchaToken(o);const a=(new h.Nl).set("guid",e).set("password",t);return this.http.post(n,a,{headers:o}).pipe((0,d.W)(u=>{throw(0,i.fT_)(u,this.logger)}),this.converter.pipeable(T))}requestForgotPasswordEmail(e){const t=this.occEndpoints.buildUrl("userRestoreToken"),n={loginId:e};let o=new h.Lr(f);return o=i.cXD.createHeader(i.ARF,!0,o),this.http.post(t,n,{headers:o}).pipe((0,d.W)(a=>{throw(0,i.fT_)(a,this.logger)}))}resetPassword(e,t){const n=this.occEndpoints.buildUrl("userResetPassword");let o=new h.Lr({...f});return o=i.cXD.createHeader(i.ARF,!0,o),this.http.post(n,{token:e,newPassword:t},{headers:o}).pipe((0,d.W)(a=>{throw(0,i.fT_)(a,this.logger)}))}updateEmail(e,t,n){const o=this.occEndpoints.buildUrl("userUpdateLoginId",{urlParams:{userId:e}}),a={newLoginId:n,password:t},u=new h.Lr(f);return this.http.post(o,a,{headers:u}).pipe((0,d.W)(p=>{throw(0,i.fT_)(p,this.logger)}))}updatePassword(e,t,n){const o=this.occEndpoints.buildUrl("userUpdatePassword",{urlParams:{userId:e}}),a={oldPassword:t,newPassword:n},u=new h.Lr(f);return this.http.post(o,a,{headers:u}).pipe((0,d.W)(p=>{throw(0,i.fT_)(p,this.logger)}))}close(e){const t=this.occEndpoints.isConfigured("userCloseAccount")?"userCloseAccount":"user",n=this.occEndpoints.buildUrl(t,{urlParams:{userId:e}});return this.http.delete(n).pipe((0,d.W)(o=>{throw(0,i.fT_)(o,this.logger)}))}loadTitles(){const e=this.occEndpoints.buildUrl("titles");return this.http.get(e).pipe((0,d.W)(t=>{throw(0,i.fT_)(t,this.logger)}),(0,C.T)(t=>t.titles??[]),this.converter.pipeableMany(V))}appendCaptchaToken(e){if(this.injector&&this.captchaConfig?.captchaRenderer){const t=this.injector.get(this.captchaConfig.captchaRenderer),n=t.getCaptchaConfig().subscribe(o=>o.enabled);if(t?.getToken()&&n)return e.append(i.hj4,t.getToken())}return e}static{this.\u0275fac=function(t){return new(t||r)(s.KVO(h.Qq),s.KVO(i.zxz),s.KVO(i.EmH))}}static{this.\u0275prov=s.jDH({token:r,factory:r.\u0275fac})}}return r})(),H=(()=>{class r{static{this.\u0275fac=function(t){return new(t||r)}}static{this.\u0275mod=s.$C({type:r})}static{this.\u0275inj=s.G2t({providers:[(0,i.rxX)(b),{provide:U,useClass:k}]})}}return r})(),W=(()=>{class r{static{this.\u0275fac=function(t){return new(t||r)}}static{this.\u0275mod=s.$C({type:r})}static{this.\u0275inj=s.G2t({imports:[x,H,M.pr,S.XHt]})}}return r})()}}]);
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.