PageSourceSearch

https://online.device.co.nz/chunk-KQHSNSPX.js

js device.co.nz collected 2026-10-08 19:52:02 UTC 48,506 bytes, 2 lines download raw bytes

1import{d as _n}from"./chunk-77JACOA3.js";import{g as rn}from"./chunk-DFDZNSIO.js";import{b as at,c as un,d as ot,g as hn,m as Ce,n as ve}from"./chunk-B4GIGAX2.js";import{b as fn,c as ye}from"./chunk-RN7WKNJK.js";import{d as nt,f as ie,h as ln,j as pn,l as mn,n as it}from"./chunk-HYW25SFI.js";import{a as sn,d as cn,e as dn,m as tt}from"./chunk-3C67QIEB.js";import{A as on,v as tn,y as nn,z as an}from"./chunk-UR2BEPHM.js";import{g as en}from"./chunk-BAZNX2KU.js";import{a as Kt,b as et}from"./chunk-OWQANZDJ.js";import"./chunk-DM33JHHN.js";import"./chunk-YEIJORLD.js";import"./chunk-LEXO7BWZ.js";import"./chunk-UMRXG5ID.js";import{C as qt,H as G,I as Qt,J as Jt,O as Xt,P as Zt}from"./chunk-EDL5HQF4.js";import{A as Vt,Ab as Xe,Fa as he,H as Ut,I as fe,J as W,M as Gt,O as Z,Oa as _e,P as ee,Q as Y,Sa as Qe,Ua as ge,X as te,Z as ne,Za as Ht,a as $t,ab as Je,b as Nt,c as ue,e as je,f as We,h as Lt,k as Ye,m as ze,nc as Ze,ob as jt,qb as Wt,rb as Yt,t as Ke,u as qe,zb as zt}from"./chunk-D6JRTJNA.js";import{$b as vt,Ag as Et,Cc as j,Ci as Ge,D as lt,Dc as A,Dd as F,Ec as De,F as k,Fa as Oe,Gb as a,Gg as Dt,Gi as He,Hb as p,Hh as Rt,Ib as m,Jb as f,Jg as Ft,Jh as Bt,K as q,Kc as c,Lc as d,Mc as bt,Nb as _,Ng as Ve,Oa as Te,Ob as g,Pb as Me,Pc as N,Ph as Ue,Q as C,Qe as $e,Qh as me,Sa as ft,Tb as D,U as Se,Ua as de,Uf as Ne,Ug as pe,Va as ht,Vb as I,Vg as X,Wf as At,Xa as Ie,Xb as s,Y as pt,Yb as yt,Yd as Ot,Zb as Ct,Zh as w,_a as i,_h as R,a as re,ac as xt,ah as wt,bc as Pt,bd as kt,c as xe,d as U,ea as mt,fa as be,fc as $,fg as Mt,i as dt,ia as P,ib as _t,jb as E,je as Tt,jf as It,kb as b,kc as y,la as M,lc as Q,mb as gt,mc as x,md as Fe,n as Pe,na as ut,nb as Ae,nc as St,ne as Re,ng as Le,o as se,ob as u,od as we,pd as L,pe as Be,ra as ke,s as B,sa as S,t as ce,ud as le,va as l,vd as V,wc as J,xb as v,xc as Ee,ya as O,za as T}from"./chunk-AOLJ6P6Y.js";import{a as K,b as oe}from"./chunk-RBO75H4S.js";var z=-1;var Fn=["paymentForm"],wn=t=>({paymentLink:t});function Rn(t,r){t&1&&Me(0)}function Bn(t,r){if(t&1&&(p(0,"div",5),u(1,Rn,1,0,"ng-container",6),m()),t&2){let e=r.ngIf;s();let n=$(3),o=$(5);i(),a("ngTemplateOutlet",e!=null&&e.isLoading?o:n)("ngTemplateOutletContext",A(2,wn,e))}}function $n(t,r){if(t&1&&(p(0,"div",9)(1,"a",10),c(2,"cxTranslate"),c(3,"cxTranslate"),y(4),c(5,"cxTranslate"),m()()),t&2){let e=s(2).paymentLink;i(),a("href",e.destination.url,de),v("title",d(2,4,"opfCheckout.proceedPayment"))("aria-label",d(3,6,"opfCheckout.proceedPaymentButtonLabel")),i(3),Q(d(5,8,"opfCheckout.proceedPayment"))}}function Nn(t,r){if(t&1&&(_(0),f(1,"iframe",11),g()),t&2){let e=s(2).paymentLink,n=s();i(),a("src",n.bypassSecurityTrustResourceUrl(e.destination==null?null:e.destination.url),ht),v("sandbox",n.getIframeSandbox((e==null?null:e.paymentOptionId)||n.selectedPaymentId),Ie)}}function Ln(t,r){if(t&1&&f(0,"iframe",16),t&2){let e=s(3).paymentLink,n=s();v("sandbox",n.getIframeSandbox((e==null?null:e.paymentOptionId)||n.selectedPaymentId),Ie)}}function Vn(t,r){if(t&1&&f(0,"input",17),t&2){let e=r.$implicit;a("name",e==null?null:e.name)("value",e==null?null:e.value)}}function Un(t,r){t&1&&(f(0,"input",18),c(1,"cxTranslate")),t&2&&a("value",d(1,1,"opfCheckout.proceedPayment"))}function Gn(t,r){if(t&1&&(p(0,"div",9),u(1,Ln,1,1,"iframe",12),p(2,"form",13,2)(4,"fieldset"),u(5,Vn,1,2,"input",14),m(),u(6,Un,2,3,"input",15),m()()),t&2){let e=s(2).paymentLink,n=s();i(),a("ngIf",e.renderType===n.RENDER_PATTERN.IFRAME),i(),a("action",e.destination==null?null:e.destination.url,de)("method",e.destination==null?null:e.destination.method)("enctype",e.destination==null?null:e.destination.contentType)("target",e.renderType===n.RENDER_PATTERN.FULL_PAGE?"_self":n.PAYMENT_IFRAME_NAME),i(3),a("ngForOf",e.destination==null?null:e.destination.form),i(),a("ngIf",e.renderType===n.RENDER_PATTERN.FULL_PAGE)}}function Hn(t,r){if(t&1&&(_(0),u(1,$n,6,10,"div",8)(2,Nn,2,2,"ng-container",7)(3,Gn,7,7,"div",8),g()),t&2){let e=s().paymentLink,n=s();i(),a("ngIf",e.renderType===n.RENDER_PATTERN.FULL_PAGE&&!(!(e.destination==null||e.destination.form==null)&&e.destination.form.length)),i(),a("ngIf",e.renderType===n.RENDER_PATTERN.IFRAME&&!(!(e==null||e.destination==null||e.destination.form==null)&&e.destination.form.length)),i(),a("ngIf",e==null||e.destination==null||e.destination.form==null?null:e.destination.form.length)}}function jn(t,r){if(t&1&&(_(0),f(1,"div",19),g()),t&2){let e=s().paymentLink,n=s();i(),a("innerHTML",n.bypassSecurityTrustHtml(e.html),ft)}}function Wn(t,r){if(t&1&&(p(0,"div"),u(1,Hn,4,3,"ng-container",7)(2,jn,2,1,"ng-container",7),m()),t&2){let e=r.paymentLink;i(),a("ngIf",e==null||e.destination==null?null:e.destination.url),i(),a("ngIf",e==null?null:e.html)}}function Yn(t,r){if(t&1){let e=D();_(0),p(1,"div",5)(2,"div",9)(3,"button",21),c(4,"cxTranslate"),c(5,"cxTranslate"),I("click",function(){O(e);let o=s(2);return T(o.retryInitiatePayment())}),y(6),c(7,"cxTranslate"),m()()(),g()}t&2&&(i(3),a("ngClass","btn btn-primary"),v("title",d(4,4,"opfCheckout.retryPayment"))("aria-label",d(5,6,"opfCheckout.retryPayment")),i(3),x(" ",d(7,8,"opfCheckout.retryPayment")," "))}function zn(t,r){t&1&&f(0,"cx-spinner")}function Kn(t,r){if(t&1&&u(0,Yn,8,10,"ng-container",20)(1,zn,1,0,"ng-template",null,3,N),t&2){let e=r.paymentLink,n=$(2);a("ngIf",e==null?null:e.isError)("ngIfElse",n)}}var qn=(t,r)=>({billingAddress:t,isSameAsDelivery:r});function Qn(t,r){if(t&1){let e=D();p(0,"div",5)(1,"label")(2,"input",6),c(3,"cxTranslate"),I("change",function(o){O(e);let h=s(3);return T(h.toggleSameAsDeliveryAddress(o))}),m(),p(4,"span",7),y(5),c(6,"cxTranslate"),m()()()}if(t&2){let e=s().ngIf;i(2),a("checked",e.isSameAsDelivery),v("aria-label",d(3,3,"paymentForm.billingAddressSameAsShipping")),i(3),Q(d(6,5,"paymentForm.sameAsDeliveryAddress"))}}function Jn(t,r){if(t&1){let e=D();p(0,"button",11),c(1,"cxTranslate"),c(2,"cxTranslate"),I("click",function(){O(e);let o=s(4);return T(o.editCustomBillingAddress())}),f(3,"cx-icon",12),m()}if(t&2){let e=s(4);v("aria-label",d(1,3,"paymentForm.editBillingAddress"))("title",d(2,5,"paymentForm.editBillingAddress")),i(3),a("type",e.iconTypes.PENCIL)}}function Xn(t,r){if(t&1&&(_(0),p(1,"div",8),f(2,"cx-card",9),c(3,"c
1xGetAddressCardContent"),u(4,Jn,4,7,"button",10),m(),g()),t&2){let e=s().ngIf;i(2),a("content",d(3,2,e.billingAddress)),i(2),a("ngIf",!e.isSameAsDelivery)}}function Zn(t,r){if(t&1){let e=D();_(0),p(1,"cx-address-form",13),c(2,"cxTranslate"),c(3,"async"),c(4,"cxTranslate"),c(5,"cxTranslate"),I("submitAddress",function(o){O(e);let h=s(3);return T(h.onSubmitAddress(o))})("backToAddress",function(){O(e);let o=s(3);return T(o.onBackToAddress())}),m(),g()}if(t&2){let e=s().ngIf,n=s(2);i(),a("actionBtnLabel",J(d(2,8,"common.save")))("addressData",n.getAddressData(e.billingAddress))("showTitleCode",!0)("showCancelBtn",!0)("cancelBtnLabel",d(3,10,n.service.paymentOptionsDisabled$)?d(4,12,"common.back"):d(5,14,"common.cancel"))("setAsDefaultField",!1)("countries",n.countries$)}}function ei(t,r){if(t&1&&(_(0),p(1,"div",3),u(2,Qn,7,7,"div",4),m(),u(3,Xn,5,4,"ng-container",2)(4,Zn,6,16,"ng-container",2),g()),t&2){let e=r.ngIf,n=s(2);i(2),a("ngIf",n.cart==null?null:n.cart.deliveryItemsQuantity),i(),a("ngIf",!n.isEditBillingAddress&&e.billingAddress),i(),a("ngIf",n.isEditBillingAddress)}}function ti(t,r){if(t&1&&(_(0),u(1,ei,5,3,"ng-container",2),c(2,"async"),c(3,"async"),g()),t&2){let e=s();i(),a("ngIf",De(5,qn,d(2,1,e.billingAddress$),d(3,3,e.isSameAsDelivery$)))}}function ni(t,r){t&1&&f(0,"cx-spinner")}var gn=t=>({label:t});function ii(t,r){}function ai(t,r){}function oi(t,r){t&1&&(p(0,"abbr",11),c(1,"cxTranslate"),y(2,"*"),m()),t&2&&a("title",J(d(1,2,"common.required")))}function ri(t,r){if(t&1&&(_(0),p(1,"div",4)(2,"span",5),f(3,"cx-icon",6),m(),p(4,"p",7),y(5),c(6,"cxTranslate"),m()(),g()),t&2){let e=s(2);i(3),a("type",e.iconTypes.ERROR),i(2),x(" ",d(6,2,"opfCheckout.errors.noBillingAddress")," ")}}function si(t,r){if(t&1){let e=D();p(0,"button",10),c(1,"cxTranslate"),c(2,"cxTranslate"),I("click",function(){O(e);let o=s(3);return T(o.close())}),f(3,"cx-icon",6),m()}if(t&2){let e=s(3);v("aria-label",d(1,3,"opfCheckout.closeTermsAndConditionsAlert"))("title",d(2,5,"opfCheckout.closeTermsAndConditionsAlert")),i(3),a("type",e.iconTypes.CLOSE)}}function ci(t,r){if(t&1&&(p(0,"div",8)(1,"span",5),f(2,"cx-icon",6),m(),p(3,"p",7),y(4),c(5,"cxTranslate"),m(),u(6,si,4,7,"button",9),m()),t&2){let e=s(2);i(2),a("type",e.iconTypes.INFO),i(2),x(" ",d(5,3,e.isExplicit?"opfCheckout.checkTermsAndConditionsExplicit":"opfCheckout.checkTermsAndConditionsImplicit")," "),i(2),a("ngIf",e.isDismissible)}}function di(t,r){if(t&1&&(p(0,"div",2),u(1,ri,7,4,"ng-container",3),c(2,"async"),u(3,ci,7,5,"ng-template",null,0,N),m()),t&2){let e=$(4),n=s();i(),a("ngIf",d(2,2,n.paymentDisabled$))("ngIfElse",e)}}var li=["*"];function pi(t,r){if(t&1&&(p(0,"h3"),y(1),c(2,"cxTranslate"),m()),t&2){let e=s();i(),x(" ",d(2,1,e.headingTranslationKey||"opfCheckout.paymentOption")," ")}}function mi(t,r){}function ui(t,r){if(t&1&&f(0,"img",12),t&2){let e=s(2).$implicit;a("src",e.logoUrl,de)("alt",e.displayName)}}function fi(t,r){if(t&1){let e=D();_(0),p(1,"div",7)(2,"input",8),c(3,"async"),c(4,"async"),c(5,"async"),I("change",function(){O(e);let o=s().$implicit,h=s(4);return T(h.changePayment(o))}),m(),p(6,"label",9)(7,"div",10),y(8),u(9,ui,1,2,"img",11),m()()(),g()}if(t&2){let e=s().$implicit,n=s(4);i(2),a("id",Ee("paymentId-",e.id))("value",e.id)("checked",!d(3,10,n.paymentDisabled$)&&e.id===n.selectedPaymentId)("disabled",d(4,12,n.paymentDisabled$)||n.disabled&&n.explicitTermsAndConditions),v("aria-checked",d(5,14,n.paymentDisabled$)&&e.id===n.selectedPaymentId),i(4),a("for",Ee("paymentId-",e.id)),i(2),x(" ",e.displayName," "),i(),a("ngIf",e==null?null:e.logoUrl)}}function hi(t,r){if(t&1&&(_(0),p(1,"div",13)(2,"span",14),f(3,"cx-icon",15),m(),p(4,"p",16),y(5),m()(),g()),t&2){let e=s(5);i(3),a("type",e.iconTypes.INFO),i(2),x(" ",e.noRenderPaymentWrapperMessage," ")}}function _i(t,r){if(t&1&&(p(0,"div",13)(1,"span",14),f(2,"cx-icon",15),m(),p(3,"p",16),y(4),m()()),t&2){let e=s().ngIf,n=s(7);i(2),a("type",n.iconTypes.INFO),i(2),x(" ",e," ")}}function gi(t,r){if(t&1&&(_(0),u(1,_i,5,2,"div",18),g()),t&2){let e=s(3).$implicit,n=s(4);i(),a("ngIf",e.id===n.selectedPaymentId)}}function yi(t,r){if(t&1&&(_(0),u(1,gi,2,1,"ng-container",1),c(2,"async"),g()),t&2){let e=s(2).$implicit,n=s(4);i(),a("ngIf",d(2,1,n.getPaymentInfoMessage(e.id)))}}function Ci(t,r){t&1&&Me(0)}function vi(t,r){if(t&1&&(_(0),u(1,Ci,1,0,"ng-container",19),g()),t&2){let e=s(6);i(),a("ngTemplateOutlet",e.customPaymentTemplate)}}function xi(t,r){if(t&1&&f(0,"cx-opf-checkout-payment-wrapper",20),t&2){let e=s(6);a("selectedPaymentId",e.selectedPaymentId)}}function Pi(t,r){if(t&1&&(_(0),u(1,yi,3,3,"ng-container",1)(2,vi,2,1,"ng-container",1)(3,xi,1,1,"cx-opf-checkout-payment-wrapper",17),g()),t&2){let e=s().$implicit,n=s(4);i(),a("ngIf",n.isPaymentInfoMessageVisible),i(),a("ngIf",n.customPaymentTemplate),i(),a("ngIf",!n.customPaymentTemplate&&n.isPaymentRenderBelow&&n.selectedPaymentId&&e.id===n.selectedPaymentId)}}function Si(t,r){if(t&1&&(p(0,"div"),_(1),u(2,fi,10,16,"ng-container",1),g(),u(3,hi,6,2,"ng-container",1),c(4,"async"),u(5,Pi,4,3,"ng-container",1),c(6,"async"),m()),t&2){let e=s(4);i(2),a("ngIf",!e.isOnlyOnePaymentOptionAvailable||e.forceRadioInputsView),i(),a("ngIf",!e.renderPaymentWrapper&&!d(4,3,e.paymentDisabled$)),i(2),a("ngIf",e.renderPaymentWrapper&&!d(6,5,e.paymentDisabled$))}}function bi(t,r){if(t&1){let e=D();p(0,"div"),u(1,mi,0,0,"ng-template",4)(2,Si,7,7,"div",5),p(3,"cx-pagination",6),I("viewPageEvent",function(o){O(e);let h=s(3);return T(h.pageChange(o))}),m()()}if(t&2){let e=s(2).ngIf,n=s();i(),a("cxOutlet",n.opfCheckoutOutlets.OPF_CHECKOUT_BEFORE_PAYMENT_OPTIONS)("cxOutletContext",n.outletContext$),i(),a("ngForOf",e==null||e.data==null?null:e.data.value),i(),a("pagination",n.paginationModel)}}function ki(t,r){if(t&1&&(_(0),p(1,"div",3),Ct(2),u(3,bi,4,4,"div",1),c(4,"async"),m(),g()),t&2){let e=s(2);i(3),a("ngIf",!d(4,1,e.opfPaymentEventsService.isGiftCardCoveredTotalAmountEvent$))}}function Oi(t,r){if(t&1&&(_(0),u(1,ki,5,3,"ng-container",2),g()),t&2){let e=r.ngIf;s();let n=$(6);i(),a("ngIf",!(e!=null&&e.loading))("ngIfElse",n)}}function Ti(t,r){t&1&&f(0,"cx-spinner")}var Ii=t=>({cxRoute:t});function Ai(t,r){if(t&1&&(p(0,"button",3),c(1,"cxUrl"),c(2,"cxTranslate"),f(3,"cx-icon",4),m()),t&2){let e=s(2);a("routerLink",d(1,3,A(7,Ii,e.editConfig.route))),v("aria-label",d(2,5,e.editConfig.ariaLabelKey||"opfCheckout.editCardDefaultLabel")),i(3),a("type",e.iconTypes.PENCIL)}}function Mi(t,r){if(t&1&&(_(0),f(1,"cx-card",1),u(2,Ai,4,9,"button",2),g()),t&2){let e=r.ngIf,
1n=s();i(),a("content",e),i(),a("ngIf",n.editConfig==null?null:n.editConfig.route)}}var Ei=t=>({count:t}),yn=()=>[],Di=(t,r)=>({items:t,readonly:!0,promotionLocation:r}),Fi=t=>({route:t,ariaLabelKey:"checkoutReview.editDeliveryAddressDetails"}),wi=t=>({route:t,ariaLabelKey:"checkoutReview.editDeliveryMode"});function Ri(t,r){}function Bi(t,r){if(t&1&&f(0,"cx-opf-checkout-review-card",10),t&2){let e=r.ngIf,n=s(3);a("cardContent$",n.getDeliveryAddressCard(e))("editConfig",A(2,Fi,n.getCheckoutStepUrl(n.checkoutStepTypeDeliveryAddress)))}}function $i(t,r){if(t&1&&f(0,"cx-opf-checkout-review-card",10),t&2){let e=r.ngIf,n=s(3);a("cardContent$",n.getDeliveryModeCard(e))("editConfig",A(2,wi,n.getCheckoutStepUrl(n.checkoutStepTypeDeliveryMode)))}}function Ni(t,r){if(t&1&&(p(0,"div",8),u(1,Bi,1,4,"cx-opf-checkout-review-card",9),c(2,"async"),u(3,$i,1,4,"cx-opf-checkout-review-card",9),c(4,"async"),m()),t&2){let e=s(2);i(),a("ngIf",d(2,2,e.deliveryAddress$)),i(2),a("ngIf",d(4,4,e.deliveryMode$))}}function Li(t,r){}function Vi(t,r){if(t&1&&(_(0),p(1,"div",5),y(2),c(3,"cxTranslate"),m(),u(4,Ni,5,6,"div",6)(5,Li,0,0,"ng-template",7),c(6,"async"),g()),t&2){let e=s();i(2),x(" ",d(3,4,"opfCheckout.itemsToBeShipped")," "),i(2),a("ngIf",e.isAddressCardVisible),i(),a("cxOutlet",e.cartOutlets.CART_ITEM_LIST)("cxOutletContext",De(8,Di,d(6,6,e.activeCartFacade.getDeliveryEntries()),e.promotionLocation))}}var Ui=t=>({value:t}),Gi=t=>({disabled:t}),Hi=()=>["for-mobile"],ji=()=>({cxRoute:"termsAndConditions"}),Wi=()=>["for-desktop"];function Yi(t,r){if(t&1&&f(0,"cx-opf-checkout-terms-and-conditions-alert",7),t&2){let e=s().ngIf,n=s();a("isVisible",n.termsAndConditionInvalid)("isExplicit",e.value)("isDismissible",!1)("ngClass",j(4,Hi))}}function zi(t,r){if(t&1){let e=D();p(0,"div",8),c(1,"cxTranslate"),p(2,"h3"),y(3),c(4,"cxTranslate"),m(),p(5,"form",9)(6,"div",10)(7,"label")(8,"input",11),I("change",function(){O(e);let o=s(2);return T(o.toggleTermsAndConditions())}),m(),p(9,"span",12),y(10),c(11,"cxTranslate"),p(12,"a",13),c(13,"cxUrl"),y(14),c(15,"cxTranslate"),m()()()()()()}if(t&2){let e=s(2);v("aria-label",d(1,6,"opfCheckout.termsAndConditions")),i(3),Q(d(4,8,"opfCheckout.termsAndConditions")),i(2),a("formGroup",e.checkoutSubmitForm),i(5),x(" ",d(11,10,"checkoutReview.confirmThatRead")," "),i(2),a("routerLink",d(13,12,j(16,ji))),i(2),x(" ",d(15,14,"checkoutReview.termsAndConditions")," ")}}function Ki(t,r){if(t&1&&f(0,"cx-opf-checkout-terms-and-conditions-alert",14),t&2){let e=s().ngIf,n=s();a("isDismissible",!0)("isVisible",n.termsAndConditionInvalid)("isExplicit",e.value)("ngClass",j(4,Wi))}}function qi(t,r){}function Qi(t,r){if(t&1&&(_(0),u(1,Yi,1,5,"cx-opf-checkout-terms-and-conditions-alert",1)(2,zi,16,17,"div",2),f(3,"cx-opf-checkout-billing-address-form"),p(4,"cx-opf-checkout-payments",3),u(5,Ki,1,5,"cx-opf-checkout-terms-and-conditions-alert",4)(6,qi,0,0,"ng-template",5),m(),f(7,"cx-opf-checkout-review-cart-details",6),c(8,"async"),c(9,"async"),g()),t&2){let e=r.ngIf,n=s();i(),a("ngIf",!e.value),i(),a("ngIf",e.value),i(2),a("elementsPerPage",10)("explicitTermsAndConditions",e.value)("disabled",n.termsAndConditionInvalid),i(),a("ngIf",!e.value),i(),a("cxOutlet",n.opfCheckoutOutlets.OPF_CHECKOUT_BEFORE_SAVED_PAYMENT_OPTIONS)("cxOutletContext",A(15,Gi,n.paymentOptionsDisabled$)),i(),a("cart",d(8,11,n.cart$))("entries",d(9,13,n.entries$))("isAddressCardVisible",!0)}}var Ji=(()=>{class t{transform(e){return e?{textBold:`${e.firstName} ${e.lastName}`,text:[e.line1,e.line2,this.getTownLine(e),e.postalCode,e.phone]}:{}}getTownLine(e){let n=e.region?.isocode||"",o=e.town||"",h=e.country?.isocode||"",H=[];return o&&H.push(o),n&&(o&&H.push(", "),H.push(n)),h&&((o||n)&&H.push(", "),H.push(h)),H.join("")}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275pipe=gt({name:"cxGetAddressCardContent",type:t,pure:!0})}}return t})(),rt=(()=>{class t{constructor(){this.opfPaymentFacade=l(hn),this.opfResourceLoaderService=l(mn),this.userIdService=l(Le),this.activeCartService=l(G),this.routingService=l(Ve),this.globalMessageService=l(pe),this.orderFacade=l(en),this.opfMetadataStoreService=l(ie),this.cartAccessCodeFacade=l(Qt),this.winRef=l(It),this.renderPaymentMethodEvent$=new U({isLoading:!1,isError:!1})}executeScriptFromHtml(e){this.routingService.getRouterState().pipe(C(1),k(n=>n.state.semanticRoute===at)).subscribe(()=>{setTimeout(()=>{this.opfResourceLoaderService.executeScriptFromHtml(e)}
1)})}getRenderPaymentMethodEvent(){return this.renderPaymentMethodEvent$.asObservable()}initiatePayment(e){return this.lastPaymentOptionId=e,this.renderPaymentMethodEvent$.next({isLoading:!0,isError:!1}),this.opfResourceLoaderService.clearAllResources(),ce([this.userIdService.getUserId(),this.activeCartService.getActiveCartId()]).pipe(M(()=>this.opfMetadataStoreService.updateOpfMetadata({isPaymentInProgress:!0})),P(([n,o])=>this.cartAccessCodeFacade.getCartAccessCode(n,o).pipe(k(h=>!!h?.accessCode),B(({accessCode:h})=>this.getPaymentInitiationConfig(o,h,e,_n(this.winRef?.nativeWindow))))),P(n=>this.opfPaymentFacade.initiatePayment(n)),M(n=>{n instanceof Error||(this.storePaymentSessionId(n),this.renderPaymentGateway(n))}),q(n=>this.handlePaymentInitiationError(n)),Mt({shouldRetry:Ne,maxTries:At}),C(1))}storePaymentSessionId(e){let n=e.pattern===Ce.FULL_PAGE&&e.paymentSessionId?e.paymentSessionId:void 0;this.opfMetadataStoreService.updateOpfMetadata({opfPaymentSessionId:n})}reloadPaymentMode(){this.lastPaymentOptionId&&this.initiatePayment(this.lastPaymentOptionId).subscribe()}renderPaymentGateway(e){if(e?.dynamicScript){let n=e?.dynamicScript?.html,o=e?.paymentOptionId??this.lastPaymentOptionId;this.opfResourceLoaderService.loadResources(e.dynamicScript.jsUrls,e.dynamicScript.cssUrls,o,e.dynamicScript).then(()=>{this.renderPaymentMethodEvent$.next({isLoading:!1,isError:!1,renderType:e?.pattern,html:n,paymentOptionId:o}),n&&e?.dynamicScript?.htmlContentMode!==ln.SEPARATE&&this.executeScriptFromHtml(n)}).catch(()=>{this.handleGeneralPaymentError().pipe(C(1)).subscribe()});return}if(e?.destination){this.renderPaymentMethodEvent$.next({isLoading:!1,isError:!1,renderType:e?.pattern,destination:e?.destination,paymentOptionId:e?.paymentOptionId??this.lastPaymentOptionId});return}this.handleGeneralPaymentError().pipe(C(1)).subscribe()}handlePaymentInitiationError(e){return Ne(e)?this.handleGeneralPaymentError():Number(e.status)===wt.CONFLICT?this.handlePaymentAlreadyDoneError():this.handleGeneralPaymentError()}handlePaymentAlreadyDoneError(){return this.orderFacade.placePaymentAuthorizedOrder(!0).pipe(q(()=>(this.onPlaceOrderError(),Pe())),P(()=>(this.onPlaceOrderSuccess(),se(()=>"Payment already done"))))}onPlaceOrderSuccess(){this.routingService.go({cxRoute:"orderConfirmation"})}onPlaceOrderError(){this.renderPaymentMethodEvent$.next(oe(K({},this.renderPaymentMethodEvent$.value),{isError:!0})),this.showErrorMessage("opfCheckout.errors.unknown"),this.routingService.go({cxRoute:at})}handleGeneralPaymentError(){return this.renderPaymentMethodEvent$.next(oe(K({},this.renderPaymentMethodEvent$.value),{isError:!0})),this.showErrorMessage("opfPayment.errors.proceedPayment"),se("Payment failed")}showErrorMessage(e){this.globalMessageService.add({key:e},X.MSG_TYPE_ERROR)}getPaymentInitiationConfig(e,n,o,h){return{otpKey:n,config:{cartId:e,browserInfo:h,configurationId:String(o),resultURL:this.routingService.getFullUrl({cxRoute:"paymentVerificationResult"}),cancelURL:this.routingService.getFullUrl({cxRoute:"paymentVerificationCancel"})}}}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=ke({token:t,factory:t.\u0275fac})}}return t})(),xn=(()=>{class t{constructor(){this.service=l(rt),this.sanitizer=l(Ot),this.globalFunctionsService=l(fn),this.opfPaymentEventsService=l(ve),this.languageService=l(Et),this.currencyService=l(Ft),this.activeCartService=l(G),this.vcr=l(_t),this.cdr=l(kt),this.opfConfig=l(nt),this.isPaymentDataReady=!1,this.PAYMENT_IFRAME_NAME="cx-payment-iframe",this.renderPaymentMethodEvent$=this.service.getRenderPaymentMethodEvent(),this.RENDER_PATTERN=Ce,this.sub=new re}bypassSecurityTrustHtml(e){return this.sanitizer.bypassSecurityTrustHtml(e)}bypassSecurityTrustResourceUrl(e){return this.sanitizer.bypassSecurityTrustResourceUrl(e)}getIframeSandbox(e){let n=this.opfConfig?.opf?.paymentOption?.iframeSandboxMap;if(e&&n&&n[e])return n[e]}ngOnInit(){this.initiatePaymentMode(),this.listenForReinitiatePaymentEvent(),this.listenForSiteContextChanges()}ngOnDestroy(){this.globalFunctionsService.unregisterGlobalFunctions(ye.CHECKOUT),this.sub.unsubscribe()}retryInitiatePayment(){this.service.reloadPaymentMode()}submitFormToIframe(){if(this.isPaymentDataReady&&this.formElement?.nativeElement){let e=this.formElement.nativeElement;this.formElement.nativeElement?.target===this.PAYMENT_IFRAME_NAME&&e.submit()}}listenForReinitiatePaymentEvent(){this.sub.add(this.opfPaymentEventsService?.reinitiatePaymentEvent$.subscribe(e=>{this.handleReinitiatePayment(e)}))}listenForSiteContextChanges(){this.sub.add(lt(this.languageService.getActive().pipe(be(1),Se()),this.currencyService.getActive().pipe(be(1),Se())).pipe(P(()=>this.activeCartService.isStable().pipe(k(e=>e),C(1)))).subscribe(()=>{this.opfPaymentEventsService.emitReinitiatePaymentEvent(this.selectedPaymentId)}))}handleReinitiatePayment(e){let n=e??this.selectedPaymentId;n&&this.initiatePaymentMode(n)}initiatePaymentMode(e){let n=e??this.selectedPaymentId;this.isPaymentDataReady=!1,this.sub.add(this.service.initiatePayment(n).subscribe({next:o=>{this.isHostedFields(o)?this.globalFunctionsService.registerGlobalFunctions({domain:ye.CHECKOUT,paymentSessionId:o.paymentSessionId,vcr:this.vcr}):this.globalFunctionsService.unregisterGlobalFunctions(ye.CHECKOUT),this.isPaymentDataReady=!0,this.cdr.detectChanges(),this.submitFormToIframe()},error:()=>{this.isPaymentDataReady=!1}}))}isHostedFields(e){return!!(!(e instanceof Error)&&e?.paymentSessionId&&e?.pattern===Ce.HOSTED_FIELDS)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=E({type:t,selectors:[["cx-opf-checkout-payment-wrapper"]],viewQuery:function(n,o){if(n&1&&vt(Fn,5),n&2){let h;xt(h=Pt())&&(o.formElement=h.first)}},inputs:{selectedPaymentId:"selectedPaymentId"},decls:6,vars:3,consts:[["paymentData",""],["noPaymentData",""],["paymentForm",""],["loading",""],["class","cx-payment-option-container",4,"ngIf"],[1,"cx-payment-option-container"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[4,"ngIf"],["class","cx-payment-link",4,"ngIf"],[1,"cx-payment-link"],[1,"btn","btn-primary",3,"href"],[1,"cx-payment-iframe",3,"src"],["class","cx-payment-iframe","name","cx-payment-iframe",4,"ngIf"],[3,"action","method","enctype","target"],["type","hidden",3,"name","value",4,"ngFor","ngForOf"],["class","btn btn-primary","type","submit",3,"value",4,"ngIf"],["name","cx-payment-iframe",1,"cx-payment-iframe"],["type","hidden",3,"name","value"],["type","submit",1,"btn","btn-primary",3,"value"],[3,"innerHTML"],[4,"ngIf","ngIfElse"],["type","button",3,"click","ngClass"]],template:function(n,o){n&1&&(u(0,Bn,2,4,"div",4),c(1,"async"),u(2,Wn,3,2,"ng-template",null,0,N)(4,Kn,3,2,"ng-template",null,1,N)),n&2&&a("ngIf",d(1,1,o.renderPaymentMethodEvent$))},dependencies:[L,le,we,Fe,he,V,w],encapsulation:2,changeDetection:0})}}return t})(),st=(()=>{class t{static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275mod=b({type:t})}static{this.\u0275inj=S({providers:[rt],imports:[F,R,_e,xn]})}}return t})(),ae=(()=>{class t{constructor(){this.checkoutDeliveryAddressFacade=l(tn),this.checkoutBillingAddressFacade=l(nn),this.userPaymentService=l(He),this.checkoutPaymentService=l(on),this.activeCartService=l(G),this.globalMessageService=l(pe),this.opfCheckoutPaymentWrapperService=l(rt),this.userAddressService=l(Ge),this._noDefaultAddressFoundForPickupMode$=new xe,this._$billingAddressSub=new 
1U(void 0),this._$isLoadingAddress=new U(!1),this._$isSameAsDelivery=new U(!0),this.billingAddress$=this._$billingAddressSub.asObservable(),this.isLoadingAddress$=this._$isLoadingAddress.asObservable(),this.isSameAsDelivery$=this._$isSameAsDelivery.asObservable(),this._$paymentOptionsDisabled=new U(!1),this.paymentOptionsDisabled$=this._$paymentOptionsDisabled.asObservable(),this.opfPaymentEventsService=l(ve)}get pickupNoDefaultAddress$(){return this._noDefaultAddressFoundForPickupMode$.asObservable()}setPaymentOptionsDisabled(e){this._$paymentOptionsDisabled.next(e)}handleNoDefaultAddress(){this.setIsSameAsDeliveryValue(!1),this._noDefaultAddressFoundForPickupMode$.next(),this.setPaymentOptionsDisabled(!0)}getCountries(){return this.userPaymentService.getAllBillingCountries().pipe(M(e=>{Object.keys(e).length===0&&this.userPaymentService.loadBillingCountries()}),mt(1))}setDefaultBillingAddress(){this._$isLoadingAddress.next(!0),this.activeCartService.hasDeliveryItems().pipe(C(1),k(e=>!e),P(()=>this.userAddressService.getDefaultAddress()),M(e=>{e||this.handleNoDefaultAddress()}),k(e=>!!e),P(e=>(this.setPaymentOptionsDisabled(!1),this.setBillingAddress(e))),q(()=>(this.globalMessageService.add({key:"opfCheckout.errors.loadDefaultAddress"},X.MSG_TYPE_ERROR),Pe(void 0)))).subscribe(),this._$isLoadingAddress.next(!1)}getAddresses(){this._$isLoadingAddress.next(!0),ce([this.getDeliveryAddress(),this.getPaymentAddress()]).pipe(C(1)).subscribe(([e,n])=>{!n&&e&&(this.setBillingAddress(e),this._$billingAddressSub.next(e)),n&&e&&(this.billingAddressId=n.id,this._$billingAddressSub.next(n),this._$isSameAsDelivery.next(!1)),this._$isLoadingAddress.next(!1)})}setDeliveryAddressAsPaymentAddress(){this.getDeliveryAddress().pipe(P(e=>e?this.setBillingAddress(e):dt),C(1)).subscribe({next:()=>this.setIsSameAsDeliveryValue(!0),complete:()=>{},error:()=>this.setIsSameAsDeliveryValue(!1)})}setBillingAddress(e){return this._$isLoadingAddress.next(!0),this.checkoutBillingAddressFacade.setBillingAddress(this.getAddressWithId(e)).pipe(P(()=>(this.activeCartService.reloadActiveCart(),this.activeCartService.isStable())),k(n=>n),P(()=>this.getPaymentAddress()),ut(this.opfPaymentEventsService.isGiftCardCoveredTotalAmountEvent$),M(([n,o])=>{n&&n.id&&(this.billingAddressId=n.id,this._$billingAddressSub.next(n),o||this.opfCheckoutPaymentWrapperService.reloadPaymentMode())}),B(([n])=>n),q(n=>(this.globalMessageService.add({key:"opfCheckout.errors.updateBillingAddress"},X.MSG_TYPE_ERROR),se(()=>n))),pt(()=>{this._$isLoadingAddress.next(!1)}),C(1))}get isSameAsDeliveryValue(){return this._$isSameAsDelivery.value}setIsSameAsDeliveryValue(e){this._$isSameAsDelivery.next(e)}getDeliveryAddress(){return this.checkoutDeliveryAddressFacade.getDeliveryAddressState().pipe(k(e=>!e.loading),B(e=>e.data))}getPaymentAddress(){return this.activeCartService.getActive().pipe(B(e=>e.sapBillingAddress))}getAddressWithId(e){return oe(K({},e),{id:this.billingAddressId})}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=ke({token:t,factory:t.\u0275fac})}}return t})(),Pn=(()=>{class t{constructor(){this.service=l(ae),this.userAddressService=l(Ge),this.activeCartFacade=l(G),this.checkoutStepService=l(dn),this.activatedRoute=l(Tt),this.cart=null,this.iconTypes=Z,this.subscription=new re,this.billingAddress$=this.service.billingAddress$,this.isLoadingAddress$=this.service.isLoadingAddress$,this.isSameAsDelivery$=this.service.isSameAsDelivery$,this.isEditBillingAddress=!1,this.isAddingBillingAddressInProgress=!1}ngOnInit(){this.subscription.add(this.activeCartFacade.getActive().subscribe(e=>this.cart=e)),this.countries$=this.service.getCountries(),this.userAddressService.loadAddresses(),this.service.setDefaultBillingAddress(),this.service.getAddresses(),this.subscription.add(this.service.pickupNoDefaultAddress$.subscribe(()=>{this.isEditBillingAddress=!0,this.isAddingBillingAddressInProgress=!0}))}cancelAndHideForm(){this.isEditBillingAddress=!1,this.isAddingBillingAddressInProgress&&(this.service.setIsSameAsDeliveryValue(!0),this.isAddingBillingAddressInProgress=!1)}back(){this.checkoutStepService.back(this.activatedRoute)}onBackToAddress(){this.subscription.add(this.service.paymentOptionsDisabled$.subscribe(e=>e?this.back():this.cancelAndHideForm()))}editCustomBillingAddress(){this.isEditBillingAddress=!0}toggleSameAsDeliveryAddress(e){let n=e.target.checked;this.service.setIsSameAsDeliveryValue(n),n?(this.service.setDeliveryAddressAsPaymentAddress(),this.isEditBillingAddress=!1):(this.isAddingBillingAddressInProgress=!0,this.isEditBillingAddress=!0)}getAddressData(e){return e?.id&&!this.isAddingBillingAddressInProgress?e:{}}onSubmitAddress(e){this.isEditBillingAddress=!1,this.isAddingBillingAddressInProgress=!1,e&&this.service.setBillingAddress(e).subscribe({next:()=>{this.service.setPaymentOptionsDisabled(!1)},error:()=>{this.service.setPaymentOptionsDisabled(!0)}})}ngOnDestroy(){this.subscription.unsubscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=E({type:t,selectors:[["cx-opf-checkout-billing-address-form"]],decls:9,vars:10,consts:[["loading",""],[4,"ngIf","ngIfElse"],[4,"ngIf"],[1,"form-group"],["class","form-check",4,"ngIf"],[1,"form-check"],["type","checkbox",1,"form-check-input",3,"change","checked"],[1,"form-check-label"],[1,"cx-custom-address-info"],[3,"content"],[3,"click",4,"ngIf"],[3,"click"],[3,"type"],[1,"cx-form",3,"submitAddress","backToAddress","addressData","
1showTitleCode","showCancelBtn","actionBtnLabel","cancelBtnLabel","setAsDefaultField","countries"]],template:function(n,o){if(n&1&&(p(0,"section"),c(1,"cxTranslate"),p(2,"h3"),y(3),c(4,"cxTranslate"),m(),u(5,ti,4,8,"ng-container",1),c(6,"async"),u(7,ni,1,0,"ng-template",null,0,N),m()),n&2){let h=$(8);v("aria-label",d(1,4,"opfCheckout.billingAddress")),i(3),Q(d(4,6,"opfCheckout.billingAddress")),i(2),a("ngIf",!d(6,8,o.isLoadingAddress$))("ngIfElse",h)}},dependencies:[L,Qe,ee,Kt,he,V,w,Ji],encapsulation:2,changeDetection:0})}}return t})(),Sn=(()=>{class t{static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275mod=b({type:t})}static{this.\u0275inj=S({providers:[ae],imports:[jt,F,W,Gt,ge,R,Y,Je,_e,et,Pn]})}}return t})(),Cn=(()=>{class t{constructor(){this.cartGuestUserFacade=l(Jt),this.multiCartFacade=l(qt),this.userIdService=l(Le),this.router=l(Ve),this.semanticPathService=l(Dt),this.activeCartFacade=l(G),this.checkoutLoginForm=new Lt({email:new Ye("",[ue.required,Ze.emailValidator]),emailConfirmation:new Ye("",[ue.required])},{validators:Ze.emailsMustMatch("email","emailConfirmation")})}onSubmit(){let e=this.checkoutLoginForm.get("email")?.value;this.updateCartGuestUserEmail(e)}updateCartGuestUserEmail(e){ce([this.userIdService.takeUserId(),this.activeCartFacade.takeActiveCartId()]).pipe(P(([n,o])=>this.cartGuestUserFacade.updateCartGuestUser(n,o,{email:e}).pipe(M(()=>this.multiCartFacade.reloadCart(o)))),C(1)).subscribe(()=>this.router.go(this.semanticPathService.get("checkoutDeliveryAddress")))}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=E({type:t,selectors:[["cx-opf-checkout-email-update"]],decls:29,vars:37,consts:[["requiredAsterisk",""],[3,"ngSubmit","formGroup"],[1,"form-legend"],[1,"form-group"],[1,"label-content"],[3,"ngTemplateOutlet"],["required","true","type","email","name","email","formControlName","email",1,"form-control",3,"placeholder"],["id","emailError","aria-live","off",3,"translationParams","control"],["required","true","type","email","name","emailConfirmation","formControlName","emailConfirmation",1,"form-control",3,"placeholder"],["id","emailConfirmationError","aria-live","off",3,"translationParams","control"],["type","submit",1,"btn","btn-block","btn-primary"],["aria-hidden","true",1,"text-decoration-none","required-asterisk",3,"title"]],template:function(n,o){if(n&1&&(p(0,"form",1),I("ngSubmit",function(){return o.onSubmit()}),p(1,"p",2),y(2),c(3,"cxTranslate"),m(),p(4,"div",3)(5,"label")(6,"span",4),y(7),c(8,"cxTranslate"),u(9,ii,0,0,"ng-template",5),m(),f(10,"input",6),c(11,"cxTranslate"),f(12,"cx-form-errors",7),c(13,"cxTranslate"),m()(),p(14,"div",3)(15,"label")(16,"span",4),y(17),c(18,"cxTranslate"),u(19,ai,0,0,"ng-template",5),m(),f(20,"input",8),c(21,"cxTranslate"),f(22,"cx-form-errors",9),c(23,"cxTranslate"),m()(),p(24,"button",10),y(25),c(26,"cxTranslate"),m()(),u(27,oi,3,4,"ng-template",null,0,N)),n&2){let h=$(28);a("formGroup",o.checkoutLoginForm),i(2),x(" ",d(3,17,"formLegend.required")," "),i(5),x(" ",d(8,19,"checkoutLogin.emailAddress.label")," "),i(2),a("ngTemplateOutlet",h),i(),a("placeholder",J(d(11,21,"checkoutLogin.emailAddress.placeholder"))),v("aria-describedby","emailError"),i(2),a("translationParams",A(33,gn,d(13,23,"checkoutLogin.emailAddress.label")))("control",o.checkoutLoginForm.get("email")),i(5),x(" ",d(18,25,"checkoutLogin.confirmEmail.label")," "),i(2),a("ngTemplateOutlet",h),i(),a("placeholder",J(d(21,27,"checkoutLogin.confirmEmail.placeholder"))),v("aria-describedby","emailConfirmationError"),i(2),a("translationParams",A(35,gn,d(23,29,"checkoutLogin.confirmEmail.label")))("control",o.checkoutLoginForm.get("emailConfirmation")),i(3),x(" ",d(26,31,"checkoutLogin.continue")," ")}},dependencies:[fe,ze,Nt,je,We,Vt,W,qe,Ke,le,Ht,w],encapsulation:2})}}return t})(),Xi=(()=>{class t{static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275mod=b({type:t})}
1static{this.\u0275inj=S({providers:[$e({cmsComponents:{OpfCheckoutEmailUpdateComponent:{component:Cn}}})],imports:[F,R,fe,W,Je,Cn]})}}return t})(),bn=(()=>{class t{constructor(){this.opfMetadataStoreService=l(ie),this.opfCheckoutBillingAddressFormService=l(ae),this.iconTypes=Z,this.paymentDisabled$=this.opfCheckoutBillingAddressFormService.paymentOptionsDisabled$}close(){this.isVisible=!1,this.opfMetadataStoreService.updateOpfMetadata({isTermsAndConditionsAlertClosed:!0})}ngOnInit(){this.opfMetadataStoreService.getOpfMetadataState().pipe(C(1),k(({isTermsAndConditionsAlertClosed:e})=>e)).subscribe(()=>{this.isVisible=!1})}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=E({type:t,selectors:[["cx-opf-checkout-terms-and-conditions-alert"]],inputs:{isDismissible:"isDismissible",isVisible:"isVisible",isExplicit:"isExplicit"},decls:1,vars:1,consts:[["termsConditions",""],["class","cx-opf-checkout-terms-and-conditions-alert",4,"ngIf"],[1,"cx-opf-checkout-terms-and-conditions-alert"],[4,"ngIf","ngIfElse"],[1,"alert","alert-danger"],["aria-hidden","true",1,"alert-icon"],[3,"type"],["tabindex","0","role","alert","aria-live","polite",1,"message"],[1,"alert","alert-info"],["class","close","type","button",3,"click",4,"ngIf"],["type","button",1,"close",3,"click"]],template:function(n,o){n&1&&u(0,di,5,4,"div",1),n&2&&a("ngIf",o.isVisible)},dependencies:[L,ee,w,V],encapsulation:2,changeDetection:0})}}return t})(),kn=(()=>{class t{static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275mod=b({type:t})}static{this.\u0275inj=S({imports:[F,R,Y,bn]})}}return t})(),On=(()=>{class t{constructor(){this.opfBaseService=l(it),this.opfConfig=l(nt),this.translation=l(Bt),this.opfMetadataStoreService=l(ie),this.globalMessageService=l(pe),this.opfCheckoutBillingAddressFormService=l(ae),this.opfPaymentEventsService=l(ve),this.userPaymentService=l(He),this.subscription=new re,this.paginationIndex=0,this.isHeadingDisplayed=!0,this.isPaymentRenderBelow=!0,this.isPaymentInfoMessageEnabled=!0,this.disabled=!0,this.onlyPaymentWrapperMode=!1,this.hideOnlyOnePaymentProviderLabel=!1,this.forceRadioInputsView=!1,this.forceDefaultPaymentOptionInputSelection=!1,this.renderPaymentWrapper=!0,this.opfCheckoutOutlets=ot,this.outletContext$=new xe,this.isOnlyOnePaymentOptionAvailable=!1,this.iconTypes=Z,this.paymentChange=new Oe,this.selectedPaymentProviderName=new Oe,this.paymentDisabled$=this.opfCheckoutBillingAddressFormService.paymentOptionsDisabled$}isStateEmpty(e){return!e?.loading&&!e?.data?.value?.length}handleDefaultPaymentOptionInputSelection(e){let n=e.data?.value?.[0];if(this.isOnlyOnePaymentOptionAvailable){this.selectedPaymentId=n?.id;let o=n?.displayName;o&&this.selectedPaymentProviderName.emit(o)}this.opfMetadataStoreService.updateOpfMetadata({defaultSelectedPaymentOptionId:n?.id}),this.forceDefaultPaymentOptionInputSelection&&!this.selectedPaymentId&&(this.selectedPaymentId=n?.id)}checkIfOnlyOnePaymentOptionAvailable(e){return e.data?.value?.length===1&&e.data?.page?.totalPages===1}getActiveConfigurations(){return this.opfBaseService.getActiveConfigurationsState({pageSize:this.elementsPerPage,pageNumber:this.paginationIndex+1}).pipe(M(e=>{e.error?this.displayError("loadActiveConfigurations"):this.isStateEmpty(e)&&this.displayError("noActiveConfigurations"),e.data?.value&&!e.error&&!e.loading&&(this.paginationModel=this.getPaginationModel(e.data?.page),e.data.value=e.data?.value.filter(n=>n.providerType!==pn.STORED_VALUE_PAYMENT),this.onlyPaymentWrapperMode&&this.selectedPaymentId&&(e.data.value=e.data.value.filter(n=>n.id===this.selectedPaymentId)),this.isOnlyOnePaymentOptionAvailable=this.checkIfOnlyOnePaymentOptionAvailable(e),this.handleDefaultPaymentOptionInputSelection(e))}))}updateActiveConfiguration(){this.activeConfigurations$=this.getActiveConfigurations()}getPaymentInfoMessage(e){let n="opfCheckout.defaultPaymentInfoMessage",o=e&&this.opfConfig?.opf?.paymentOption?.paymentInfoMessagesMap?this.opfConfig.opf.paymentOption.paymentInfoMessagesMap[e]??n:n;return this.translation.translate(o)}get isPaymentInfoMessageVisible(){return!!(this.opfConfig?.opf?.paymentOption?.enableInfoMessage&&this.isPaymentInfoMessageEnabled)}preselectPaymentOption(){let e=!1;this.subscription.add(this.opfMetadataStoreService.getOpfMetadataState().subscribe(n=>{!e&&(n.termsAndConditionsChecked||!this.explicitTermsAndConditions)?(e=!0,this.selectedPaymentId=n.selectedPaymentOptionId===z||!n.selectedPaymentOptionId?n.defaultSelectedPaymentOptionId:n.selectedPaymentOptionId,this.opfMetadataStoreService.updateOpfMetadata({selectedPaymentOptionId:this.selectedPaymentId}),this.emitOutletContext()):!n.termsAndConditionsChecked&&this.explicitTermsAndConditions?(e=!1,this.selectedPaymentId=void 0,this.emitOutletContext()):e&&(this.selectedPaymentId=n.selectedPaymentOptionId,this.emitOutletContext())}))}displayError(e){this.globalMessageService.add({key:`opfCheckout.errors.${e}`},X.MSG_TYPE_ERROR)}emitOutletContext(){this.outletContext$.next({selectedPaymentId:this.selectedPaymentId,savedCardsId:z,showSavedCardsList:this.selectedPaymentId===z,disabled:this.disabled&&this.explicitTermsAndConditions,savedCardsSelected:this.onSavedCardsSelected.bind(this)})}onSavedCardsSelected(){this.selectedPaymentId=z,this.opfMetadataStoreService.updateOpfMetadata({selectedPaymentOptionId:z}),this.emitOutletContext()}changePayment(e){this.selectedPaymentId=e.id,this.opfMetadataStoreService.updateOpfMetadata({selectedPaymentOptionId:this.selectedPaymentId}),this.emitOutletContext(),this.paymentChange.emit(e)}getPaginationModel(e){return e?.number!==void 0&&(this.paginationIndex=e.number-1),{currentPage:this.paginationIndex,pageSize:e?.size,totalPages:e?.totalPages,totalResults:e?.totalElements}}pageChange(e){this.paginationIndex=e,this.updateActiveConfiguration()}ngOnInit(){this.userPaymentService.loadPaymentMethods(),this.updateActiveConfiguration(),this.preselectPaymentOption(),this.emitOutletContext()}ngOnDestroy(){this.subscription.unsubscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=E({type:t,selectors:[["cx-opf-checkout-payments"]],inputs:{isHeadingDisplayed:"isHeadingDisplayed",headingTranslationKey:"headingTranslationKey",isPaymentRenderBelow:"isPaymentRenderBelow",isPaymentInfoMessageEnabled:"isPaymentInfoMessageEnabled",elementsPerPage:"elementsPerPage",disabled:"disabled",explicitTermsAndConditions:"explicitTermsAndConditions",onlyPaymentWrapperMode:"onlyPaymentWrapperMode",customPaymentTemplate:"customPaymentTemplate",hideOnlyOnePaymentProviderLabel:"hideOnlyOnePaymentProviderLabel",forceRadioInputsView:"forceRadioInputsView",forceDefaultPaymentOptionInputSelection:"forceDefaultPaymentOptionInputSelection",renderPaymentWrapper:"renderPaymentWrapper",noRenderPaymentWrapperMe
1ssage:"noRenderPaymentWrapperMessage"},outputs:{paymentChange:"paymentChange",selectedPaymentProviderName:"selectedPaymentProviderName"},ngContentSelectors:li,decls:7,vars:7,consts:[["loading",""],[4,"ngIf"],[4,"ngIf","ngIfElse"],[1,"cx-payment-options-list"],[3,"cxOutlet","cxOutletContext"],[4,"ngFor","ngForOf"],[1,"cx-payment-options-list-pagination",3,"viewPageEvent","pagination"],[1,"form-check"],["role","radio","type","radio","name","paymentId","formControlName","paymentId",1,"form-check-input",3,"change","id","value","checked","disabled"],[1,"cx-payment-type-label","form-check-label","form-radio-label",3,"for"],[1,"cx-payment-type"],["class","cx-payment-logo",3,"src","alt",4,"ngIf"],[1,"cx-payment-logo",3,"src","alt"],[1,"cx-payment-info-box"],["aria-hidden","true",1,"alert-icon"],[3,"type"],["tabindex","0","role","alert","aria-live","polite",1,"cx-payment-info-box-message"],[3,"selectedPaymentId",4,"ngIf"],["class","cx-payment-info-box",4,"ngIf"],[4,"ngTemplateOutlet"],[3,"selectedPaymentId"]],template:function(n,o){n&1&&(yt(),p(0,"section"),c(1,"cxTranslate"),u(2,pi,3,3,"h3",1)(3,Oi,2,2,"ng-container",1),c(4,"async"),u(5,Ti,1,0,"ng-template",null,0,N),m()),n&2&&(v("aria-label",d(1,3,"opfCheckout.paymentOption")),i(2),a("ngIf",o.isHeadingDisplayed),i(),a("ngIf",d(4,5,o.activeConfigurations$)))},dependencies:[L,we,ee,le,xn,Wt,he,ne,te,V,w],encapsulation:2,changeDetection:0})}}return t})(),Tn=(()=>{class t{static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275mod=b({type:t})}static{this.\u0275inj=S({imports:[F,R,_e,Yt,Y,st,kn,On]})}}return t})(),In=(()=>{class t{constructor(){this.iconTypes=Z}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=E({type:t,selectors:[["cx-opf-checkout-review-card"]],inputs:{cardContent$:"cardContent$",editConfig:"editConfig"},decls:2,vars:3,consts:[[4,"ngIf"],[3,"content"],["class","cx-opf-card-review-edit-button",3,"routerLink",4,"ngIf"],[1,"cx-opf-card-review-edit-button",3,"routerLink"],[3,"type"]],template:function(n,o){n&1&&(u(0,Mi,3,2,"ng-container",0),c(1,"async")),n&2&&a("ngIf",d(1,1,o.cardContent$))},dependencies:[L,Qe,Re,ee,V,w,Ue],encapsulation:2,changeDetection:0})}}return t})(),ct=(()=>{class t{static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275mod=b({type:t})}static{this.\u0275inj=S({imports:[F,Be,R,ge,Y,me,In]})}}return t})(),An=(()=>{class t extends tt{constructor(){super(...arguments),this.isAddressCardVisible=!1,this.promotionLocation=Zt.Checkout,this.cartOutlets=Xt}static{this.\u0275fac=(()=>{let e;return function(o){return(e||(e=Te(t)))(o||t)}})()}static{this.\u0275cmp=E({type:t,selectors:[["cx-opf-checkout-review-cart-details"]],inputs:{cart:"cart",entries:"entries",isAddressCardVisible:"isAddressCardVisible"},features:[Ae],decls:7,vars:12,consts:[[1,"cx-review-cart-total","d-none","d-lg-block","d-xl-block"],[1,"cx-review-cart-item","col-md-12"],[3,"promotions"],[3,"cxOutlet"],[4,"ngIf"],[1,"cx-items-to-ship-label"],["class","cx-opf-review-card-wrapper",4,"ngIf"],[3,"cxOutlet","cxOutletContext"],[1,"cx-opf-review-card-wrapper"],[3,"cardContent$","editConfig",4,"ngIf"],[3,"cardContent$","editConfig"]],template:function(n,o){n&1&&(p(0,"div",0),y(1),c(2,"cxTranslate"),m(),p(3,"div",1),f(4,"cx-promotions",2),u(5,Ri,0,0,"ng-template",3)(6,Vi,7,11,"ng-container",4),m()),n&2&&(i(),St(" ",bt(2,5,"cartItems.cartTotal",A(8,Ei,(o.cart==null?null:o.cart.totalItems)??0)),": ",o.cart==null||o.cart.totalPrice==null?null:o.cart.totalPrice.formattedValue,`
2`),i(3),a("promotions",((o.cart==null?null:o.cart.appliedOrderPromotions)||j(10,yn)).concat((o.cart==null?null:o.cart.potentialOrderPromotions)||j(11,yn))),i(),a("cxOutlet",o.cartOutlets.OPF_CHECKOUT_PICKUP_ITEMS),i(),a("ngIf",o.cart==null?null:o.cart.deliveryItemsQuantity))},dependencies:[zt,te,In,L,w,V],encapsulation:2,changeDetection:0})}}return t})(),Mn=(()=>{class t{static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275mod=b({type:t})}static{this.\u0275inj=S({imports:[F,R,me,Xe,ne,ct,An]})}}return t})(),vn=(()=>{class t extends tt{constructor(){super(...arguments),this.fb=l(Ut),this.opfMetadataStoreService=l(ie),this.cmsService=l(Rt),this.checkoutPaymentTypeFacade=l(rn),this.opfBaseFacade=l(it),this.checkoutDeliveryModesFacade=l(an),this.activeCartFacade=l(G),this.opfCheckoutBillingAddressFormService=l(ae),this.defaultTermsAndConditionsFieldValue=!1,this.selectedPaymentProviderName$=new U(void 0),this.opfCheckoutOutlets=ot,this.paymentOptionsDisabled$=this.opfCheckoutBillingAddressFormService.paymentOptionsDisabled$,this.explicitTermsAndConditions$=this.cmsService.getCurrentPage().pipe(B(e=>this.isCmsComponentInPage(un,e))),this.checkoutSubmitForm=this.fb.group({termsAndConditions:[this.defaultTermsAndConditionsFieldValue,ue.requiredTrue]}
2),this.getSelectedPayment$=this.opfBaseFacade.getActiveConfigurationsState(),this.getSelectedPaymentId$=this.opfMetadataStoreService.getOpfMetadataState().pipe(C(1),B(e=>e?.selectedPaymentOptionId))}get termsAndConditionInvalid(){return this.checkoutSubmitForm.invalid}get termsAndConditionsFieldValue(){return!!this.checkoutSubmitForm.get("termsAndConditions")?.value}isCmsComponentInPage(e,n){return!!n&&JSON.stringify(n).includes(e)}updateTermsAndConditionsState(){this.opfMetadataStoreService.updateOpfMetadata({termsAndConditionsChecked:this.termsAndConditionsFieldValue})}toggleTermsAndConditions(){this.updateTermsAndConditionsState()}onPaymentProviderSelected(e){this.selectedPaymentProviderName$.next(e)}setPickupDeliveryMode(){this.activeCartFacade.hasDeliveryItems().pipe(C(1)).subscribe(e=>{e||(this.checkoutDeliveryAddressFacade.clearCheckoutDeliveryAddress(),this.checkoutDeliveryModesFacade.setDeliveryMode("pickup"))})}ngOnInit(){this.updateTermsAndConditionsState(),this.setPickupDeliveryMode()}static{this.\u0275fac=(()=>{let e;return function(o){return(e||(e=Te(t)))(o||t)}})()}static{this.\u0275cmp=E({type:t,selectors:[["cx-opf-checkout-payment-and-review"]],features:[Ae],decls:2,vars:5,consts:[[4,"ngIf"],[3,"isVisible","isExplicit","isDismissible","ngClass",4,"ngIf"],["class","cx-opf-terms-and-conditions",4,"ngIf"],[3,"elementsPerPage","explicitTermsAndConditions","disabled"],[3,"isDismissible","isVisible","isExplicit","ngClass",4,"ngIf"],[3,"cxOutlet","cxOutletContext"],[3,"cart","entries","isAddressCardVisible"],[3,"isVisible","isExplicit","isDismissible","ngClass"],[1,"cx-opf-terms-and-conditions"],[1,"cx-place-order-form","form-check",3,"formGroup"],[1,"form-group"],["formControlName","termsAndConditions","type","checkbox",1,"scaled-input","form-check-input",3,"change"],[1,"form-check-label"],["target","_blank","rel","noopener noreferrer",1,"cx-tc-link",3,"routerLink"],[3,"isDismissible","isVisible","isExplicit","ngClass"]],template:function(n,o){n&1&&(u(0,Qi,10,17,"ng-container",0),c(1,"async")),n&2&&a("ngIf",A(3,Ui,d(1,1,o.explicitTermsAndConditions$)))},dependencies:[L,Mn,bn,Fe,fe,ze,$t,je,We,W,qe,Ke,Re,Pn,On,An,ne,te,V,w,Ue],encapsulation:2,changeDetection:0})}}return t})(),Zi=(()=>{class t{static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275mod=b({type:t})}
2static{this.\u0275inj=S({providers:[$e({cmsComponents:{OpfCheckoutPaymentAndReview:{component:vn,guards:[cn,sn]}}})],imports:[F,R,Tn,me,W,Be,Sn,et,ne,Xe,Y,ge,kn,st,ct,Mn,vn]})}}return t})(),En=(()=>{class t{static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275mod=b({type:t})}static{this.\u0275inj=S({imports:[Zi,Tn,Sn,st,ct,Xi]})}}return t})();var $a=(()=>{class t{static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275mod=b({type:t})}static{this.\u0275inj=S({imports:[En]})}}return t})();export{$a as OpfCheckoutModule};

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.