const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["d08a6c7d.CjLeBgn9.js","630ba094.L_X-5TXi.js","6ec9a0fa.rdcQt2v8.js","f025431a.BlsbPO0-.js","4509beb0.BguNH--m.js","app.BAntcNCf.js","assets/app.CGRs8DQS.css","assets/deferred-boot.Drpcgh6C.css","0be192b6.rG-iHLkS.js","7c5b2887.DTfFtfvF.js","c328865d.BCB1O5to.js","f1384cc2.BX1JbjgR.js","67e8c664.ByAbJtL3.js","a5379eb2.DKsqgitx.js","77821758.CIHBOvKY.js","assets/6e3faf45e1x0e0212c9.ct4xfivv.css","assets/WalletSandbox.BoV0vp4z.css","9c33421f.DpXDaAtO.js","c7b92b97.keF148le.js","82d59f8f.CMkmnfJF.js","651bb548.BkLScdUZ.js","7af18290.BPTAjyaA.js","2f5db8a5.Cc2kNiF_.js","b979b01d.CGUNauvt.js","8d323f09.DzC4yn4z.js","30df5a02.DqQMKMCs.js","247f933f.DBXZBPwL.js","54808617.CmoGDboX.js","60764974.CJv_gqiu.js","2692118b.BQ5RAfJh.js","5d5cabdf.3d9fziXo.js","assets/04e578408ax6d8a6990.eanpcn-r.css","assets/StandardButtonPlaceholder.BEEc8l-N.css","a8202753.DJdQDh63.js","8e2be3f2.Bh1x-mv_.js","bace9a08.CgQzfzYE.js","assets/WalletApplePayLazy.CINEbmZm.css","d56ce0bb.DpdxT_JD.js","b71b03d1.DywjAYcQ.js","assets/04c08e5c0e.CuRoM9zv.css","04449fbc.EBccUQrW.js","114cc9d1.C_JEseqR.js","assets/ApplePayButton.CTcryfIc.css","1b348813.BXNCDuUW.js","ee84a27a.DRsJmi0n.js","2b0d1656.RNKZGKow.js","assets/PayPalButton.BiiLYNKy.css"])))=>i.map(i=>d[i]); import{It as e,Jt as t,Pt as a,Wt as n,ct as o,ft as r,jt as l,nn as s,ot as i,pt as u,yt as c,zt as p}from"./630ba094.L_X-5TXi.js";import{f as _}from"./app.BAntcNCf.js";import{$d as d,AO as m,Kg as h,Mb as y,NO as b,Nk as v,Ov as P,QA as f,Rh as g,SC as A,UA as w,Uf as E,Wb as k,Xg as N,Yf as S,ZA as x,Zd as L,_f as C,dD as R,eb as T,ff as B,gb as O,hE as Y,hb as j,hm as F,if as M,lE as D,lf as W,mb as I,mm as V,qy as K,rf as U,tf as X,uf as $,xO as q}from"./6ec9a0fa.rdcQt2v8.js";import{t as Z}from"./77821758.CIHBOvKY.js";import{n as G}from"./82d59f8f.CMkmnfJF.js";import{t as z}from"./a8202753.DJdQDh63.js";var H="subscription-policy";function J(){const{inMemoryApplePayParts:e}=O(),{checkout:{negotiator:t,journey:n}}=q(),{paymentLines:o}=t.parts,r=W(),l=$();return a(()=>!y(e)&&"not_eligible"!==e.payWithApplePayButtonStatus.value.status&&!!D(o.value,"APPLE_PAY")&&!n.progressing.value&&(!r.value||l.value))}function Q(){const{embed:e,mobileCheckoutSdk:t}=q(),a=t.enabled&&t.variant.isPartner(),n=t.enabled&&t.variant.isStandard();return Boolean(e?.isEmbeddedCheckout()||a||n)}function ee(){const{checkout:{negotiator:e}}=q(),{paymentLines:t}=e.parts,n=g("PAYMENTS_PAYPAL_OVER_CAPTURE_DETECTED");return a(()=>{const e=t.value,a=D(e,"PAYPAL_EXPRESS"),o=Boolean(a&&!I(a));return n.value&&Boolean(a)&&!o})}function te(){const{checkout:{negotiator:e}}=q(),{paymentLines:t}=e.parts,n=T("PAYPAL_EXPRESS");return a(()=>"TOKENIZE"===n.value?.paymentIntent&&j({paymentLines:t.value,paymentMethods:e.current.fields.paymentMethods.value}))}function ae(){const{shop:e}=q(),t=U(),n=te(),o=e.hasFlagEnabled(R);return a(()=>{if(o&&n.value)return L(t)?"clear":"prompt"})}function ne(){const{inMemoryPayPalParts:{isApproving:e}}=O(),t=X({isPayWithPayPalButton:!0}),n=M(),o=function(){const{persistedPayPalSignal:e}=O(),t=U(),n=d(),o=ee(),r=ae(),l=g("PAYMENTS_PAYPAL_TOKEN_EXPIRED"),s=g("PAYMENTS_PAYPAL_CURRENCY_CHANGED");return a(()=>{const a=e.value?.newTokenRequiredDueToError;return Boolean(t.value)&&!n.value&&(a||l.value||s.value||o.value||"prompt"===r.value)})}();return a(()=>"error"!==t.value.status&&!e.value&&(n.value||o.value))}function oe(){const{checkout:{identity:e,wallets:t}}=q(),n=J(),o=ne(),{nextPage:l}=V(),s=r(l.id);return a(()=>"shopPay"!==e.current.value&&!t.escalatedWallet.value&&"review"===s.value&&(o.value||n.value))}function re(){const{checkout:{identity:e}}=q(),t=F(),n=oe();return a(()=>Y(e.current.value)&&t.value&&!n.value)}function le(){const{nextPage:e}=V(),t=r(e.id),n=re(),o=function(){const{checkout:e}=q(),{isOnePage:t}=e.configuration.layout,n=r(Q()),o=J(),l=oe();return a(()=>t.value&&(n.value||o.value&&!l.value))}();return a(()=>"review"!==t.value||n.value||o.value)}function se(){const{checkout:{identity:e}}=q(),t=F(),{nextPage:n}=V(),o=r(n.id),l=oe();return a(()=>Y(e.current.value)&&!l.value||t.value&&"thankYou"===o.value)}var ie=x("PurchaseOptionsAgreementModal");function ue({isForExpressCheckout:e=!1,showFullSubscriptionConsent:t,placement:n,wrapInSection:o=!1}){const{checkout:l}=q(),i=r(n),p=a(()=>k({checkout:l})),_=le(),d=a(()=>"above-pay-button"===i.value?p.value&&_.value:!("default"===i.value&&p.value)),m=a(()=>"above-pay-button"===i.value&&d.value);return c(s,{children:[!e&&c(ce,{shown:m}),c(u,{when:d,children:()=>{if(e)return c(u,{when:()=>t?.value??!1,fallback:c(he,{}),children:c(ye,{})});const a=c(N,{id:"purchase_options_agreement",padding:"none",children:c(u,{when:p,fallback:c(me,{}),children:c(de,{})})});return o?c(E,{children:a}):a}})]})}function ce({shown:n}){return function(n){const o=function(){const{i18n:e,checkout:{negotiator:t}}=q(),{useStoreCreditForSubscriptionRenewals:n}=t.parts,o=pe();return a(()=>{const t={button_label:o.value,consent_text:e.translate("payment.purchase_options_subscription_consent_text"),cancellation_instructions:e.translate("payment.purchase_options_subscription_cancellation_instructions",{cancel_text:e.translate("payment.purchase_options_subscription_cancel_text"),cancellation_policy_label:e.translate("payment.purchase_options_cancellation_policy_label")})},a=e.translate("payment.purchase_options_subscription_agreement_label",t);return n.value?`${a} ${e.translate("payment.purchase_options_subscription_store_credit_agreement_label")}`:a})}(),r=t(n.peek());e(()=>{const e=n.value;if(e!==r.current&&(r.current=e,e))return w({content:p(()=>o.value),role:"status"})})}(n),null}function pe(){const{i18n:e}=q(),t=M(),n=U(),o=function(){const{i18n:e}=q(),{nextPage:t}=V(),n=r(t.label),o=re();return a(()=>o.value?e.translate("general.pay_now_button_label"):n.value)}();return a(()=>{if(!t.value)return o.value;const a=L(n)?e.translate("brand.venmo"):e.translate("brand.paypal");return e.translate("wallets.call_to_action",{walletName:a})})}function _e({buttonLabel:e,cancellationPolicyLink:t}){const{i18n:a,checkout:{negotiator:n}}=q(),{useStoreCreditForSubscriptionRenewals:o}=n.parts,r=function({i18n:e,cancellationPolicyLink:t}){return{consent_text:c("strong",{children:e.translate("payment.purchase_options_subscription_consent_text")}),cancellation_instructions:c(s,{children:e.translate("payment.purchase_options_subscription_cancellation_instructions",{cancel_text:c("strong",{children:e.translate("payment.purchase_options_subscription_cancel_text")}),cancellation_policy_label:t??c(be,{tone:"monochrome"})})})}}({i18n:a,cancellationPolicyLink:t}),l=void 0===e?a.translate("payment.purchase_options_subscription_agreement_label_wallets",r):a.translate("payment.purchase_options_subscription_agreement_label",{button_label:e,...r});return c(s,{children:[c(C,{children:l}),c(u,{when:o,children:[" ",a.translate("payment.purchase_options_subscription_store_credit_agreement_label")]})]})}function de(){const e=pe();return c(N,{padding:"none","aria-live":"polite","aria-atomic":"true",children:c(S,{type:"small",children:c(_e,{buttonLabel:e.value})})})}function me(){const{i18n:e}=q();return c(m,{color:"subdued",children:e.translate("payment.purchase_options_agreement_label",{cancellation_policy_label:c(be,{})})})}function he(){const{i18n:e}=q();return c(N,{id:"purchase_options_agreement",padding:"small-100 none none none",children:c(m,{color:"subdued",type:"small",children:e.translate("payment.purchase_options_agreement_label_wallets",{cancellation_policy_label:c(be,{})})})})}function ye(){return c(N,{id:"purchase_options_agreement",padding:"large-100 none none none",children:c(S,{type:"small",children:c(_e,{})})})}function be({tone:e}){const{embed:t,i18n:a,shop:{merchantPolicies:n}}=q(),o=c(m,{children:a.translate("payment.purchase_options_cancellation_policy_label")}),r=f(void 0,ie),{localPolicies:l}=P(),i=n.some(e=>"subscription-policy"===e.handle)?l.find(e=>e.handle===H):void 0;return i?i.url&&A(t?.embedder)?c(h,{tone:e,"aria-haspopup":"dialog",onClick:()=>{t?.client?.windowOpenRequest(i.url)},children:o}):c(s,{children:[c(h,{tone:e,commandFor:r,children:o}),c(B,{id:r,defaultPolicy:{...i,name:a.translate("shop_policies.purchase_options_cancellation_policy")}})]}):o}ue.displayName="PurchaseOptionsAgreement",_e.displayName="SubscriptionAgreementContent",de.displayName="SubscriptionAgreement",me.displayName="DefaultAgreement",he.displayName="ExpressCheckoutAgreement",ye.displayName="ExpressCheckoutSubscriptionAgreement",be.displayName="CancellationPolicyLink";var ve={ApplePayButton:"vT2w7",dark:"f1x20",light:"hKWGx"};function Pe(e,a=K()){const o=t(null),r=t(new Set),{observability:l}=q(),s=b(e);n(()=>{if(!e)return;const t=new Set(e.map(({walletName:e})=>e));r.current.forEach(e=>{t.has(e)||r.current.delete(e)});const n=e.some(({walletName:e})=>!r.current.has(e));!o.current&&n&&(o.current=setTimeout(()=>{o.current=null;const e=s.current;e&&e.filter(e=>e.isLoading()&&!r.current.has(e.walletName)).forEach(e=>{r.current.add(e.walletName),l.counter({name:"wallet_button_render_timeout",value:1,attributes:{wallet:e.walletName}}),e.onTimeout()})},a))},[l,e,s,a]),n(()=>()=>{o.current&&(clearTimeout(o.current),o.current=null)},[])}var fe=i({displayName:"ApplePaySandboxButton",useError:(e,{isPayWithApplePayFlow:t})=>ke(e,{isPayWithApplePayFlow:t}),load:()=>o(()=>_(()=>import("./d08a6c7d.CjLeBgn9.js").then(e=>e.ApplePaySandboxButton),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36])))}),ge=i({displayName:"ApplePayButton",suspense:!1,renderLoading:e=>c(Ee,{...e}),useError:e=>ke(e),load:()=>o(()=>_(async()=>{const{ApplePayButton:e}=await(import("./d56ce0bb.DpdxT_JD.js"));return{ApplePayButton:e}},__vite__mapDeps([37,1,2,3,4,5,6,7,14,15,21,19,20,38,39,40,41,42])).then(({ApplePayButton:e})=>e))});function Ae(e){return c(fe,{...e})}function we(e){return c(ge,{...e})}function Ee({color:e}){const{i18n:t}=q();return c("button",{className:l(ve.ApplePayButton,ve[e],Z.borderRadius,v({focusRing:"base"})),lang:t.locale,disabled:!0,type:"button","aria-label":t.translate("brand.apple_pay")})}function ke(e,{isPayWithApplePayFlow:t=!1}={}){const{observability:a}=q(),o=z({isPayWithApplePayFlow:t});n(()=>{e&&(o.value={status:"error"},a.leaveErrorBreadcrumb("Apple Pay button chunk failed to load",{wallet:G.ApplePay,errorName:e.name,errorMessage:e.message}),a.counter({name:"checkout_wallet_button_rendered",value:1,attributes:{wallet_name:G.ApplePay,status:"error",reason:"chunk_load_error",isPaymentMethodFlow:t}}))},[o,e,a,t])}var Ne=i({displayName:"PayPalButtonComponent",load:()=>o(()=>_(()=>import("./1b348813.BXNCDuUW.js"),__vite__mapDeps([43,1,4,2,3,5,6,7,8,9,10,11,12,44,13,14,15,16,17,19,20,22,27,28,29,30,31,32,45,46])))});function Se(e){return c(Ne,{...e})}export{J as _,ve as a,le as c,se as d,ne as f,Q as g,ee as h,Pe as i,re as l,te as m,we as n,ue as o,ae as p,Ae as r,_e as s,Se as t,oe as u,H as v};