1import{M as it,N as At}from"./chunk-VXCQCUJN.js";import{$a as m,$b as we,$e as St,Aa as U,Ba as y,Ca as I,Dd as Ot,Ha as Se,I as v,Ia as Pe,Ja as Me,K as X,Ka as D,Ke as Q,La as p,M as ee,Ma as V,Mb as N,Me as Je,Mf as k,N as L,Na as _,Ne as ae,Ob as Re,Oe as Et,P as ve,Pe as Z,Q as Oe,Rb as Y,S as G,T as f,Tb as g,U as Ee,Va as ye,Vb as xe,Wb as A,Wc as q,X as F,Xd as K,Y as j,Ya as ne,Yb as Te,Zb as Ne,Zd as Le,Ze as Ke,_b as b,_d as Ge,_e as Qe,ab as u,ac as w,ae as Fe,af as B,bb as Ie,be as je,bg as Xe,cb as z,ce as Ue,cg as Mt,d as fe,e as ge,ed as J,fb as O,fc as Be,fe as De,g as he,gc as vt,ha as a,he as Ve,ia as o,jf as Ze,k as _e,le as ze,m as Ce,mb as H,na as P,ne as He,pa as d,pd as ke,sb as Ae,sf as ce,tf as Pt,ti as et,ua as c,ub as be,uf as We,ui as yt,va as s,vb as oe,ve as Ye,wa as M,xa as te,xe as qe,xf as $e,ya as ie,ye as re,yj as tt,zj as It}from"./chunk-5VEDRA44.js";import{a as de,b as ue,e as l}from"./chunk-J4XOFOAH.js";var x,$=l(()=>{ee();L();Pt();O();A();St();w();x=(()=>{class e{constructor(t,i,n){this.router=t,this.confirmModalService=i,this.translateService=n}onError(t="OGONE.IN_ERROR.MESSAGE",i="CB",n=null,r){let h="/payment/register-cb/choose-brand",E={queryParams:{price:0}};return ce.PAY_REJECTED_PAYMENT_METHOD_ERROR_CODE===n&&(t="OGONE.IN_ERROR.REJECTED_PAYMENT_METHOD"),ce.PRE_AUTHORIZATION_ERROR_CODE===n&&(t="OGONE.IN_ERROR.PRE_AUTHORIZATION"),i==="SEPA"&&(h="/payment/register-sepa",E={queryParams:{processError:!0}}),he(this.router.navigate([h],E)).pipe(v(()=>this.translateService.get(t,r)),v(S=>{let T;return S===t?T="PROCESS.ERRORS.DEFAULT.ERROR":T=S,this.confirmModalService.confirm(T,"APP.OUPS","modal-md vls-matomo-register-cb-error vls-matomo-error",[{label:"OGONE.IN_ERROR.BUTTON_VALIDATE.LABEL",type:null}])}))}static{this.\u0275fac=function(i){return new(i||e)(G(g),G(Qe),G(Te))}}static{this.\u0275prov=ve({token:e,factory:e.\u0275fac})}}return e})()});function Tt(e,C){if(e&1){let t=U();c(0,"div",4)(1,"span",5),p(2),m(3,"translate"),s(),c(4,"div",6)(5,"button",7),y("click",function(){let n=F(t).ngIf,r=I();return j(r.onRegisterError(n.code))}),p(6," OK "),s()()()}if(e&2){let t=C.ngIf;a(2),V(u(3,1,t.message))}}var xt,me,ot=l(()=>{ee();L();Re();O();A();$();k();Je();oe();Mt();w();xt=["errorModal"];me=(()=>{class e{constructor(t,i,n,r,h,E,S){this.router=t,this.unifiedOgoneRedirectActionService=i,this._processService=n,this._userService=r,this._loaderGlobalService=h,this._contractCoreService=E,this._languagesService=S,this.registerError$=new fe,this.translateParams={preAuthorizationAmount:null}}ngOnInit(){this._loaderGlobalService.showLoadingAnimation(!0),this._contractCoreService.getContractFeature(N.Features.amountCBPreAuthorization).subscribe(t=>{this.translateParams.preAuthorizationAmount=(parseInt(t.parameter.value,10)/100).toLocaleString(this._languagesService.locale)}),this.validateRegisterPayment().subscribe(t=>{this._loaderGlobalService.showLoadingAnimation(!1);let i=t.paymentMethod==="CB"?"OGONE.IN_ERROR.MESSAGE":`PROCESS.ERRORS.${t.errorCode}`;t.inError===!0&&this.unifiedOgoneRedirectActionService.onError(i,t.paymentMethod,t.error?.code,this.translateParams).pipe(X(()=>this._loaderGlobalService.showLoadingAnimation(!1))).subscribe()})}validateRegisterPayment(){let t=this._userService.hostedCheckoutId,i=this._userService.paymentMethod;return this._contractCoreService.getContractFeature(N.Features.SendMailRegisterCBEnabled).pipe(Ce(n=>this._processService.registerPaymentMethod(this._userService.uuid,t,!!n.parameter.value)),X(n=>{n.inError===!1&&(localStorage.removeItem("processId"),sessionStorage.removeItem("scpt_p"),window.close())}),_e(n=>ue(de({},n),{paymentMethod:i})))}static{this.\u0275fac=function(i){return new(i||e)(o(g),o(x),o(We),o(ae),o(q),o(J),o(Q))}}static{this.\u0275cmp=f({type:e,selectors:[["vls-ogone-redirect-accept"]],viewQuery:function(i,n){if(i&1&&Se(xt,5),i&2){let r;Pe(r=Me())&&(n.modal=r.first)}},decls:5,vars:8,consts:[["errorModal",""],[3,"classes","title","wrapper","closeOnClickOutside","displayCloseButton"],[1,"container","px-4"],["class","text-center",4,"ngIf"],[1,"text-center"],[1,"l3-responsive","fw-bolder"],[1,"col-12","mb-3","d-flex","justify-content-center","mt-3"],[1,"btn","btn-outline-black","btn-rounded","btn-vls",3,"click"]],template:function(i,n){i&1&&(c(0,"vls-modal",1,0)(2,"div",2),P(3,Tt,7,3,"div",3),m(4,"async"),s()()),i&2&&(d("classes","modal-md vls-matomo-paiement-error vls-matomo-error")("title","APP.OUPS")("wrapper",!1)("closeOnClickOutside",!1)("displayCloseButton",!1),a(3),d("ngIf",u(4,6,n.registerError$)))},dependencies:[H,Xe,Ae,b],styles:["[_nghost-%COMP%]{display:block}[_nghost-%COMP%] section[_ngcontent-%COMP%]{text-align:center}[_nghost-%COMP%] .hidden[_ngcontent-%COMP%]{display:none}[_nghost-%COMP%] .hasError[_ngcontent-%COMP%]{color:#ff0039}"]})}}return e})()});var rt=l(()=>{ot()});var le,at=l(()=>{ee();k();O();A();$();yt();It();w();le=(()=>{class e{constructor(t,i,n){this.router=t,this.activatedRoute=i,this._unifiedOgoneRedirectActionService=n,this.subject=ne
1w ge(!1)}ngOnInit(){return this._unifiedOgoneRedirectActionService.onError().subscribe()}redirectTo(){this._unifiedOgoneRedirectActionService.onError().subscribe()}static{this.\u0275fac=function(i){return new(i||e)(o(g),o(Y),o(x))}}static{this.\u0275cmp=f({type:e,selectors:[["vls-ogone-redirect-exception"]],features:[ye([$e])],decls:11,vars:8,consts:[[3,"rightBackImagePosition","rightBackImageUrl"],["leftSideContent",""],["header",""],[1,"container-title","text-dark","fw-bolder"],[1,"btn","rounded-3","btn-vls","btn-primary",3,"click"],["rightSide",""]],template:function(i,n){i&1&&(c(0,"vls-split-form-container",0)(1,"div",1)(2,"div",2)(3,"h1",3),p(4),m(5,"translate"),s(),c(6,"a",4),y("click",function(){return n.redirectTo()}),p(7),m(8,"translate"),s()()(),M(9,"div",5),s(),M(10,"vls-light-footer")),i&2&&(d("rightBackImagePosition","right")("rightBackImageUrl","assets/img/velo-3d.png"),a(4),_(" ",u(5,4,"OGONE.IN_ERROR.MESSAGE")," "),a(3),_(" ",u(8,6,"OGONE.IN_ERROR.BUTTON_VALIDATE.LABEL")," "))},dependencies:[et,tt,b],styles:["[_nghost-%COMP%]{display:block}[_nghost-%COMP%] section[_ngcontent-%COMP%]{text-align:center}"]})}}return e})()});var ct=l(()=>{at()});var st=l(()=>{});var pt=l(()=>{st();k();Et()});var mt=l(()=>{pt()});function Bt(e,C){e&1&&(c(0,"p"),p(1),m(2,"translate"),s()),e&2&&(a(),V(u(2,1,"OGONE.BANK-LEVY-ALERT-MESSAGE")))}function kt(e,C){if(e&1&&M(0,"p",17),e&2){let t=I();d("translate","OGONE.BANK-LEVY-ALERT-MESSAGE-PRE-AUTHORIZATION")("translateParams",ne(2,lt,t.preAuthorizationAmount))}}function Lt(e,C){e&1&&(te(0),p(1),m(2,"translate"),ie()),e&2&&(a(),_(" ",u(2,1,"OGONE.CB-REGISTER-AUTH-BY-INGENICO-MESSAGE-VLD")," "))}function Gt(e,C){e&1&&(te(0),p(1),m(2,"translate"),ie()),e&2&&(a(),_(" ",u(2,1,"OGONE.CB-REGISTER-AUTH-BY-INGENICO-MESSAGE")," "))}function Ft(e,C){if(e&1&&P(0,Gt,3,3,"ng-container",8),e&2){let t=I(),i=D(16);d("ngIf",t.preAuthorizationAmount==="0")("ngIfElse",i)}}function jt(e,C){if(e&1&&(p(0),m(1,"translate")),e&2){let t=I();_(" ",Ie(1,1,"OGONE.CB-REGISTER-AUTH-BY-INGENICO-MESSAGE-PRE-AUTHORIZATION",ne(4,lt,t.preAuthorizationAmount))," ")}}var lt,dt,ut=l(()=>{re();L();Re();Ot();Le();O();k();Ke();A();re();Je();oe();w();lt=e=>({preAuthorizationAmount:e});dt=(()=>{class e{static{this.EURO_TO_CENTS_MULTIPLIER=100}constructor(t,i,n,r,h,E,S,T){this._orderService=t,this._payApiService=i,this._userService=n,this.activatedRoute=r,this.router=h,this._fb=E,this._contractCoreService=S,this._languagesService=T,this.title="ACCOUNT.MIGRATION.STEPS.EXTRA_INFORMATIONS.ADD_CB.TITLE",this.subTitle="ACCOUNT.MIGRATION.STEPS.EXTRA_INFORMATIONS.ADD_CB.SUBTITLE"}get offerTypes(){return ke}ngOnInit(){this.activatedRoute.queryParams.subscribe(i=>{this._orderService.order.amount=+i.price/e.EURO_TO_CENTS_MULTIPLIER,sessionStorage.setItem("scpt_p",this._orderService.order.amount.toString())}),this.cbForm=this._fb.group({cbauth:new De("",Fe.requiredTrue)});let t=JSON.parse(sessionStorage.getItem("offer"));t instanceof Object&&(this.offerType=t.type),this._contractCoreService.getContractFeature(N.Features.amountCBPreAuthorization).subscribe(i=>{this.preAuthorizationAmount=(parseInt(i.parameter.value,10)/100).toLocaleString(this._languagesService.locale)})}submitForm(){this._userService.currentUserAccount().pipe(v(t=>this._payApiService.getCheckoutPage(t,K.CreditCard))).subscribe({next:t=>window.location.href=t,error:t=>this.router.navigate(["payment","ogone_redirect_exception"])})}static{this.\u0275fac=function(i){return new(i||e)(o(Ze),o(Z),o(B),o(Y),o(g),o(Ye),o(J),o(Q))}}static{this.\u0275cmp=f({type:e,selectors:[["vls-choose-cb"]],decls:25,vars:12,consts:[["elsePreAuthorization",""],["elseOgone",""],["elseOgonePreAuthorization",""],[1,"wrapper"],["novalidate","",1,"container","clearfix",3,"ngSubmit","formGroup"],[1,"row"],[1,"col-12"],[1,"mt-4","l4-responsive","text-regular-primary-normal"],[4,"ngIf","ngIfElse"],[1,"mt-4"],[1,"form-check"],["type","checkbox","formControlName","cbauth","id","cbauth",1,"form-check-input"],["for","cbauth",1,"l5-responsive","text-regular","black-normal","form-check-label","height-auto"],[1,"col-12","pt-3"],[1,"l5-responsive","fw-bolder"],[1,"col-12","d-flex","justify-content-center"],["type","submit",1,"btn","btn-primary","btn-vls","px-5","text-uppercase","mb-2",3,"disabled"],[3,"translate","translateParams"]],template:function(i,n){if(i&1){let r=U();c(0,"div",3)(1,"form",4),y("ngSubmit",function(){return F(r),j(n.submitForm(
1))}),c(2,"div",5)(3,"div",6)(4,"div",7),P(5,Bt,3,3,"p",8)(6,kt,1,4,"ng-template",null,0,z),s(),c(8,"div",9)(9,"div",10),M(10,"input",11),c(11,"label",12),P(12,Lt,3,3,"ng-container",8)(13,Ft,1,2,"ng-template",null,1,z)(15,jt,2,6,"ng-template",null,2,z),s()()()(),c(17,"div",13)(18,"span",14),p(19),m(20,"translate"),s()(),c(21,"div",15)(22,"button",16),p(23),m(24,"translate"),s()()()()()}if(i&2){let r=D(7),h=D(14);a(),d("formGroup",n.cbForm),a(4),d("ngIf",n.preAuthorizationAmount==="0")("ngIfElse",r),a(7),d("ngIf",n.offerType===n.offerTypes.UniqueBike||n.offerType===n.offerTypes.PARKING)("ngIfElse",h),a(7),_(" ",u(20,8,"OGONE.CB-REDIRECTION-TO-PARTNER"),""),a(3),d("disabled",!n.cbForm.valid),a(),_(" ",u(24,10,"OGONE.BUTTON_VALIDATE.LABEL")," ")}},dependencies:[H,Ve,Ge,je,Ue,ze,He,Ne,b],encapsulation:2})}}return e})()});var ft,gt=l(()=>{L();Le();O();Ke();k();A();ft=(()=>{class e{constructor(t,i,n,r){this._payApiService=t,this._userService=i,this._loaderGlobalService=n,this.router=r}ngOnInit(){let i=new URLSearchParams(window.location.search).get("processError");(i===null||!i)&&(this._loaderGlobalService.showLoadingAnimation(!0),this._userService.currentUserAccount().pipe(v(n=>this._payApiService.getCheckoutPage(n,K.SEPA))).subscribe({next:n=>window.location.href=n,error:n=>this.router.navigate(["payment","ogone_redirect_exception"])}))}static{this.\u0275fac=function(i){return new(i||e)(o(Z),o(B),o(q),o(g))}}static{this.\u0275cmp=f({type:e,selectors:[["vls-choose-sepa"]],decls:0,vars:0,template:function(i,n){},encapsulation:2})}}return e})()});var ht,_t=l(()=>{O();ht=(()=>{class e{ngOnInit(){window.close()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=f({type:e,selectors:[["vls-ogone-redirect-decline"]],decls:0,vars:0,template:function(i,n){},encapsulation:2})}}return e})()});var Ct,Gi,Ut=l(()=>{w();re();oe();A();vt();At();rt();ct();mt();ut();gt();$();_t();O();
1Ct=[{path:"register-cb/choose-brand",component:dt,data:{skipRouteLocalization:!0,nav:{navbar:{display:!0},sidebar:{display:!0},banner:{display:!0}}}},{path:"register-sepa",component:ft,data:{skipRouteLocalization:!0,nav:{navbar:{display:!0},sidebar:{display:!0},banner:{display:!0}}}},{path:"ogone_redirect_accept",component:me,data:{skipRouteLocalization:!0}},{path:"ogone_redirect_exception",component:le,data:{skipRouteLocalization:!0}},{path:"ogone_redirect_decline",component:ht,data:{skipRouteLocalization:!0}}],Gi=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=Ee({type:e})}static{this.\u0275inj=Oe({providers:[x],imports:[be,qe,xe.forChild(Ct),Be.forChild(Ct),we,it]})}}return e})()});Ut();export{Gi as PaymentModule};
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.