PageSourceSearch

https://shop.tavour.com/cdn/shopifycloud/checkout-web/assets/c1/page-Payment.DIKcLR3-.js

js tavour.com collected 2026-09-24 18:54:36 UTC 11,738 bytes, 1 lines download raw bytes

1import{u as e,k as C,f as bt,h as vt,p as Ct,S as f,i as m,T as _t,A as Et,q as Rt}from"./esnext-vendor.DQ9BNaJe.js";import{u as Mt,T as kt,S as Ft,b as At,G as wt,c as Tt,d as Bt,D as Dt,e as zt}from"./useAddressMutationsWithNegotiation.JQGSZE93.js";import{L as It,P as Lt,R as xt,u as Ht,S as Nt}from"./RememberMeSection.xQQD16Jz.js";import{A as c,L as Ot,W as d,cK as Wt,K as Vt,f as Ut,cL as qt,c1 as Gt,v as Kt,bJ as Yt,bI as $t,cM as Jt,q as S,$ as Qt,m as jt,Q as Xt,U as l,cN as Zt,Z as k,k as x,n as ea,bz as H,cO as ta,b as aa,P as ra,R as na,I as sa,l as ia,cP as le,H as oa,M as la,N as ca,cD as da}from"./hydrate.D4A9Cb0p.js";import{u as he,a as ye,V as ua,b as ma,c as pa,d as ha,e as ya}from"./components-PaymentMethodProgressionHost.CD0GXHo8.js";import{a as Pa,u as ga,b as fa}from"./hooks-useGeneralPaymentErrorMessage.Dm3PRuw1.js";import{u as Sa}from"./components-RedirectionNotice.module.2Lrm8ufW.js";import{B as ba}from"./BillingAddressSelector.DctTpftG.js";import{C as va}from"./Captcha.C1WT1fRD.js";import{M as Ca}from"./hooks-useShopPayNewSignupLoginExperiment.9bCmRvur.js";import{u as _a,S as ce,b as Ea,d as Ra,c as Ma,P as ka,a as Fa}from"./Page.B9MyjEfr.js";import{u as Aa,P as wa,R as Ta,a as Ba,V as Da,S as za}from"./PaymentButtons.cmCJwI80.js";import{P as de}from"./hooks-useWalletsTimeout.BeFlWkI9.js";import{T as O,a5 as ue,bY as Ia,as as La,aj as N,cV as xa,al as Ha,W as me,m as Na,cW as Oa,bW as Wa,ck as Va,a7 as Ua,ak as qa,cX as Ga,ar as Ka,b9 as pe}from"./addresses-is-address-empty.BB1pvxM5.js";import{I as Ya}from"./ImpressionEventCapture.C-19abdk.js";import{K as $a}from"./KnownBuyerPaymentMethodSelector.C1EQJP8o.js";import"./app.B3Jiyyyv.js";import"./amazon-pay-useAmazonPayPaymentLine.CsQac3SS.js";import"./PaymentIcon.D0Z6Se8T.js";import"./PaymentLine.DHHGwgI-.js";import"./shop-pay-installments-types.BePBAMcY.js";import"./localization-index.Cz2QAhoe.js";import"./Theme-ThemeOverride.C9ATh16e.js";import"./IncentiveBadge.BlLsspj4.js";import"./Choice.Cm0SI98l.js";import"./Checkbox.DPa0lYMg.js";import"./hooks-useUpdateCheckoutAddress.BhapmoFI.js";import"./hooks-useShopPayExternalAppContext.xiQcN-hk.js";import"./helpers-derivations.D2KtNl4E.js";import"./redemption-promotions.jAy-zkcv.js";import"./graphql-PaymentSessionMutation.CSqu0oVn.js";import"./payment-usePaymentExemptionReason.BcS5fKkI.js";import"./helpers-credit-card-disabled.BQ6Iyzpd.js";import"./shop-pay-normalizeBuyerDetails.Ckdi9MtB.js";import"./hooks-useShopPayProgressIntercepts.Bk0aPlkl.js";import"./proposal-delegated-payment-instrument.VgHHy3qQ.js";import"./hooks-useShowShopPayOptin.BFq7voDt.js";import"./AddressPresenter.B3e4WG12.js";import"./shared-permissions.g_hGDKr0.js";import"./Section.CF4eMCLG.js";import"./ChangeCompanyLocationLink.braqVZes.js";import"./BillingAddressForm.DkbefRCe.js";import"./utilities-previous.DZk5oM9s.js";import"./PhoneField.BCRFK9Q9.js";import"./hooks-useSuppressShopPayModalOnLoad.CwJgxtUb.js";import"./PayButton-helpers.C2T9gxby.js";import"./ShopPayCaptcha.CvCnZWWm.js";import"./PaymentErrorBanner.VkG56uoV.js";import"./cross-border-hooks.DsyMg8eX.js";import"./hooks-usePaypalRowEffects.DWAxfbPr.js";function Ja(){const{i18n:a,shop:{developmentShop:n},url:r}=O();return n?e(d,{errorType:c.PaymentError,tone:"warning",children:a.translate("payment_errors.development_store_with_order_limit",{development_store_order_testing_docs_link:e(Ot,{href:r.developmentStoreOrderTestingDocs(),children:a.translate("payment_errors.development_store_order_testing_docs_link")})})}):null}const y=a=>e(k,{children:a});function Qa({hostedFieldsLoaded:a,children:n}){const{i18n:r,shop:s,source:u,checkout:o,observability:_}=O(),{giftCardsEnabled:F,discountCodesEnabled:p,acceptTipPayments:h}=s,{configuration:b}=o,i=o.latestReceipt.value,Pe=Wt(),ge=p&&Pe.value,{nextPage:P,previousPage:A}=Vt(),[fe,Se]=C(!1),[be,W]=C(!1),[ve,Ce]=C(!1),_e=u.type==="simulated",V=ue().buyerIdentity.value?.purchasingCompany,E=!!V,Ee=u.type==="draftOrder",U=E&&Ee,Re=Ia(),{cartLineChangeLoadingSignal:Me}=La(),ke=Me.value,[q,w]=C(!1),[G,Fe]=C(),{negotiate:K,progress:Ae,progressing:we}=Ut(),Y=N().isBlocked.value,Te=xa(),T=Ha(),$=ue(),J=$.paymentMethods,Be=E&&!o.isShippingRequired.value,De=Aa(),R=!Te.value||T.value,{billingAddressOption:ze,directPaymentErrors:Ie,generalPaymentError:Q,generalPaymentErrorCode:j,paymentLines:{value:v}}=me(),Le=Na({shop:s,checkout:o,paymentMethods:J?.value}),xe=v.some(t=>t.method.type==="wallet"||t.method.type==="walletsPlatformPaymentMethod"),He=!R&&o.isShippingRequired.value&&!xe&&ze.value==="shipping"?!1:Oa({lines:v,paymentMethods:J?.value,purchasingCompany:!!V,isBillingAddressForced:!Le})||!R,X=me().localizationExtensions.value,{value:Ne}=Wa(),Oe=Ne.length!==0,Z=R&&Oe||!R,B=v.some(t=>t.method.type==="direct"),{displayedPaymentMethods:We}=he({experienceType:"list"}
1),Ve=ye(We).mode==="knownBuyerShared",Ue=qt().value,qe=Gt(),Ge=Kt({isPayWithPayPalButton:!0}).value.status==="error";Mt();const Ke=$.managedByMarketsPro,ee=Y||_e&&P.id!=="review"||qe.value&&Ge||ke,{lastJourneyProgression:Ye}=N(),$e=async()=>{if(!ee){w(!0);try{await Ae("payment-form-submit",t=>{const M=t.status==="failed",L="receipt"in t&&t.receipt?.status==="failed"&&t.receipt?.failure?.type==="order",St=t.status==="success"&&"receipt"in t&&t.receipt.status==="failed";w(!1),Ce(t.status==="fetch_failed"),W(M||L),Se(St)})}catch(t){t instanceof Error&&Fe(t)}finally{w(!1)}}},D=Yt(),Je=bt(()=>Pa(Ie)),z=i?.status==="failed",g=z&&i?.failure.type==="payment"?i.failure:void 0,te=g?.code==="AUTHENTICATION_ERROR",Qe=z&&i?.failure?.type==="inventory"?i.failure:void 0,je=ve,Xe=!!(be||z&&i?.failure?.type==="order"),Ze=g!=null&&!te,et=$t(g),tt=Q.value&&!Va(j.value),at=ga(Q.value,j.value),rt=r.translate("payment.title"),nt=r.translate("general.pay_now_button_label"),st=o.configuration.layout.isOnePage.value,it=Jt(),ot=i?.status==="failed"&&i.failure.type==="payment"&&i.failure.code==="GENERIC_ERROR"&&v[0]?.method.type==="walletsPlatformPaymentMethod"&&v[0]?.method.name===Ua.AmazonPay;_a({stage:B&&!a?ce.Usable:ce.Complete,id:"Payment"}),qa("payment");const ae=!!g,re=i?.id,ne=!!(g&&Ga.has(g.code));if(vt(()=>{if(!(D||!ae||E)){if(ne){_.log("payment_form_skip_negotiate_captcha","[PaymentForm] Skipped negotiate for CAPTCHA_REQUIRED receipt — handled by useHandleReceipt",{receiptId:re});return}(async()=>await K({silenceViolations:["all"],fieldsToResolve:["paymentLines"]}))()}},[ae,D,E,K,_,ne,re]),G)throw G;const lt=S("Checkout::Dynamic::Render","PAYMENT1"),se=S("Checkout::Dynamic::Render","PAYMENT2"),ie=S("Checkout::Dynamic::Render","PAYMENT3"),oe=S("Checkout::Dynamic::Render","PAYMENT4"),ct=S("purchase.checkout.payment-method-list.render-before"),dt=S("purchase.checkout.payment-method-list.render-after"),ut=b.visibility.showReductions,mt=Ka(),pt=Qt({base:!0,medium:!1}),ht=!mt.value||pt;let I=null;b.visibility.showAside?ht&&(I=e(oa,{above:"small",children:e(le,{headerLevel:1,monorailSection:"payment"})})):I=e(le,{headerLevel:1,monorailSection:"payment"});const yt=ut&&!U&&(F||p)?I:null,Pt=U||Re.value?!1:h&&!pe(u),gt=Ke.value&&Z&&P.id!=="review",ft=q||we.value;return Ct(()=>{Ye.value.type==="failed"&&W(!0)}),e(f,{children:[e(jt,{children:rt}),e(Xt,{onSubmit:$e,disabled:q||Y,implicitSubmit:nt,children:e(Ea,{children:[e(Ra,{children:[e(l,{customizations:lt,render:y}),e(ja,{genericPaymentError:Ze,shouldSuppressReceiptError:D,inventoryReservationFailure:Qe,isAmazonPaymentDeclineScenario:ot,networkFailure:je,orderFailure:Xe,paymentErrorMessage:et,processingFailed:fe}),e(Ja,{}),yt,Pt?e(f,{children:[e(Zt,{sectionId:"tips",children:e(kt,{renderInSection:!0,headingLevel:1})}),e(l,{customizations:se,render:y})]}):null,X.length>0&&e(f,{children:e(k,{accessibilityLabel:r.translate("localized_fields.additional_information.title"),children:e(x,{gap:"base",children:[e(ea,{id:`${H}-localized-fields`,level:1,children:r.translate("localized_fields.additional_information.title")}),X.map((t,M)=>{const L=`${t.value.key}${M}`;return e(It,{localizationExtension:t,index:M},L)})]})})}),e(f,{}),e(k,{accessibilityRole:"group",accessibilityLabelledBy:H,children:e(x,{gap:"base",children:[e(Lt,{headingId:H,autoFocus:!st}),e(m,{when:b.visibility.showStoreCreditRedemption,children:e(Ft,{})}),tt?e(d,{errorType:c.PaymentError,tone:"critical",children:at}):null,e(m,{when:Je,children:e(d,{errorType:c.PaymentError,tone:"critical",children:r.translate("payment.generic_incorrect_card_info")})}),te?e(d,{errorType:c.PaymentError,tone:"critical",children:r.translate("payment_errors.three_d_secure_failed")}):null,e(l,{customizations:ct}),e(m,{when:b.visibility.showStoreCreditRedemption,children:e(At,{})}),n,e(l,{customizations:dt}),e(m,{when:De,children:e(va,{})})]})}),e(wt,{}),h?e(l,{customizations:ie,render:y}):e(l,{customizations:se,render:y}),He&&(o.isShippingRequired.value||pe(u)||Be)&&!it.value&&!(Ve&&B)?e(ba,{}):null,h?e(l,{customizations:oe,render:y}):e(l,{customizations:ie,render:y}),e(xt,{compact:!0}),!h&&e(l,{customizations:oe,render:y}),Ue&&!B?e(k,{children:e(ua,{})}):null,e(m,{when:T,children:e(de,{placement:"default",wrapInSection:!0}
1)}),e(m,{when:b.visibility.showPurchaseOrderNumberField,children:e(ma,{})})]}),gt&&e(Ca,{}),e(wa,{}),ge&&e(ta,{targetSelector:'input[name="reductions"]',icon:"discount",label:r.translate("order_summary.discount_discovery.add_code")}),e(m,{when:T,children:e(de,{placement:"above-pay-button"})}),e(Ma,{children:[e(ka,{children:[e(Ta,{children:e(Ba,{disabled:!Z||ee,loading:ft,defaultLabel:P.label,pixelId:"go_to_next_step"})}),P.notice?e(f,{children:[e(aa,{blockSize:"small-200"}),e(ra,{textAlign:"center",color:"subdued",type:"small",children:P.notice})]}):null]}),A.route?e(Fa,{children:e(na,{href:A.route,variant:"plain",inlineSize:"fill",textDecoration:"none",pixelId:"go_to_previous_step",children:e(x,{direction:"inline",gap:"small-200",alignItems:"center",children:[e(sa,{type:"chevron-left",size:"small"}),e(ia,{children:A.label})]})})}):null]}),P.id==="review"?null:e(f,{children:[e(Da,{}),e(za,{})]})]})})]})}const ja=({orderFailure:a,inventoryReservationFailure:n,isAmazonPaymentDeclineScenario:r,genericPaymentError:s,processingFailed:u,shouldSuppressReceiptError:o,paymentErrorMessage:_,networkFailure:F})=>{const{i18n:p}=O(),{lastJourneyProgression:h}=N();return r?null:(s||u)&&!o?e(d,{errorType:c.PaymentError,tone:"critical",children:_}):F?e(d,{errorType:c.PaymentError,tone:"critical",children:p.translate("order_errors.network_failure")}):n?e(d,{errorType:c.PaymentError,tone:"critical",children:p.translate("order_errors.inventory_reservation_failure")}):a?h.value.type==="failed"&&h.value.reason==="decision_rule_block"?e(d,{errorType:c.PaymentError,tone:"critical",children:p.translate("payment_errors.generic_error")}):e(d,{errorType:c.PaymentError,tone:"critical",children:p.translate("order_errors.creation_failure")}):null};function Xa(){const a=Tt({enableAutoSelect:!1}),{expandedSlot:n}=Bt(a);return e($a,{msiSlot:n,hideChoiceListChrome:!1,detailsPresentation:"boxed"})}function Za(){const{displayedPaymentMethods:a}=he({experienceType:"list"}),n=ye(a),r=_t(()=>a.map(s=>"name"in s?s.name:s.type),[a]);return n.mode==="knownBuyerShared"?e(Ya,{impressionType:"payment",impressionFeatures:pa(r,n),children:e(Xa,{})}):e(ha,{})}function Zr(){const a=Et(!1),n=Ht(),r=fa(),{postPurchaseEnabled:s}=Sa(),u=Rt(()=>{a.current=!0},[]);return e(da,{target:"cart.paymentLines[0]",children:[e(la,{section:"payment",children:e(ca,{section:"payment",children:e(Qa,{hostedFieldsLoaded:a.current,children:e(Dt,{blurValidationEnabled:!0,onSetFieldErrors:r,onLoadSuccess:u,children:[e(er,{}),e(Za,{}),e(m,{when:n,children:e(Nt,{})})]})})})}),s&&e(zt,{})]})}function er(){return ya(),null}export{er as PaymentMethodCustomizations,Zr as default};

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.