PageSourceSearch

https://eshop.orange.eg/installments.js

js orange.eg collected 2026-09-24 17:40:29 UTC 58,527 bytes, 2 lines download raw bytes

1import{a as He}from"./chunk-45.js";import{b as ze}from"./chunk-7.js";import"./chunk-22.js";import{a as We}from"./chunk-52.js";import{a as $e}from"./chunk-11.js";import"./chunk-35.js";import{a as Te}from"./chunk-53.js";import"./chunk-18.js";import{a as K}from"./chunk-14.js";import{b as we,c as R,d as De,e as ke,h as Ne,i as Be,j as Ae,m as Fe,n as Oe,o as Ve,p as Ue,q as Le,r as Re,w as qe,y as Ge}from"./chunk-21.js";import{h as Ye}from"./chunk-38.js";import"./chunk-56.js";import"./chunk-13.js";import"./chunk-15.js";import"./chunk-4.js";import{b as M,l as k,q as le}from"./chunk-20.js";import"./chunk-30.js";import"./chunk-33.js";import{a as Me}from"./chunk-51.js";import{a as Ee}from"./chunk-43.js";import{a as Pe}from"./chunk-40.js";import{a as D}from"./chunk-26.js";import{ba as Ce}from"./chunk-32.js";import{e as xe}from"./chunk-55.js";import{A as be,y as Ie}from"./chunk-25.js";import{i as fe,k as _e,o as ve,q as Se}from"./chunk-12.js";import{$b as ne,$c as j,Hc as ce,I as X,Jc as V,Kc as he,L as se,Lc as ye,Ob as _,Pb as v,Qc as re,Rc as u,Sb as q,Sc as c,Tb as G,Tc as z,U as me,Ub as g,V as ee,Vb as l,Vc as ge,Wb as s,Xb as S,Ya as te,Za as W,a as Y,ac as A,ad as Z,b as $,ba as de,cb as r,ec as P,ga as T,gc as h,i as Q,la as I,ma as b,na as w,oa as B,pb as pe,pc as ie,rc as F,s as L,uc as m,va as x,vb as ue,vc as O,wc as p,yc as ae}from"./chunk-49.js";var J=class i{http=T(xe);cartService=T(K);loading=x(!1);error=x(null);selectedPaymentMethodSystemName=x(null);selectSecondInFlight=null;selectSecondInFlightKey=null;get endpoints(){return{premierPaymentInfo:k(D.PAYMENT_PREMIER_INSTALLMENT),employeePaymentInfo:k(D.PAYMENT_EMPLOYEE_INSTALLMENT),premierCreditCardOptions:k(D.PAYMENT_PREMIER_INSTALLMENT_CARD_OPTIONS),premierCreditCardOptionContent:k(D.PAYMENT_PREMIER_INSTALLMENT_CARD_OPTION_CONTENT),employeeCreditCardOptions:k(D.PAYMENT_EMPLOYEE_INSTALLMENT_CARD_OPTIONS),employeeCreditCardOptionContent:k(D.PAYMENT_EMPLOYEE_INSTALLMENT_CARD_OPTION_CONTENT),premierDurationsByBank:k(D.PAYMENT_PREMIER_INSTALLMENT_DURATIONS),employeeDurationsByBank:k(D.PAYMENT_EMPLOYEE_INSTALLMENT_DURATIONS),premierSecondPaymentMethods:k(D.PAYMENT_PREMIER_INSTALLMENT_SECOND_PAYMENT_METHOD),employeeSecondPaymentMethods:k(D.PAYMENT_EMPLOYEE_INSTALLMENT_SECOND_PAYMENT_METHOD),installmentTotalsUpdate:k(D.PAYMENT_INSTALLMENT_TOTALS_UPDATE),selectSecondPaymentMethod:k(D.PAYMENT_INSTALLMENT_SELECT_SECOND_PAYMENT_METHOD),validatePremierInstallmentForm:k(D.PAYMENT_PREMIER_VALIDATE_INSTALLMENT_FORM),validateEmployeeInstallmentForm:k(D.PAYMENT_EMPLOYEE_VALIDATE_INSTALLMENT_FORM)}}async getPaymentInfo(e){this.loading.set(!0),this.error.set(null);try{return await L(this.http.post(e==="Employee"?this.endpoints.employeePaymentInfo:this.endpoints.premierPaymentInfo,{}))}catch(t){let n=t?.message,a=t?.error,o=a&&typeof a=="object"?a:{Error:n,IsUserEligible:!1,Durations:[]};return this.error.set(o?.Error||o?.ErrorMessage||n),o}finally{this.loading.set(!1)}}async getCreditCardOptions(e){this.loading.set(!0),this.error.set(null);try{return(await L(this.http.get(e==="Employee"?this.endpoints.employeeCreditCardOptions:this.endpoints.premierCreditCardOptions)))?.CreditCardOptions??null}catch(t){return this.error.set(t?.message||"Failed to load card options"),null}finally{this.loading.set(!1)}}async getCreditCardOptionContent(e,t){this.loading.set(!0),this.error.set(null);try{let n=`${t==="Employee"?this.endpoints.employeeCreditCardOptionContent:this.endpoints.premierCreditCardOptionContent}?option=${e}`;return await L(this.http.get(n))}catch(n){return this.error.set(n?.message||"Failed to load option content"),null}finally{this.loading.set(!1)}}async getDurationsByBank(e,t="Premier"){this.loading.set(!0),this.error.set(null);try{let a=`${t==="Employee"?this.endpoints.employeeDurationsByBank:this.endpoints.premierDurationsByBank}?bankName=${encodeURIComponent(e)}`;return await L(this.http.get(a))}catch(n){return this.error.set(n?.message||"Failed to load durations"),null}finally{this.loading.set(!1)}}async getSecondPaymentMethods(e){this.loading.set(!0),this.error.set(null);try{return await L(this.http.get(e==="Employee"?this.endpoints.employeeSecondPaymentMethods:this.endpoints.premierSecondPaymentMethods))}catch(t){return this.error.set(t?.message||"Failed to load second payment methods"),null}finally{this.loading.set(!1)}}async selectSecondPaymentMethod(e){let t=e.PaymentMethodSystemName??"";
1if(this.selectSecondInFlight&&this.selectSecondInFlightKey===t)return this.selectSecondInFlight;this.loading.set(!0),this.error.set(null),this.selectSecondInFlightKey=t;let n=(async()=>{try{let a=await L(this.http.post(this.endpoints.selectSecondPaymentMethod,e));if(!a?.Success||a?.Data?.IsValid===!1){let o=a?.Message||a?.Data?.Errors?.[0]||"Failed to select second payment method";this.error.set(o),this.selectedPaymentMethodSystemName.set(null)}else this.selectedPaymentMethodSystemName.set(e.PaymentMethodSystemName??null),await this.cartService.refresh(!0,{fullCartContext:!0}).catch(()=>null);return a??null}catch(a){return this.error.set(a?.message||"Failed to select second payment method"),this.selectedPaymentMethodSystemName.set(null),null}finally{this.loading.set(!1),this.selectSecondInFlight=null,this.selectSecondInFlightKey=null}})();return this.selectSecondInFlight=n,n}async updateInstallmentTotals(e){this.loading.set(!0),this.error.set(null);try{return await L(this.http.post(this.endpoints.installmentTotalsUpdate,e))??null}catch(t){return this.error.set(t?.message||"Failed to update installment totals"),null}finally{this.loading.set(!1)}}async validatePaymentForm(e,t){this.loading.set(!0),this.error.set(null);
1let n=e==="Employee"?this.endpoints.validateEmployeeInstallmentForm:this.endpoints.validatePremierInstallmentForm;try{let a=await L(this.http.post(n,t)),o=a?.IsValid??!1,d=a?.Warnings||[];if(!o){let y=d[0]||"Installment validation failed";this.error.set(y)}return a||null}catch(a){let o=a?.error,d=o&&typeof o=="object"?{IsValid:o?.IsValid??!1,Warnings:Array.isArray(o?.Warnings)?o.Warnings:[]}:null;return this.error.set(d?.Warnings?.[0]||a?.error?.Message||a?.message||"Installment validation failed"),d}finally{this.loading.set(!1)}}setSelectedPaymentMethod(e){this.selectedPaymentMethodSystemName.set(e)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=de({token:i,factory:i.\u0275fac,providedIn:"root"})};var Je=(i,e,t,n,a,o,d)=>({type:"Premier",info:i,form:e,creditCardOptions:t,cardTypes:n,banks:a,bankDurations:o,secondMethods:d}),Qe=(i,e,t,n,a,o,d)=>({type:"Employee",info:i,form:e,creditCardOptions:t,cardTypes:n,banks:a,bankDurations:o,secondMethods:d}),Xe=()=>[],et=()=>({en:"Your current installment limit does not cover the full order amount. The remaining balance must be settled via another payment method to complete your order",ar:"\u062D\u062F \u0627\u0644\u062A\u0642\u0633\u064A\u0637 \u0627\u0644\u062D\u0627\u0644\u064A \u0644\u0627 \u064A\u063A\u0637\u064A \u0643\u0627\u0645\u0644 \u0642\u064A\u0645\u0629 \u0627\u0644\u0637\u0644\u0628. \u064A\u062C\u0628 \u062A\u0633\u0648\u064A\u0629 \u0627\u0644\u0645\u0628\u0644\u063A \u0627\u0644\u0645\u062A\u0628\u0642\u064A \u0628\u0627\u0633\u062A\u062E\u062F\u0627\u0645 \u0637\u0631\u064A\u0642\u0629 \u062F\u0641\u0639 \u0623\u062E\u0631\u0649 \u0644\u0625\u062A\u0645\u0627\u0645 \u0627\u0644\u0637\u0644\u0628."}),tt=()=>({en:"Orange Employees Vouchers",ar:"\u0642\u0633\u064A\u0645\u0629 \u0627\u0644\u0645\u0648\u0638\u0641\u064A\u0646"}),nt=()=>({en:"Recognition voucher",ar:"\u0642\u0633\u064A\u0645\u0629 \u062A\u0642\u062F\u064A\u0631"}),it=()=>({en:"EGP 1000 voucher",ar:"\u0642\u0633\u064A\u0645\u0629 1000 \u062C\u0646\u064A\u0647"}),at=()=>({en:"Handset voucher",ar:"\u0642\u0633\u064A\u0645\u0629 \u062C\u0647\u0627\u0632"}),rt=()=>({en:"An upfront payment of EGP",ar:"\u064A\u062A\u0637\u0644\u0628 \u062F\u0641\u0639 \u0645\u0628\u0644\u063A \u0645\u0642\u062F\u0645 \u0642\u062F\u0631\u0647"}),lt=()=>({en:"You may select any available payment method",ar:"\u064A\u0645\u0643\u0646\u0643 \u0627\u062E\u062A\u064A\u0627\u0631 \u0623\u064A \u0637\u0631\u064A\u0642\u0629 \u062F\u0641\u0639 \u0645\u062A\u0627\u062D\u0629"}),ot=()=>({en:"You may pay an optional upfront amount of to reduce your monthly installments. Choose any payment method you prefer.",ar:"\u064A\u0645\u0643\u0646\u0643 \u062F\u0641\u0639 \u0645\u0628\u0644\u063A \u0645\u0642\u062F\u0645 \u0627\u062E\u062A\u064A\u0627\u0631\u064A \u0644\u062A\u0642\u0644\u064A\u0644 \u0642\u064A\u0645\u0629 \u0627\u0644\u0623\u0642\u0633\u0627\u0637 \u0627\u0644\u0634\u0647\u0631\u064A\u0629. \u0627\u062E\u062A\u0631 \u0623\u064A \u0637\u0631\u064A\u0642\u0629 \u062F\u0641\u0639 \u062A\u0646\u0627\u0633\u0628\u0643"}),st=(i,e)=>({"border-orange-500":i,"border-gray-300":e}),mt=i=>({"rotate-180":i}),dt=(i,e)=>e.PaymentMethodSystemName,H=(i,e)=>e.Value;function pt(i,e){if(i&1&&(l(0,"div",30),m(1),u(2,"translate"),l(3,"b",31),m(4),s(),m(5),u(6,"translate"),s()),i&2){let t=h().$implicit,n=h();r(),p(" ",c(2,3,"app.payment.givesYou")," "),r(3),O(n.getDiscountLabel(t)),r(),p(" ",c(6,5,"app.payment.off")," ")}}function ut(i,e){if(i&1){let t=A();l(0,"div",16)(1,"label",20),P("click",function(){let a=I(t).$implicit,o=h();return b(o.setSelectedProvider(a.PaymentMethodSystemName))}),S(2,"img",21),l(3,"div",22)(4,"h2",23)(5,"span"),m(6),s(),l(7,"div"),S(8,"input",24),l(9,"span",25)(10,"span",26),w(),l(11,"svg",27),S(12,"path",28)(13,"path",29),s()()()()(),B(),l(14,"p",8),m(15),s(),_(16,pt,7,7,"div",30),s()()()}if(i&2){let t=e.$implicit,n=h();r(),F("border-orange",n.buyNowSelectedProvider()===t.PaymentMethodSystemName),r(),g("src",t.LogoUrl,W),r(4),O(t.Name),r(2),g("value",t.PaymentMethodSystemName)("checked",n.buyNowSelectedProvider()===t.PaymentMethodSystemName),r(2),F("opacity-100",n.buyNowSelectedProvider()===t.PaymentMethodSystemName),r(5),O(t.Description),r(),v(n.getDiscountLabel(t)?16:-1)}}function ct(i,e){i&1&&(w(),l(0,"svg",32),S(1,"circle",33)(2,"path",34),s(),m(3),u(4,"translate")),i&2&&(r(3),p(" ",c(4,1,"app.common.processing")," "))}function ht(i,e){i&1&&(m(0),u(1,"translate")),i&2&&p(" ",c(1,1,"app.payment.placeOrder")," ")}function yt(i,e){if(i&1&&(l(0,"div",41),m(1),u(2,"translate"),l(3,"b",31),m(4),s(),m(5),u(6,"translate"),s()),i&2){let t=h(2);r(),p(" ",c(2,3,"app.payment.givesYou")," "),r(3),p(" ",t.getDiscountLabelBySystemName(t.PaymentMethodSystemNames.PremierInstallment)," "),r(),p(" ",c(6,5,"app.payment.off")," ")}}function gt(i,e){i&1&&(l(0,"div",42),m(1),u(2,"translate"),s()),i&2&&(r(),p(" ",c(2,1,"app.list.loading")," "))}function ft(i,e){if(i&1&&(l(0,"div",43),w(),l(1,"svg",45),S(2,"path",46)(3,"path",47),s(),B(),l(4,"div")(5,"p",48),m(6),u(7,"translate"),s(),S(8,"p",49),s()()),i&2){let t=h(2);r(6),p(" ",c(7,2,"app.payment.notEligible")," "),r(2),g("innerHTML",t.premierIneligibilityReason(),te)}}function _t(i,e){if(i&1&&ne(0,44),i&2){let t=h(2),n=ie(37);g("ngTemplateOutlet",n)("ngTemplateOutletContext",re(2,Je,t.premierInfo(),t.premierInstallmentUpdateForm,t.premierCredit
1CardOptions(),t.premierCardTypes(),t.premierBanks(),t.premierBankDurations(),t.premierSecondMethods()))}}function vt(i,e){if(i&1){let t=A();l(0,"li",2),P("click",function(){I(t);let a=h();return b(a.openPanel("Premier"))}),l(1,"div",35)(2,"div",4),w(),l(3,"svg",36),S(4,"rect",37),l(5,"g",38),S(6,"rect",39)(7,"rect",40),s()()(),B(),l(8,"div",6)(9,"p",7),m(10),u(11,"translate"),s(),l(12,"p",8),m(13),u(14,"translate"),s()()(),_(15,yt,7,7,"div",41),l(16,"div",9),w(),l(17,"svg",10),S(18,"path",11),s()()(),B(),l(19,"div",12),_(20,gt,3,3,"div",42)(21,ft,9,4,"div",43)(22,_t,1,10,"ng-container",44),s()}if(i&2){let t,n=h();r(9),g("ngClass",n.openSection()==="Premier"?"text-orange":"text-black"),r(),p(" ",c(11,10,"app.payment.orangeTaqseet")," "),r(3),p(" ",c(14,12,"app.payment.orangeTaqseetSubtitle")," "),r(2),v(n.getDiscountLabelBySystemName(n.PaymentMethodSystemNames.PremierInstallment)?15:-1),r(),F("rotate-180",n.openSection()==="Premier"),r(),F("text-orange",n.openSection()==="Premier"),r(2),g("ngClass",n.openSection()==="Premier"?"pointer-events-auto h-auto pb-3 opacity-100 duration-300":"pointer-events-none h-0 py-0 opacity-0"),r(),v(n.premierInfo()?(t=n.premierInfo())!=null&&t.IsUserEligible?22:21:20)}}function St(i,e){if(i&1&&(l(0,"div",41),m(1),u(2,"translate"),l(3,"b",31),m(4),s(),m(5),u(6,"translate"),s()),i&2){let t=h(2);r(),p(" ",c(2,3,"app.payment.givesYou")," "),r(3),p(" ",t.getDiscountLabelBySystemName(t.PaymentMethodSystemNames.EmployeeInstallment)," "),r(),p(" ",c(6,5,"app.payment.off")," ")}}function xt(i,e){i&1&&(l(0,"div",42),m(1),u(2,"translate"),s()),i&2&&(r(),p(" ",c(2,1,"app.list.loading")," "))}function Ct(i,e){if(i&1&&(l(0,"div",43),w(),l(1,"svg",45),S(2,"path",46)(3,"path",47),s(),B(),l(4,"div")(5,"p",48),m(6),u(7,"translate"),s(),S(8,"p",49),s()()),i&2){let t=h(2);r(6),p(" ",c(7,2,"app.payment.notEligible")," "),r(2),g("innerHTML",t.employeeIneligibilityReason(),te)}}function It(i,e){if(i&1&&ne(0,44),i&2){let t=h(2),n=ie(37);g("ngTemplateOutlet",n)("ngTemplateOutletContext",re(2,Qe,t.employeeInfo(),t.employeeInstallmentUpdateForm,t.employeeCreditCardOptions(),t.employeeCardTypes(),t.employeeBanks(),t.employeeBankDurations(),t.employeeSecondMethods()))}}function bt(i,e){if(i&1){let t=A();l(0,"li",2),P("click",function(){I(t);let a=h();return b(a.openPanel("Employee"))}),l(1,"div",35)(2,"div",4),w(),l(3,"svg",50),S(4,"rect",37),l(5,"g",38),S(6,"rect",39)(7,"rect",40),s()()(),B(),l(8,"div",6)(9,"p",7),m(10),u(11,"translate"),s(),l(12,"p",8),m(13),u(14,"translate"),s()()(),_(15,St,7,7,"div",41),l(16,"div",9),w(),l(17,"svg",10),S(18,"path",11),s()()(),B(),l(19,"div",12),_(20,xt,3,3,"div",42)(21,Ct,9,4,"div",43)(22,It,1,10,"ng-container",44),s()}if(i&2){let t,n=h();r(9),g("ngClass",n.openSection()==="Employee"?"text-orange":"text-black"),r(),p(" ",c(11,10,"app.payment.orangeEmployee")," "),r(3),p(" ",c(14,12,"app.payment.orangeEmployeeSubtitle")," "),r(2),v(n.getDiscountLabelBySystemName(n.PaymentMethodSystemNames.EmployeeInstallment)?15:-1),r(),F("rotate-180",n.openSection()==="Employee"),r(),F("text-orange",n.openSection()==="Employee"),r(2),g("ngClass",n.openSection()==="Employee"?"pointer-events-auto h-auto pb-3 opacity-100 duration-300":"pointer-events-none h-0 py-0 opacity-0"),r(),v(n.employeeInfo()?(t=n.employeeInfo())!=null&&t.IsUserEligible?22:21:20)}}function Pt(i,e){i&1&&(l(0,"div",51)(1,"div",79),m(2),u(3,"localize"),S(4,"div",80),s(),l(5,"div",81)(6,"label",82),S(7,"input",83),m(8),u(9,"localize"),s(),l(10,"label",82),S(11,"input",83),m(12),u(13,"localize"),s(),l(14,"label",82),S(15,"input",83),m(16),u(17,"localize"),s()()()),i&2&&(r(2),p(" ",c(3,4,V(12,tt))," "),r(6),p(" ",c(9,6,V(13,nt))," "),r(4),p(" ",c(13,8,V(14,it))," "),r(4),p(" ",c(17,10,V(15,at))," "))}function Tt(i,e){i&1&&m(0," EGP ")}function Mt(i,e){i&1&&m(0," \u062C\u0646\u064A\u0647 \u0645\u0635\u0631\u064A ")}function Et(i,e){i&1&&m(0," \u062C\u0646\u064A\u0647 \u0645\u0635\u0631\u064A ")}function wt(i,e){if(i&1&&(m(0),u(1,"localize"),l(2,"span",84),m(3),u(4,"number"),s(),_(5,Et,1,0),m(6),u(7,"localize")),i&2){let t=h().info,n=h();p(" ",c(1,4,V(11,rt))," "),r(3),O(z(4,6,t==null?null:t.MinDeposit,"1.0-2")),r(2),v(n.lang()==="ar"?5:-1),r(),p(" ",c(7,9,V(12,lt))," ")}}function Dt(i,e){i&1&&(m(0),u(1,"localize")),i&2&&p(" ",c(1,1,V(3,ot))," ")}function kt(i,e){i&1&&(l(0,"div",67),m(1),u(2,"translate"),s()),i&2&&(r(),p(" ",c(2,1,"app.payment.upfrontAmountRequired")," "))}function Nt(i,e){if(i&1&&(l(0,"div",67),m(1),u(2,"translate"),u(3,"translate"),u(4,"number"),s()),i&2){let t=h(2).info;r(),ae(" ",c(2,3,"app.payment.mustPayMin")," ",c(3,5,"app.common.EGP")," ",z(4,7,t==null?null:t.MinDeposit,"1.0-2"),". ")}}function Bt(i,e){if(i&1&&(l(0,"div",67),m(1),u(2,"translate"),u(3,"translate"),u(4,"number"),s()),i&2){let t=h(2).info;r(),ae(" ",c(2,3,"app.payment.upfrontCannotExceed")," ",c(3,5,"app.common.EGP")," ",z(4,7,t==null?null:t.TotalAmount,"1.0-2"),". ")}}function At(i,e){if(i&1&&(_(0,kt,3,3,"div",67),_(1,Nt,5,10,"div",67),_(2,Bt,5,10,"div",67)),i&2){let t,n,a,o=h().form;v((t=o.get("upfrontAmount"))!=null&&t.hasError("required")?0:-1),r(),v((n=o.get("upfrontAmount"))!=null&&n.hasError("min")?1:-1),r(),v((a=o.get("upfrontAmount"))!=null&&a.hasError("max")?2:-1)}}function Ft(i,e){if(i&1&&(l(0,"option",66),m(1),s()),i&2){let t=e.$implicit;g("value",t.Value)("selected",t.Selected),r(),p(" ",t.Text," ")}}function Ot(i,e){i&1&&(l(0,"div",67),m(1),u(2,"translate"),s()),i&2&&(r(),p(" ",c(2,1,"app.payment.pleaseSelectDuration")," "))}function Vt(i,e){if(i&1&&(l(0,"option",76),m(1),s()),i&2){let t=e.$implicit;g("value",t.Value),r(),O(t.Text)}}function Ut(i,e){if(i&1&&(l(0,"option",76),m(1),s()),i&2){let t=e.$implicit;g("value",t.Value),r(),O(t.Text)}}function Lt(i,e){if(i&1){let t=A();l(0,"div",60)(1,"label",61),m(2,"Card type "),l(3,"span",62),m(4,"*"),s()(),l(5,"select",75),P("change",function(a){I(t);let o=h().type,d=h();return b(d.selectCardType(o,a.target.value))}),l(6,"option",65),m(7),s(),q(8,Ut,2,2,"option",76,H),s()()}if(i&2){let t,n=h(),a=n.form,o=n.cardTypes;r(5),g("value",((t=a.get("cardType"))==null?null:t.value)||""),r(2),p(" ",o.length?"Select":"No card types"," "),r(),G(o)}}function Rt(i,e){i&1&&(l(0,"h2",48),m(1),u(2,"translate"),s(),l(3,"p",8),m(4),u(5,"translate"),s()),i&2&&(r(),p(" ",c(2,2,"app.payment.fullAmount")," "),r(3),p(" ",c(5,4,"app.payment.throughBankCard")," "))}function qt(i,e){i&1&&(l(0,"h2",48),m(1),u(2,"translate"),s(),l(3,"p",8),m(4),u(5,"translate"),s()),i&2&&(r(),p(" ",c(2,2,"app.payment.installment")," "),r(3),p(" ",c(5,4,"app.payment.yourBankAllows")," "))}function Gt(i,e){if(i&1&&S(0,"img",93),i&2){let t,n,a=h(4),o=a.form,d=a.banks,y=h();g("src",y.getBankLogo(d,((t=o.get("installmentBank"))==null?null:t.value)||null),W)("alt",y.getBankText(d,((n=o.get("installmentBank"))==null?null:n.value)||null))}}function Yt(i,e){i&1&&(l(0,"div",97),m(1,"No banks available."),s())}function $t(i,e){if(i&1){let t=A();l(0,"button",99),P("click",function(){let a=I(t).$implicit,o=h(6).type,d=h();return d.selectBank(o,a.Value),b(d.closeBankDropdown(o))}),S(1,"img",100),l(2,"span",94),m(3),s()()}if(i&2){let t=e.$implicit;r(),g("src",t.LogoUrl,W),r(2),O(t.Text)}}function zt(i,e){if(i&1&&q(0,$t,4,2,"button",98,H),i&2){let t=h(5).banks;G(t)}}function Ht(i,e){if(i&1&&(l(0,"div",96),_(1,Yt,2,0,"div",97)(2,zt,2,0),s()),i&2){let t=h(4).banks;r(),v(t.length?2:1)}}function Wt(i,e){if(i&1){let t=A();l(0,"div",89)(1,"div",90)(2,"div",60)(3,"label",61),m(4),u(5,"translate"),l(6,"span",62),m(7,"*"),s()(),l(8,"button",91),P("click",function(){I(t);let a=h(3).type,o=h();return b(o.toggleBankDropdown(a))}),l(9,"div",92),_(10,Gt,1,2,"img",93),l(11,"span",94),m(12),s()(),w(),l(13,"svg",95),S(14,"path",11),s()(),_(15,Ht,3,1,"div",96),s()()()}if(i&2){let t,n,a=h(3),o=a.type,d=a.form,y=a.banks,f=h();r(4),p("",c(5,6,"app.payment.selectBank")," "),r(4),g("ngClass",ye(8,st,f.isBankDropdownOpen(o),!f.isBankDropdownOpen(o))),r(2),v(f.getBankLogo(y,((t=d.get("installmentBank"))==null?null:t.value)||null)?10:-1),r(2),p(" ",f.getBankText(y,((n=d.get("installmentBank"))==null?null:n.value)||null)||(y.length?"Select":"No banks")," "),r(),g("ngClass",he(11,mt,f.isBankDropdownOpen(o))),r(2),v(f.isBankDropdownOpen(o)?15:-1)}}function jt(i,e){if(i&1){let t=A();l(0,"label",86)(1,"input",87),P("change",function(){let a=I(t).$implicit,o=h(2).type,d=h();return b(d.selectCardOption(o,a.Value))}),s(),l(2,"span",25)(3,"span",26),w(),l(4,"svg",27),S(5,"path",28)(6,"path",29),s()()(),B(),l(7,"div",88)(8,"div"),_(9,Rt,6,6)(10,qt,6,6),s()(),_(11,Wt,16,13,"div",89),s()}if(i&2){let t,n,a,o,d=e.$implicit,y=h(2),f=y.type,C=y.form;F("installment-card--selected",((t=C.get("creditCardOption"))==null?null:t.value)===d.Value),r(),g("name",ce("creditCardOption-",f))("value",d.Value)("checked",((n=C.get("creditCardOption"))==null?null:n.value)===d.Value),r(2),F("opacity-100",((a=C.get("creditCardOption"))==null?null:a.value)===d.Value),r(6),v(d.Value==="NonInstallment"?9:10),r(2),v(d.Value==="Installment"&&((o=C.get("creditCardOption"))==null?null:o.value)==="Installment"&&((o=C.get("cardType"))!=null&&o.value)?11:-1)}}function Zt(i,e){if(i&1&&(l(0,"div",77),q(1,jt,12,10,"label",85,H),s()),i&2){let t=h().creditCardOptions;r(),G(t)}}function Kt(i,e){if(i&1&&(l(0,"option",76),m(1),s()),i&2){let t=e.$implicit;g("value",t.Value),r(),O(t.Text)}}function Jt(i,e){if(i&1){let t=A();l(0,"div",60)(1,"label",61),m(2),u(3,"translate"),l(4,"span",62),m(5,"*"),s()(),l(6,"select",75),P("change",function(a){I(t);let o=h().type,d=h();return b(d.selectBankDuration(o,a.target.value))}),l(7,"option",65),m(8),s(),q(9,Kt,2,2,"option",76,H),s()()}if(i&2){let t,n=h(),a=n.form,o=n.bankDurations;r(2),p("",c(3,3,"app.payment.bankDurations")," "),r(4),g("value",((t=a.get("bankDuration"))==null?null:t.value)||""),r(2),p(" ",o.length?"Select":"No durations"," "),r(),G(o)}}function Qt(i,e){i&1&&(w(),l(0,"svg",32),S(1,"circle",33)(2,"path",34),s(),m(3),u(4,"translate")),i&2&&(r(3),p(" ",c(4,1,"app.common.processing"),"... "))}function Xt(i,e){i&1&&(m(0),u(1,"translate")),i&2&&p(" ",c(1,1,"app.payment.placeOrder")," ")}function en(i,e){if(i&1){let t=A();_(0,Pt,18,16,"div",51),l(1,"div")(2,"p",52),m(3),u(4,"translate"),s(),l(5,"div"),_(6,Tt,1,0),l(7,"span",53),m(8),u(9,"number"),s(),_(10,Mt,1,0),s(),l(11,"p",54),w(),l(12,"svg",55),S(13,"path",56)(14,"path",57),s(),_(15,wt,8,13)(16,Dt,2,4),s(),B(),l(17,"p",58),m(18),u(19,"translate"),s(),l(20,"form",59)(21,"div",60)(22,"label",61),m(23),u(24,"translate"),l(25,"span",62),m(26,"*"),s()(),l(27,"input",63),P("input",function(a){let o=I(t).type,d=h();return b(d.setUpfrontAmount(o,a.target.valueAsNumber))}),s(),_(28,At,3,3),s(),l(29,"div",60)(30,"label",61),m(31),u(32,"translate"),l(33,"span",62),m(34,"*"),s()(),l(35,"select",64),P("
1change",function(a){let o=I(t).type,d=h();return b(d.selectDuration(o,a.target.value))}),l(36,"option",65),m(37),s(),q(38,Ft,2,3,"option",66,H),s(),_(40,Ot,3,3,"div",67),s()(),l(41,"div",68)(42,"div",69),w(),l(43,"svg",70),S(44,"path",71)(45,"path",72),s(),B(),l(46,"div")(47,"p",52),m(48),u(49,"translate"),s(),l(50,"div"),m(51),u(52,"translate"),l(53,"span",53),m(54),u(55,"number"),s()()()()(),l(56,"p",73),m(57),u(58,"localize"),s(),l(59,"div",74)(60,"div",60)(61,"label",61),m(62),u(63,"translate"),l(64,"span",62),m(65,"*"),s()(),l(66,"select",75),P("change",function(a){let o=I(t).type,d=h();return b(d.selectUpfrontMethod(o,a.target.value))}),l(67,"option",65),m(68),s(),q(69,Vt,2,2,"option",76,H),s()(),_(71,Lt,10,2,"div",60),_(72,Zt,3,0,"div",77),_(73,Jt,11,5,"div",60),s(),l(74,"div",17)(75,"button",18),P("click",function(){I(t);let a=h();return b(a.onCancel())}),m(76),u(77,"translate"),s(),l(78,"button",78),P("click",function(){let a=I(t).type,o=h();return b(o.placeInstallmentOrder(a))}),_(79,Qt,5,3)(80,Xt,2,3),s()()()}if(i&2){let t,n,a,o=e.type,d=e.info,y=e.form,f=e.creditCardOptions,C=e.cardTypes,E=e.bankDurations,U=e.secondMethods,N=h();v(N.openSection()==="Employee"?0:-1),r(3),p(" ",c(4,29,"app.payment.yourAvailableLimit")," "),r(3),v(N.lang()==="en"?6:-1),r(2),p(" ",z(9,31,d==null?null:d.Limit,"1.0-2")," "),r(2),v(N.lang()==="ar"?10:-1),r(5),v((d==null?null:d.MinDeposit)>0?15:16),r(3),p(" ",c(19,34,"app.payment.installmentDetails")," "),r(2),g("formGroup",y),r(3),p("",c(24,36,"app.payment.enterUpfrontAmount")," "),r(4),g("min",(d==null?null:d.MinDeposit)||0)("max",(d==null?null:d.TotalAmount)||0),r(),v((t=y.get("upfrontAmount"))!=null&&t.touched&&((t=y.get("upfrontAmount"))!=null&&t.invalid)?28:-1),r(3),p("",c(32,38,"app.payment.installmentDuration")," "),r(6),p(" ",!(d==null||d.Durations==null)&&d.Durations.length?"Select":"No durations"," "),r(),G((d==null?null:d.Durations)||V(53,Xe)),r(2),v((n=y.get("duration"))!=null&&n.touched&&((n=y.get("duration"))!=null&&n.hasError("required"))?40:-1),r(8),p(" ",c(49,40,"app.payment.orderRemainingAmount")," "),r(3),p(" ",c(52,42,"app.common.EGP")," "),r(3),O(z(55,44,d==null?null:d.RemainingAmount,"1.0-2")),r(3),p(" ",c(58,47,V(54,et))," "),r(5),p(" ",c(63,49,"app.tracking.paymentMethod")," "),r(4),g("value",N.getSelectedSecondMethodValue(U)),r(2),p(" ",U.length?"Select":"No payment methods found"," "),r(),G(U),r(2),v(C.length&&N.shouldShowCardFields(o)?71:-1),r(),v(f.length&&N.shouldShowCardFields(o)?72:-1),r(),v(((a=y.get("creditCardOption"))==null?null:a.value)==="Installment"&&((a=y.get("installmentBank"))!=null&&a.value)&&E.length>0&&N.shouldShowCardFields(o)?73:-1),r(2),g("disabled",N.processing()),r(),p(" ",c(77,51,"app.common.cancel")," "),r(2),g("disabled",N.isPlaceOrderDisabled(o)),r(),v(N.processing()?79:80)}}var je=class i{installmentPayments=T(J);installmentSelection=T(He);paymentService=T($e);paymentManagementService=T(ze);checkoutFlowService=T(We);orderContext=T(Te);modalService=T(Ye);router=T(Ce);fb=T(qe);translate=T(Ie);languageService=T(Pe);cartService=T(K);openSection=x(null);processing=x(!1);loadingOptions=x(!1);loadingTotals=x(!1);lang=j(()=>this.languageService.currentLang());lastPremierCartTotal=x(null);lastEmployeeCartTotal=x(null);refreshingPaymentInfoFor=x(null);paymentProviders=x([]);buyNowSelectedProvider=x(null);buyNowSelecting=x(!1);premierInfo=x(null);premierCreditCardOptions=x([]);premierCardTypes=x([]);premierBanks=x([]);premierBankDurations=x([]);premierSecondMethods=x([]);employeeInfo=x(null);employeeCreditCardOptions=x([]);employeeCardTypes=x([]);employeeBanks=x([]);employeeBankDurations=x([]);employeeSecondMethods=x([]);bankDropdownOpen={Premier:!1,Employee:!1};premierIneligibilityReason=j(()=>this.extractIneligibilityReason(this.premierInfo()));employeeIneligibilityReason=j(()=>this.extractIneligibilityReason(this.employeeInfo()));premierInstallmentUpdateForm=this.fb.group({upfrontAmount:[null,[R.required]],duration:[null,[R.required]],creditCardOption:[null],cardType:[null],installmentBank:[null],bankDuration:[null]});employeeInstallmentUpdateForm=this.fb.group({upfrontAmount:[null,[R.required]],duration:[null,[R.required]],creditCardOption:[null],cardType:[null],installmentBank:[null],bankDuration:[null]});destroy$=new Q;totalsUpdate$=new Q;selectingSecondPayment={Premier:!1,Employee:!1};constructor(){Z(()=>{this.updatePaymentProviders(this.paymentService.paymentMethods())}),this.setupTotalsUpdater("Premier",this.premierInstallmentUpdateForm),this.setupTotalsUpdater("Employee",this.employeeInstallmentUpdateForm),this.totalsUpdate$.pipe(X(300),me(e=>this.updateTotals(e)),ee(this.destroy$)).subscribe(),Z(()=>{let e=this.openSection();if(!e||e==="BuyNow")return;let t=e==="Premier"?this.premierInstallmentUpdateForm:this.employeeInstallmentUpdateForm;this.updateCreditCardValidators(e,t)}),Z(()=>{let e=this.openSection();if(e!=="Premier"&&e!=="Employee")return;let t=this.cartService.cart()?.PaymentDetails?.Totals?.GrandTotal;if(typeof t!="number"||!Number.isFinite(t)||!(e==="Premier"?this.premierInfo():this.employeeInfo()))return;let a=e==="Premier"?this.lastPremierCartTotal():this.lastEmployeeCartTotal();a===null||t===a||this.refreshingPaymentInfoFor()!==e&&this.refreshPaymentInfo(e)})}async ngOnInit(){await this.loadPaymentProviders()}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}async loadPaymentProviders(){try{let e=this.paymentService.paymentMethods();e.length||(await this.paymentService.getPaymentMethods({loadEmployee:!0}),e=this.paymentService.paymentMethods()),this.updatePaymentProviders(e)}catch{this.paymentProviders.set([])}}updatePaymentProviders(e){let t=o=>
1(o||"").trim().toLowerCase(),n=new Set([t(M.PayfortCreditCard),t(M.CardOnDelivery),t(M.MeezaDigitalWallet),t(M.EmployeeInstallment),t(M.PremierInstallment),t(M.CashOnDelivery),t("Payments.PremierInstallment"),t("Payments.EmployeeInstalment"),t("Payments.MeezaDigitalWallet")]),a=(e||[]).filter(o=>o?.Enabled?!n.has(t(o.PaymentMethodSystemName)):!1);this.paymentProviders.set(a)}getDiscountLabel(e){return le(e,this.lang())}getDiscountLabelBySystemName(e){return le(this.paymentService.paymentMethods().find(t=>t.PaymentMethodSystemName===e),this.lang())}async openPanel(e){let t=this.openSection();if(t===e){this.resetSectionState(e),this.openSection.set(null);return}if(t&&this.resetSectionState(t),this.openSection.set(e),e==="BuyNow")return;let n=e==="Premier"?"Premier":"Employee";if(this.resetInstallmentSection(n),await this.loadPaymentInfo(n),!(n==="Premier"?this.premierInfo():this.employeeInfo())?.IsUserEligible)return;if(!await this.ensureInstallmentMethodSelected(n)){this.openSection.set(null);return}await this.loadSecondPaymentMethods(n),await this.loadCreditCardOptions(n)}async ensureInstallmentMethodSelected(e){let t=e==="Premier"?M.PremierInstallment:M.EmployeeInstallment,a=this.paymentService.selectedPaymentMethod()?.PaymentMethodSystemName===t;return await this.paymentService.selectPaymentMethod(t)||a?(this.orderContext.updatePaymentMethod(t,"installments"),!0):(this.modalService.error({title:this.translate.instant("app.modal.error"),message:"Unable to select installment payment method. Please try again."}),!1)}async loadPaymentInfo(e,t){let n=await this.installmentPayments.getPaymentInfo(e),a=e==="Premier"?this.premierInfo:this.employeeInfo,o=e==="Premier"?this.premierInstallmentUpdateForm:this.employeeInstallmentUpdateForm,d=t?.preserveFormValues===!0,y=d?o.getRawValue():null;if(this.setLastLoadedCartTotal(e,this.getCurrentCartGrandTotal()),!n||n.Error){a.set($(Y({},n??{}),{IsUserEligible:!1,Durations:n?.Durations??[],Limit:n?.Limit??0,MinDeposit:n?.MinDeposit??0,RemainingAmount:n?.RemainingAmount??0,TotalAmount:n?.TotalAmount??0}));return}if(a.set(n),!n.IsUserEligible)return;let f=n.Durations?.find(E=>E.Selected)||n.Durations?.find(E=>E.Value),C=d&&y?.duration?n.Durations?.find(E=>E.Value===y.duration)?.Value:null;o.patchValue({upfrontAmount:d&&y?.upfrontAmount!=null?y.upfrontAmount:n.MinDeposit??0,duration:C||(f?.Value??null)},{emitEvent:!1}),this.updateCreditCardValidators(e,o),this.publishSelection(e),this.queueTotalsUpdate(e)}getCurrentCartGrandTotal(){let e=this.cartService.cart()?.PaymentDetails?.Totals?.GrandTotal;return typeof e=="number"&&Number.isFinite(e)?e:null}setLastLoadedCartTotal(e,t){e==="Premier"?this.lastPremierCartTotal.set(t):this.lastEmployeeCartTotal.set(t)}async refreshPaymentInfo(e){this.refreshingPaymentInfoFor.set(e);try{await this.loadPaymentInfo(e,{preserveFormValues:!0})}finally{this.refreshingPaymentInfoFor.set(null)}}async loadSecondPaymentMethods(e){let n=((await this.installmentPayments.getSecondPaymentMethods(e))?.UpfrontPaymentMethods??[]).map(a=>$(Y({},a),{Selected:!1}));e==="Premier"?this.premierSecondMethods.set(n):this.employeeSecondMethods.set(n)}async loadCreditCardOptions(e){this.loadingOptions.set(!0);let t=await this.installmentPayments.getCreditCardOptions(e);(e==="Premier"?this.premierCreditCardOptions:this.employeeCreditCardOptions).set(t??[]);let a=e==="Premier"?this.premierInstallmentUpdateForm:this.employeeInstallmentUpdateForm,o=t?.find(y=>y.Selected)||(t&&t.length>0?t[0]:null),d=this.shouldShowCardFields(e);o&&d?(a.patchValue({creditCardOption:o.Value},{emitEvent:!1}),await this.selectCardOption(e,o.Value)):this.clearCardDetails(e),this.loadingOptions.set(!1)}async loadOptionContent(e,t){let n=await this.installmentPayments.getCreditCardOptionContent(t,e),a=n?.CardTypes??[],o=n?.InstallmentBanks??[];e==="Premier"?(this.premierCardTypes.set(a),this.premierBanks.set(o)):(this.employeeCardTypes.set(a),this.employeeBanks.set(o)),o.length||(e==="Premier"?this.premierBankDurations.set([]):this.employeeBankDurations.set([]))}async loadDurationsForBank(e,t){if(!t){e==="Premier"?this.premierBankDurations.set([]):this.employeeBankDurations.set([]);return}let n=await this.installmentPayments.getDurationsByBank(t,e),a=n?.InstallmentDurations||(Array.isArray(n?.Durations)?n.Durations:[])||[];e==="Premier"?this.premierBankDurations.set(a):this.employeeBankDurations.set(a)}async setSelectedProvider(e){let t=this.buyNowSelectedProvider();if(!(this.buyNowSelecting()||e&&t===e)&&(this.buyNowSelectedProvider.set(e),!!e&&this.openSection()==="BuyNow")){this.buyNowSelecting.set(!0);try{if(!await this.paymentService.selectPaymentMethod(e)){this.modalService.error({title:this.translate.instant("app.modal.error"),message:"Failed to select payment method. Please try again."});return}this.orderContext.updatePaymentMethod(e,"installments")}finally{this.buyNowSelecting.set(!1)}}}async selectCardOption(e,t){if(!this.shouldShowCardFields(e))return;let n=e==="Premier"?this.premierInstallmentUpdateForm:this.employeeInstallmentUpdateForm;
1n.patchValue({creditCardOption:t,installmentBank:null,bankDuration:null},{emitEvent:!1}),await this.loadOptionContent(e,t),this.updateCreditCardValidators(e,n),this.publishSelection(e),this.queueTotalsUpdate(e)}async selectBank(e,t){let n=e==="Premier"?this.premierInstallmentUpdateForm:this.employeeInstallmentUpdateForm;n.patchValue({installmentBank:t,bankDuration:null},{emitEvent:!1}),await this.loadDurationsForBank(e,t),this.updateCreditCardValidators(e,n),this.publishSelection(e),this.queueTotalsUpdate(e),this.closeBankDropdown(e)}selectBankDuration(e,t){(e==="Premier"?this.premierInstallmentUpdateForm:this.employeeInstallmentUpdateForm).patchValue({bankDuration:t},{emitEvent:!1}),this.publishSelection(e),this.queueTotalsUpdate(e)}isBankDropdownOpen(e){return!!this.bankDropdownOpen[e]}toggleBankDropdown(e){this.bankDropdownOpen[e]=!this.bankDropdownOpen[e]}closeBankDropdown(e){this.bankDropdownOpen[e]=!1}getBankLogo(e,t){return e.find(a=>a.Value===t)?.LogoUrl??null}getBankText(e,t){return e.find(a=>a.Value===t)?.Text??null}selectDuration(e,t){(e==="Premier"?this.premierInstallmentUpdateForm:this.employeeInstallmentUpdateForm).patchValue({duration:t},{emitEvent:!1}),this.publishSelection(e),this.queueTotalsUpdate(e)}setUpfrontAmount(e,t){(e==="Premier"?this.premierInstallmentUpdateForm:this.employeeInstallmentUpdateForm).patchValue({upfrontAmount:t},{emitEvent:!1}),this.queueTotalsUpdate(e)}selectCardType(e,t){if(!this.shouldShowCardFields(e)){this.clearCardDetails(e);return}(e==="Premier"?this.premierInstallmentUpdateForm:this.employeeInstallmentUpdateForm).patchValue({cardType:t,installmentBank:null,bankDuration:null},{emitEvent:!1}),this.publishSelection(e),this.queueTotalsUpdate(e)}async selectUpfrontMethod(e,t){let n=this.getSecondMethods(e);if(this.getSelectedSecondMethodValue(n)===t||this.selectingSecondPayment[e])return;let o=n.map(f=>Y({},f)),d=n.map(f=>$(Y({},f),{Selected:f.Value===t}));if(this.setSecondMethods(e,d),!t){this.clearCardDetails(e),this.installmentSelection.clearSelection();return}this.isCardOnDelivery(t)||this.clearCardDetails(e),this.selectingSecondPayment[e]=!0;let y=await this.installmentPayments.selectSecondPaymentMethod({PaymentMethodSystemName:t});if(this.selectingSecondPayment[e]=!1,!y?.Success||y?.Data?.IsValid===!1){this.setSecondMethods(e,o),this.clearCardDetails(e),this.modalService.error({title:this.translate.instant("app.modal.error"),message:y?.Message||y?.Data?.Errors?.[0]||"Failed to select payment method."});return}this.orderContext.updatePaymentMethod(t,"installments"),this.queueTotalsUpdate(e)}setupTotalsUpdater(e,t){t.valueChanges.pipe(X(200),se(),ee(this.destroy$)).subscribe(()=>{this.queueTotalsUpdate(e)})}queueTotalsUpdate(e){this.totalsUpdate$.next(e)}async updateTotals(e){let t=e==="Premier"?this.premierInstallmentUpdateForm:this.employeeInstallmentUpdateForm,n=e==="Premier"?this.premierInfo():this.employeeInfo();if(!n)return;let a=t.get("upfrontAmount")?.value,o=t.get("bankDuration")?.value||t.get("duration")?.value||0;if(t.invalid)return;let d={TotalAmount:n.TotalAmount||0,Limit:n.Limit||0,MinDeposit:n.MinDeposit||0,PaidDeposit:Number(a)||0,SelectedDuration:Number(o)||0};this.loadingTotals.set(!0);let y=await this.installmentPayments.updateInstallmentTotals(d);this.loadingTotals.set(!1),y&&this.applyTotalsResponse(e,y)}applyTotalsResponse(e,t){let n=e==="Premier"?this.premierInstallmentUpdateForm:this.employeeInstallmentUpdateForm;if(n.patchValue({upfrontAmount:t.UpfrontAmount??n.get("upfrontAmount")?.value},{emitEvent:!1}),e==="Premier"){let a=this.premierInfo();a&&this.premierInfo.set($(Y({},a),{RemainingAmount:t.RemainingAmount??a.RemainingAmount,InstallmentAmount:t.InstallmentAmount??a.InstallmentAmount,FirstPaymentInstallmentDuration:t.FirstPaymentInstallmentDuration??a.FirstPaymentInstallmentDuration}))}else{let a=this.employeeInfo();a&&this.employeeInfo.set($(Y({},a),{RemainingAmount:t.RemainingAmount??a.RemainingAmount,InstallmentAmount:t.InstallmentAmount??a.InstallmentAmount,FirstPaymentInstallmentDuration:t.FirstPaymentInstallmentDuration??a.FirstPaymentInstallmentDuration}))}this.publishSelection(e)}updateCreditCardValidators(e,t){let n=t.get("creditCardOption"),a=t.get("cardType"),o=t.get("installmentBank"),d=t.get("bankDuration");if(!n||!a||!o||!d)return;let y=this.getCardTypes(e),f=this.getBanks(e),C=this.getBankDurations(e),E=this.getCardOptions(e),U=this.shouldShowCardFields(e)&&E.length>0,N=y.length>0,oe=f.length>0&&n.value==="Installment",Ze=C.length>0&&oe;n.setValidators(U?[R.required]:[]),a.setValidators(N?[R.required]:[]),o.setValidators(oe?[R.required]:[]),d.setValidators(Ze?[R.required]:[]),n.updateV
1alueAndValidity({emitEvent:!1}),a.updateValueAndValidity({emitEvent:!1}),o.updateValueAndValidity({emitEvent:!1}),d.updateValueAndValidity({emitEvent:!1})}publishSelection(e){let t=e==="Premier"?this.premierInstallmentUpdateForm:this.employeeInstallmentUpdateForm,n=e==="Premier"?this.premierInfo():this.employeeInfo();if(!n)return;let a=t.get("bankDuration")?.value||t.get("duration")?.value,o=a?parseInt(a,10):0,d=n.TotalAmount||0,y=Number(t.get("upfrontAmount")?.value)||0,f=Number(n.InstallmentAmount),C=Number(n.FirstPaymentInstallmentDuration),E=Number.isFinite(f)&&f>0&&Number.isFinite(C)&&C>0,U=E?C:o,N=E?f/C:0;this.installmentSelection.setSelection({provider:e,numberOfInstallments:U,monthlyAmount:N,upfrontAmount:y,totalWithFees:d,bank:t.get("installmentBank")?.value??void 0,option:this.shouldShowCardFields(e)&&t.get("creditCardOption")?.value||void 0,upfrontMethod:void 0,cardType:this.shouldShowCardFields(e)?t.get("cardType")?.value??void 0:void 0})}async placeInstallmentOrder(e){let t=e==="Premier"?this.premierInstallmentUpdateForm:this.employeeInstallmentUpdateForm,n=this.isZeroMinDepositWithoutUpfront(e,t);if(t.invalid&&!n){t.markAllAsTouched();return}this.processing.set(!0);try{let a=t.get("creditCardOption")?.value,o=this.getSelectedOptionNumber(e,a),d={PaidDeposit:Number(t.get("upfrontAmount")?.value)||0,SelectedDuration:Number(t.get("bankDuration")?.value||t.get("duration")?.value)||0,SelectedUpfrontPaymentMethod:this.getSelectedSecondMethod(e),SelectedCardType:t.get("cardType")?.value||null,SelectedInstallmentDuration:Number(t.get("bankDuration")?.value||0)||0,SelectedInstallmentBank:t.get("installmentBank")?.value||null,SelectedOption:o};this.paymentManagementService.showPendingPaymentInfo();let y=await this.installmentPayments.validatePaymentForm(e,d);if(!y?.IsValid){this.modalService.error({title:this.translate.instant("app.modal.error"),message:y?.Warnings?.[0]||"Installment validation failed."});return}let f=await this.paymentManagementService.confirmCheckout({source:"installments",forceConfirm:!0}),C=this.getSelectedSecondMethod(e);if(this.paymentManagementService.hidePendingPaymentInfo(),C===M.PayfortCredit
1Card){this.router.navigate(this.languageService.withLangCommands(["/payment/creditcard"]),{queryParams:{standalone:!0,source:"installments"}});return}else if(C===M.MeezaDigitalWallet){this.paymentManagementService.hidePendingPaymentInfo(),this.router.navigate(this.languageService.withLangCommands(["/payment/digital-wallets"]),{queryParams:{standalone:!0,provider:"meeza",source:"installments"}});return}else if(this.isPaymobInstallmentMethod(C)){let E=this.getPaymentMethodBySystemName(C);if(!E){this.modalService.error({title:this.translate.instant("app.modal.error"),message:"Unable to resolve the selected payment provider. Please try again."});return}let U=await this.paymentService.createOrUpdatePaymobIntention(f,E.IntegrationId);this.paymentManagementService.hidePendingPaymentInfo(),window.location.assign(U);return}else{this.paymentManagementService.hidePendingPaymentInfo(),this.router.navigate(this.languageService.withLangCommands(["/order/success",f]),{queryParams:{orderNumber:`ORD-${f}`}});return}}catch(a){if(this.paymentManagementService.hidePendingPaymentInfo(),await this.paymentManagementService.handleCheckoutFlowError(a))return;this.router.navigate(this.languageService.withLangCommands(["/cart"]))}finally{this.processing.set(!1),this.paymentManagementService.hidePendingPaymentInfo()}}toNumberOrNull(e){if(e==null)return null;let t=Number(e);return Number.isFinite(t)?t:null}getSelectedOptionNumber(e,t){let n=this.getSelectedSecondMethod(e);if(n===M.CardOnDelivery||n==="Payments.OrangeCreditCardOnDelivery"){if(!t)return 1;let o=String(t).toLowerCase();return o==="installment"||o==="2"?2:1}return this.toNumberOrNull(t)}getSelectedSecondMethod(e){return(e==="Premier"?this.premierSecondMethods():this.employeeSecondMethods()).find(n=>n.Selected)?.Value??null}getPaymentMethodBySystemName(e){return e?this.paymentService.paymentMethods().find(t=>t.PaymentMethodSystemName===e)??null:null}getSelectedSecondMethodValue(e){return!e||!e.length?"":e.find(t=>t.Selected)?.Value??""}getSecondMethods(e){return e==="Premier"?this.premierSecondMethods():this.employeeSecondMethods()}isPaymobInstallmentMethod(e){return!!e?.startsWith(M.Paymob)}setSecondMethods(e,t){e==="Premier"?this.premierSecondMethods.set(t):this.employeeSecondMethods.set(t)}shouldShowCardFields(e){let t=this.getSelectedSecondMethodValue(this.getSecondMethods(e));return this.isCardOnDelivery(t)}isCardOnDelivery(e){return e?e===M.CardOnDelivery:!1}getCardOptions(e){return e==="Premier"?this.premierCreditCardOptions():this.employeeCreditCardOptions()}getCardTypes(e){return e==="Premier"?this.premierCardTypes():this.employeeCardTypes()}getBanks(e){return e==="Premier"?this.premierBanks():this.employeeBanks()}getBankDurations(e){return e==="Premier"?this.premierBankDurations():this.employeeBankDurations()}isPlaceOrderDisabled(e){let t=e==="Premier"?this.premierInstallmentUpdateForm:this.employeeInstallmentUpdateForm;if(this.processing())return!0;if(this.isZeroMinDepositWithoutUpfront(e,t))return!(t.get("bankDuration")?.value||t.get("duration")?.value);if(!this.getSelectedSecondMethod(e))return!0;if(this.shouldShowCardFields(e)){let o=t.get("creditCardOption")?.value;if(!o||this.getCardTypes(e).length>0&&!t.get("cardType")?.value)return!0;let y=this.getBanks(e);if(o==="Installment"&&y.length>0&&!t.get("installmentBank")?.value)return!0;let f=this.getBankDurations(e);if(o==="Installment"&&f.length>0&&t.get("installmentBank")?.value&&!t.get("bankDuration")?.value)return!0}return t.invalid}isZeroMinDepositWithoutUpfront(e,t){let n=e==="Premier"?this.premierInfo():this.employeeInfo(),a=Number(n?.MinDeposit??0);if(!Number.isFinite(a)||a>0)return!1;let o=t.get("upfrontAmount")?.value;if(o==null||`${o}`.trim()==="")return!0;let d=Number(o);return Number.isFinite(d)&&d<=0}clearCardDetails(e){let t=e==="Premier"?this.premierInstallmentUpdateForm:this.employeeInstallmentUpdateForm;t.patchValue({creditCardOption:null,cardType:null,installmentBank:null,bankDuration:null},{emitEvent:!1}),e==="Premier"?(this.premierCardTypes.set([]),this.premierBanks.set([]),this.premierBankDurations.set([])):(this.employeeCardTypes.set([]),this.employeeBanks.set([]),this.employeeBankDurations.set([])),this.updateCreditCardValidators(e,t),this.publishSelection(e)}resetSectionState(e){if(e==="BuyNow"){this.buyNowSelectedProvider.set(null),this.buyNowSelecting.set(!1);return}let t=e==="Premier"?"Premier":"Employee";this.resetInstallmentSection(t)}resetInstallmentSection(e){let t=e==="Premier"?this.premierInstallmentUpdateForm:this.employeeInstallmentUpdateForm;
1t.reset({upfrontAmount:null,duration:null,creditCardOption:null,cardType:null,installmentBank:null,bankDuration:null},{emitEvent:!1}),t.markAsPristine(),t.markAsUntouched(),e==="Premier"?(this.premierInfo.set(null),this.premierCreditCardOptions.set([]),this.premierCardTypes.set([]),this.premierBanks.set([]),this.premierBankDurations.set([]),this.premierSecondMethods.set([])):(this.employeeInfo.set(null),this.employeeCreditCardOptions.set([]),this.employeeCardTypes.set([]),this.employeeBanks.set([]),this.employeeBankDurations.set([]),this.employeeSecondMethods.set([])),this.selectingSecondPayment[e]=!1,this.bankDropdownOpen[e]=!1,this.updateCreditCardValidators(e,t),this.installmentSelection.clearSelection()}isBuyNowPlaceOrderDisabled(){return this.processing()||this.buyNowSelecting()||!this.buyNowSelectedProvider()}isInstallmentMethodEnabled(e){return(this.paymentService.paymentMethods()||[]).some(n=>n.PaymentMethodSystemName===e&&n.Enabled)}async placeOrderForSelectedProvider(){let e=this.buyNowSelectedProvider();if(!e){this.modalService.error({title:this.translate.instant("app.modal.error"),message:"Please select a payment provider before placing the order."});return}let t=(this.paymentService.paymentMethods()||[]).find(n=>n.PaymentMethodSystemName===e);if(!t){this.modalService.error({title:this.translate.instant("app.modal.error"),message:"Unable to resolve the selected payment provider. Please try again."});return}this.processing.set(!0),this.paymentManagementService.showPendingPaymentInfo();try{let n=await this.paymentManagementService.confirmCheckout({source:"buyNow",forceConfirm:!0});if(this.orderContext.updateOrderId(n,`ORD-${n}`),e.startsWith(M.Paymob)){let a=await this.paymentService.createOrUpdatePaymobIntention(n,t.IntegrationId);this.paymentManagementService.hidePendingPaymentInfo(),window.location.assign(a);return}this.paymentManagementService.hidePendingPaymentInfo(),this.router.navigate(this.languageService.withLangCommands(["/order/success",n]),{queryParams:{orderNumber:`ORD-${n}`}});return}catch(n){if(this.paymentManagementService.hidePendingPaymentInfo(),await this.paymentManagementService.handleCheckoutFlowError(n))return;this.router.navigate(this.languageService.withLangCommands(["/cart"]))}finally{this.processing.set(!1),this.paymentManagementService.hidePendingPaymentInfo()}}onCancel(){this.checkoutFlowService.cancelCheckout()}extractIneligibilityReason(e){if(!e)return null;let t=e.Error||e?.error||e?.ErrorMessage||e?.Message||e?.Data?.ErrorMessage||e?.Data?.Errors?.[0];return typeof t=="string"&&t.trim()?t.trim():null}PaymentMethodSystemNames=M;static \u0275fac=function(t){return new(t||i)};static \u0275cmp=pe({type:i,selectors:[["app-installments"]],decls:38,vars:26,consts:[["installmentSection",""],[1,"mb-3","font-bold"],[1,"flex","cursor-pointer","items-center","justify-between","border-t-2","border-gray-300","py-3",3,"click"],[1,"flex","items-center"],[1,"icon","me-2"],["src","/images/buynow.svg"],[1,"content","me-auto"],[1,"text-sm","font-bold","duration-300",3,"ngClass"],[1,"text-xs","text-gray-dark"],[1,"icon-arrow","transition-transform","duration-300"],["fill","none","viewBox","0 0 24 24","stroke","currentColor",1,"h-4","w-4","text-gray-600"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d","M19 9l-7 7-7-7"],[1,"bg-white","text-sm","text-gray-700","transition-all","will-change-[height,opacity,padding]",3,"ngClass"],[1,"content","mb-3"],[1,"relative","col-span-full","border-gray-300","py-6"],["appNativeCarousel","","mouseDrag","","id","installment-provider-carousel","role","radiogroup","aria-label","Buy now pay later providers",1,"payment-provider-carousel",3,"minScrollStep","pageFraction"],[1,"payment-provider-carousel__slide","w-60"],[1,"mt-3","flex","justify-end"],["type","button",1,"me-2","cursor-pointer","text-gray-500","underline",3,"click","disabled"],["type","submit",1,"btn","btn-primary","px-4",3,"click","disabled"],[1,"flex","h-full","cursor-pointer","items-start","gap-3","space-y-4","rounded-sm","border-2","border-gray-300","p-4","duration-300","hover:border-orange",3,"click"],[1,"mb-0","h-14","w-14","shrink-0","rounded-sm","border-1","border-gray-300","object-contain",3,"src"],[1,"flex","flex-col","self-stretch"],[1,"flex","items-start","justify-between","gap-2","text-sm","font-bold","text-black"],["type","radio","name","installment",1,"peer","hidden",3,"value","checked"],[1,"flex","h-4","w-4","items-center","justify-center","rounded-full","border-2","border-gray-normal","peer-checked:border-orange"],[1,"block","h-4","w-4","opacity-0","transition"],["xmlns","http://www.w3.org/2000/svg","width","100%","height","100%","viewBox","0 0 60 60",1,"h-4","w-4"],["fill","#FF7900","fill-rule","evenodd","d","M30-.001a30 30 0 1 0 30 30 30 30 0 0 0-30-30","data-name","Path 3193"],["fill","#fff","fill-rule","evenodd","d","M46.289 16.941a2.805 2.805 0 0 0-4.729-2.06L24.944 31.058l-5.474-6.1a2.8 2.8 0 0 0-3.813.146l-1.124 1.13a2.833 2.833 0 0 0-.206 3.76l8.987 11.294a2.8 2.8 0 0 0 4.385 0l17.975-22.584a2.819 2.819 0 0 0 .616-1.763","data-name","Path 3194"],[1,"mt-auto","rounded-full","bg-info","px-4","text-center","text-xs","text-white"],[1,"text-base"],["viewBox","0 0 24 24",1,"mr-2","inline-block","h-4","w-4","animate-spin"],["cx","12","cy","12","r","10","stroke","currentColor","stroke-width","4",1,"opacity-25"],["fill","currentColor","d","M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z",1,"opacity-75"],[1,"me-auto","flex","items-center"],["xmlns","http://www.w3.org/2000/svg","id","PaymentMethodIcon_OrangePremier-Premier","width","40","height","40","viewBox","0 0 40 40"],["id","Rectangle_5044","data-name","Rectangle 5044","width","40","height","40","fill","#fff","opacity","0"],["id","Group_12994","data-name","Group 12994","transform","translate(4.526 5)"],["id","Rectangle_1904","data-name","Rectangle 1904","
1width","30","height","30","transform","translate(0.474)","fill","#ff7900"],["id","Rectangle_1905","data-name","Rectangle 1905","width","22.672","height","4.283","transform","translate(4.285 21.429)","fill","#fff"],[1,"mx-2","rounded-full","bg-info","px-4","text-center","text-xs","text-white"],[1,"py-2","text-xs","text-gray-dark"],[1,"flex","rounded-sm","border-2","border-red","p-2"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["width","18","height","18","viewBox","0 0 60 60",1,"me-2"],["id","Path_3195","data-name","Path 3195","d","M621.707,5.343a30,30,0,1,0,30,30,30,30,0,0,0-30-30","transform","translate(-591.707 -5.343)","fill","#cd3c14","fill-rule","evenodd"],["id","Path_3196","data-name","Path 3196","d","M644.97,58.564a3.082,3.082,0,0,1-4.361,0l-7.234-7.238-7.235,7.238a3.084,3.084,0,0,1-4.36-4.363l7.235-7.237-6.977-6.98a3.084,3.084,0,0,1,4.361-4.363l6.977,6.98,6.977-6.98a3.084,3.084,0,1,1,4.36,4.363l-6.977,6.98L644.97,54.2a3.087,3.087,0,0,1,0,4.363","transform","translate(-603.375 -17.093)","fill","#fff"],[1,"mb-1","text-sm","font-bold"],[1,"text-xs","[&_a]:font-bold","[&_a]:text-orange","[&_a]:underline",3,"innerHTML"],["xmlns","http://www.w3.org/2000/svg","id","PaymentMethodIcon_OrangePremier-Employee","width","40","height","40","viewBox","0 0 40 40"],[1,"my-4","flex","overflow-hidden","rounded-md","border-2","border-[#085EBD]","text-xs"],[1,"text-sm","font-bold"],[1,"text-lg","font-bold","text-orange"],[1,"mt-2","flex","items-center","gap-2","text-xs","text-gray-dark"],["xmlns","http://www.w3.org/2000/svg","id","Info","width","15","height","15","viewBox","0 0 60 60"],["id","Path_3191","data-name","Path 3191","d","M190,.06a30,30,0,1,0,30,30,30,30,0,0,0-30-30","transform","translate(-160 -0.06)","fill","#527edb","fill-rule","evenodd"],["id","Path_3192","data-name","Path 3192","d","M205.294,22.413A5.294,5.294,0,1,0,200,17.119a5.294,5.294,0,0,0,5.294,5.294m8.461,29.937a3.162,3.162,0,0,1-2.3-.787c-.267-.32-.864-1.181-.864-3.469V25.943H198.235v1.835l.362.022a3.318,3.318,0,0,1,2.341.787c.268.321.587,1.183.587,3.47V48.094c0,2.4-.309,3.119-.491,3.329a3.239,3.239,0,0,1-2.426.927l-.373.012v1.817h15.883V52.371Z","transform","translate(-175.294 -4.765)","fill","#fff","fill-rule","evenodd"],[1,"my-3","text-sm","font-bold"],[1,"grid","grid-cols-1","gap-5","sm:grid-cols-2","lg:grid-cols-3",3,"formGroup"],[1,"relative"],[1,"absolute","-top-2","left-2","mb-1","block","bg-white","px-1","text-[11px]","font-medium","text-gray-400","rtl:right-2","rtl:left-auto"],[1,"text-orange-500"],["formControlName","upfrontAmount","type","number","step","0.01","placeholder","EGP",1,"w-full","rounded-md","border-2","border-gray-300","px-3","py-2","text-sm","font-bold","placeholder:font-normal","placeholder:text-gray-400","focus:border-orange-500","focus:outline-none",3,"input","min","max"],["formControlName","duration",1,"w-full","rounded-md","border-2","border-gray-300","px-3","py-2","text-sm","font-bold","placeholder:font-normal","placeholder:text-gray-400","focus:border-orange-500","focus:outline-none",3,"change"],["value",""],[3,"value","selected"],[1,"my-3","flex","items-center","gap-2","text-xs","text-red"],[1,"mt-4","border-t-2","border-gray-300","pt-4"],[1,"flex"],["id","Alert","width","30","height","30","viewBox","0 0 60 60",1,"me-3"],["id","Path_3197","data-name","Path 3197","d","M777.657,5.343a30,30,0,1,0,30,30,30,30,0,0,0-30-30","transform","translate(-747.657 -5.343)","fill","#fc0","fill-rule","evenodd"],["id","Path_3198","data-name","Path 3198","d","M791.33,27.706l1.259,20.7c0,1.4,1.135,1.924,2.534,1.924s2.533-.526,2.534-1.924l1.256-20.65c.007-.091.011-.184.011-.277a3.8,3.8,0,0,0-7.6,0C791.323,27.553,791.326,27.629,791.33,27.706Zm3.793,26.371a3.8,3.8,0,1,0,3.8,3.8,3.8,3.8,0,0,0-3.8-3.8","transform","translate(-765.124 -12.675)","fill-rule","evenodd"],[1,"mt-2","text-xs","text-gray-dark"],[1,"mt-5","grid","grid-cols-1","gap-5","sm:grid-cols-2","lg:grid-cols-3"],[1,"w-full","rounded-md","border-2","border-gray-300","px-3","py-2","text-sm","font-bold","placeholder:font-normal","placeholder:text-gray-400","focus:border-orange-500","focus:outline-none",3,"change","value"],[3,"value"],[1,"relative","col-span-full","flex","flex-col","gap-3","sm:flex-row"],["type","button",1,"btn","btn-primary","px-4",3,"click","disabled"],[1,"relative","flex","items-center","bg-[#085EBD]","px-4","py-2","font-semibold","text-white"],[1,"absolute","top-1/2","right-0","h-6","w-6","translate-x-1/2","-translate-y-1/2","rotate-45","bg-[#085EBD]"],[1,"flex","flex-col","gap-6","bg-white","py-2","ps-7","pe-4","text-gray-700","sm:flex-row"],[1,"flex","cursor-pointer","items-center","gap-2"],["type","checkbox",1,"h-4","w-4","accent-[#085EBD]"],[1,"font-bold","text-black"],[1,"flex","cursor-pointer","gap-3","space-y-4","rounded-md","border-2","border-gray-300","p-4","duration-300",3,"installment-card--selected"],[1,"flex","cursor-pointer","gap-3","space-y-4","rounded-md","border-2","border-gray-300","p-4","duration-300"],["type","radio",1,"installment-card__input","peer","hidden",3,"change","name","value","checked"],[1,"mb-0","shrink-0"],[1,"hidden","w-full","max-w-full","peer-checked:block","hover:border-orange","sm:w-80"],[1,"space-y-3"],["type","button",1,"flex","w-full","items-center","justify-between","rounded-md","border-2","bg-white","px-3","py-2","text-sm","font-bold","text-gray-700","transition-colors","focus:border-orange-500","focus:outline-none",3,"click","ngClass"],[1,"flex","items-center","gap-3","truncate"],[1,"h-5","w-5","shrink-0","object-contain",3,"src","alt"],[1,"truncate"],["xmlns","http://www.w3.org/2000/svg","fill","none","viewBox","0 0 24 24","stroke","currentColor",1,"h-4","w-4","text-gray-500","transition-transform","duration-200",3,"ngClass"],[1,"absolute","top-full","left-0","z-50","mt-1","max-h-52","w-full","overflow-auto","rounded-md","border","border-gray-200","bg-white","shadow-md"],[1,"px-4","py-3","text-sm","text-gray-600"],["type","button",1,"flex","w-full","items-center","gap-3","px-4","py-2","text-left","text-sm","text-gray-700","hover:bg-gray-light"],["type","button",1,"flex","w-full","items-center","gap-3","px-4","py-2","text-left","text-sm","text-gray-700","hover:bg-gray-light",3,"click"],["alt","bank logo",1,"h-5","w-5","shrink-0","object-contain",3,"src"]],template:function(t,n){if(t&1){let a=A();l(0,"h2",1),m(1),u(2,"translate"),s(),l(3,"ul")(4,"li",2),P("click",function(){return I(a),b(n.openPanel
1("BuyNow"))}),l(5,"div",3)(6,"div",4),S(7,"img",5),s(),l(8,"div",6)(9,"p",7),m(10),u(11,"translate"),s(),l(12,"p",8),m(13),u(14,"translate"),s()()(),l(15,"div",9),w(),l(16,"svg",10),S(17,"path",11),s()()(),B(),l(18,"div",12)(19,"div",13)(20,"p",8),m(21),u(22,"translate"),s()(),l(23,"div",14)(24,"div",15),q(25,ut,17,10,"div",16,dt),s()(),l(27,"div",17)(28,"button",18),P("click",function(){return I(a),b(n.onCancel())}),m(29),u(30,"translate"),s(),l(31,"button",19),P("click",function(){return I(a),b(n.placeOrderForSelectedProvider())}),_(32,ct,5,3)(33,ht,2,3),s()()(),_(34,vt,23,14),_(35,bt,23,14),s(),ue(36,en,81,55,"ng-template",null,0,ge)}t&2&&(r(),p(" ",c(2,16,"app.payment.installmentOptions"),`
2`),r(8),g("ngClass",n.openSection()==="BuyNow"?"text-orange":"text-black"),r(),p(" ",c(11,18,"app.payment.bnpl")," "),r(3),p(" ",c(14,20,"app.payment.bnplSubtitle")," "),r(2),F("rotate-180",n.openSection()==="BuyNow"),r(3),g("ngClass",n.openSection()==="BuyNow"?"pointer-events-auto h-auto pb-3 opacity-100 duration-300":"pointer-events-none h-0 py-0 opacity-0"),r(3),p(" ",c(22,22,"app.payment.bnplDescription")," "),r(3),g("minScrollStep",240)("pageFraction",.85),r(),G(n.paymentProviders()),r(3),g("disabled",n.processing()),r(),p(" ",c(30,24,"app.common.cancel")," "),r(2),g("disabled",n.isBuyNowPlaceOrderDisabled()),r(),v(n.processing()||n.buyNowSelecting()?32:33),r(2),v(n.isInstallmentMethodEnabled(n.PaymentMethodSystemNames.PremierInstallment)?34:-1),r(),v(n.isInstallmentMethodEnabled(n.PaymentMethodSystemNames.EmployeeInstallment)?35:-1))},dependencies:[Se,fe,_e,Ge,Ne,Ve,Ue,we,Be,Oe,De,ke,Re,Le,Ae,Fe,Me,ve,be,Ee],styles:[".payment-provider-carousel[_ngcontent-%COMP%]{display:flex;gap:15px;align-items:stretch;overflow-x:auto;overflow-y:hidden;overscroll-behavior-inline:contain;scroll-behavior:smooth;scroll-snap-type:x proximity;scrollbar-width:none;-ms-overflow-style:none;touch-action:pan-x pan-y pinch-zoom;-webkit-overflow-scrolling:touch}.payment-provider-carousel[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.payment-provider-carousel__slide[_ngcontent-%COMP%]{flex:0 0 auto;scroll-snap-align:start;-webkit-user-select:none;user-select:none}"],changeDetection:0})};export{je as Installments};

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.