1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["component-RememberMe.DVPC52tB.js","esnext-vendor.DDpcaSqU.js","Checkbox.CdJzVizb.js","hydrate.BcfGVx0L.js","utilities-previous.Cnwy8G2v.js","app.DdDscdWN.js","assets/app.BuSMBobh.css","assets/previous.DjvIwnbB.css","graphql-PaymentSessionMutation.C-nDEOnn.js","shared-permissions.B59tuyWB.js","hooks-useShopPayExternalAppContext.R6pnDxYu.js","assets/helpers.BduNPqpW.css","assets/Checkbox.SrYMuQu4.css","utilities-stable-ref.dCtJn23l.js","EmailField.DprXO6cp.js","PhoneField.rAEISard.js","FormLayout.UkTBTXMZ.js","amazon-pay-useAmazonPayPaymentLine.X7jqQiq6.js","assets/FormLayout.CFj15lwv.css","hooks-useSuppressShopPayModalOnLoad.Cvo-K0z2.js","assets/PhoneField.uZEuHncj.css","ChangeCompanyLocationLink.DXURX0D_.js","BillingAddressForm.B1Xpg2b3.js","Popover.ZkMcWGfE.js","assets/Popover.Bi1nHaU-.css","Choice.D9vYH2mX.js","assets/Choice.DV6JSDrR.css","assets/BillingAddressForm.BdwN7V1K.css","components-PaymentMethodProgressionHost.6RPZ-76L.js","redemption-promotions.8MPSgIef.js","Section.J2ZFesxe.js","assets/Section.CU18S7Ap.css","shop-pay-installments-monorail.B1-OWrOB.js","useAddressMutationsWithNegotiation.BIr_RXis.js","PaymentIcon.-ypvsmSq.js","assets/PaymentIcon.gzvCNwz_.css","PaymentLine.HSjRrKhm.js","localization-index.C3Jg94aR.js","Theme-ThemeOverride.CSLUDabY.js","assets/PaymentLine.D3bcP-mr.css","crypto-constants.Ca3tBkwm.js","assets/constants.Dlnp55te.css","hooks-useUpdateCheckoutAddress.C4NXzSJo.js","helpers-derivations.K4r9DEFp.js","payment-usePaymentExemptionReason.emSKnIpm.js","shop-pay-normalizeBuyerDetails.CDJVtFmS.js","helpers-isSwitchAccountBootRequest.C3tmXnb7.js","hooks-useShopPayProgressIntercepts.DJVsS6aH.js","cvv-cvvBridge.CLYVr7ZJ.js","assets/useShopPayProgressIntercepts.CIy8uDiZ.css","helpers-installmentsNotSupportedForAddress.BnHLRwvm.js","assets/useAddressMutationsWithNegotiation.BcTJoNaV.css","hooks-useGeneralPaymentErrorMessage.DLzmknw2.js","assets/PaymentMethodProgressionHost.Cu93j1K1.css","stopwatch.B56VZk5r.js","CalloutHeader.DC7jgv42.js","assets/CalloutHeader.BxwwfmsJ.css","assets/RememberMe.Df3s08WT.css"])))=>i.map(i=>d[i]); 2import{f as D,A as M,q as k,h as N,u as t,k as w,i as J,e as z,T as j,g as Z,_ as Q,S as V,d as ee,r as te}from"./esnext-vendor.DDpcaSqU.js";import{u as ne,e as G,B as A,c_ as ae,c$ as oe,bl as se,d0 as T,d1 as re,bV as ie,d2 as le,k as _,n as ce,P as de,cp as K,a0 as ue,b as pe,l as S,c7 as C,aj as v,L as me,i as he,G as x}from"./hydrate.BcfGVx0L.js";import{T as m,a5 as q,F as ye,v as _e,a$ as be,W as E,b2 as ge,w as fe,cz as ve,bu as Pe,cO as Ie,bJ as Se,bX as Ce,cP as Ee,b4 as Re,bp as Oe,br as Me,co as Te,bo as ke,c3 as Ae,at as Le,cQ as He,an as xe}from"./utilities-previous.Cnwy8G2v.js";import{u as Ne}from"./ChangeCompanyLocationLink.DXURX0D_.js";import{u as we,a as Be,b as Fe,g as De,c as ze,d as Ve}from"./components-PaymentMethodProgressionHost.6RPZ-76L.js";import{a as Ge}from"./payment-usePaymentExemptionReason.emSKnIpm.js";import{u as Ke}from"./stopwatch.B56VZk5r.js";import{_ as qe}from"./app.DdDscdWN.js";import{C as B}from"./Checkbox.CdJzVizb.js";import{b as Ue,c as We}from"./utilities-stable-ref.dCtJn23l.js";const F="shop_pay_approval_id",$e=250,Ye=14;function Xe(e,a){if(!ae(e))return"malformed_uuid";if(e[Ye]!=="7")return"uuid_v7_required";if(!a)return"payment_not_required"}function Mt(){const{shop:e}=m(),{paymentMethods:a}=q();return D(()=>e.hasFlagEnabled(ye)&&_e(a.value))}function Tt(){const{observability:e,shop:a}=m(),{checkoutProtocolModalEventSignal:n}=be(),o=E(),s=ne(),{negotiate:r}=G(),i=M(null),l=M(""),d=M(""),c=a.hasFlagEnabled(ge),g=k(()=>{const u=i.current?.value.trim()??"";if(!u||u===l.current)return;const p=Xe(u,s.value);if(p){d.current!==u&&(d.current=u,e.counter({name:"shop_pay_approval_id_field_discarded",value:1,attributes:{reason:p}}),e.histogram({name:"shop_pay_approval_id_field_discarded_length",value:u.length,attributes:{reason:p}}),e.log("shop_pay_approval_id_field_discarded","Shop Pay approval id discarded before negotiation",{reason:p,valueLength:u.length}));return}l.current=u,e.counter({name:"shop_pay_approval_id_field_applied",value:1,attributes:{verificationOpen:n.peek()==="shopPayVerification"}});const f={method:{type:"shopWallet",shopPayApprovalId:u}};o.paymentLines.value=fe(o.paymentLines.value,f),o.generalPaymentError.value=void 0,o.generalPaymentErrorCode.value=void 0,r({})},[n,r,e,o,s]);return N(()=>{const u=setInterval(g,$e);return()=>clearInterval(u)},[g]),t(A,{accessibilityVisibility:"exclusive",children:t("input",{ref:i,type:"text",tabIndex:-1,"aria-hidden":!0,id:F,name:F,autoComplete:"off",onInput:c?g:void 0})})}function kt({localizationExtension:e,index:a}){const n=ve(),{negotiate:o}
2=G(),[s,r]=w(),[i,l]=w(),d=Pe(e.fields.value,n),c=e.fields.title.value,{localizedFieldErrors:g}=oe().value,u=`$.cart.localizedField.${e.peek().key}`,p=`$.localizationExtension[${a}]`,f=g.find(({target:h})=>h===u),R=h=>{const I=h.violations?.find(H=>{const{code:b,localizedMessage:W,nonLocalizedMessage:$,target:Y}=H,X=W??$;if(b==="LOCALIZATION_EXTENSION_FIELD_ERROR"&&Y===p)return X});if(!I)return;const{localizedMessage:y,nonLocalizedMessage:O}=I;return y??O};N(()=>{if(f){n.value=f.message;return}if(i){n.value=i;return}n.value=void 0},[n,f,i,s]);const L=()=>{d.onBlur(),r(void 0),l(void 0),o({fieldsToResolve:["localizationExtensions"],include:[],onComplete:h=>{l(R(h)),r("blur")}})};return se(h=>{l(R(h)),r("submit")}),t(T,{...d,label:c,name:c,onBlur:L,value:d.value??void 0})}function Je(){const{checkout:e,i18n:a,shop:n}=m(),{paymentMethods:o}=q(),s=re(),r=Ne(),i=D(()=>n.hasFlagEnabled(Ie)&&je({identity:e.identity})&&r.value&&s.value&&Se(o.value));return t(J,{when:i,children:t(A,{paddingBlockStart:"small-200",children:t(ie,{tone:"info",children:a.translate("payment.shop_pay_hsa.login_message")})})})}function je({identity:e}){return e.current.value==="guest"}function Ze(){const e=z(!1),a=M(null);return{ref:k(o=>{if(a.current?.disconnect(),a.current=null,!o)return;const s=()=>{const i=o.ownerDocument.createRange();i.selectNodeContents(o);const l=i.getClientRects;e.value=typeof l=="function"&&Array.from(l.call(i)).filter(({width:d})=>d>0).length>1};if(s(),typeof ResizeObserver>"u")return;const r=new ResizeObserver(s);r.observe(o),a.current=r},[e]),isMultiline:e}}function Qe(e,a,n,o){const s={title:a.translate("payment.title")};if(!n)return s;const[r]=e;return r?.type!=="direct"?s:{title:o?a.translate("payment.pay_with_debit_card"):a.translate("payment.pay_with_credit_card"),creditCardInline:{paymentBrands:r.paymentBrands,cardNetworkStateKey:Ce(r)}}}function et(e,a){return e.current.value==="shopPay"&&a}function tt(){const{i18n:e,checkout:a}=m(),{identity:n}=a,{displayedPaymentMethods:o}=we({experienceType:"list"}),s=Be(o),r=et(n,a.installments.paymentMethodMustSupportDebitCardOnly.value),i=Fe(),l=Ge(),c=!(De(n,l.value)!==null||i.value.freeOrder||i.value.giftCard||i.value.storeCredit||i.value.redeemables)&&s.mode==="singlePaymentMethodCreditCard";return j(()=>Qe(o,e,c,r),[o,e,c,r])}const nt="zA7WO",at="bIqDC",ot="jGvwB",st="haX3x",rt="_1OE8N",P={HeadingRow:nt,HeadingTitle:at,HeadingTitleText:ot,HeadingIcons:st,"HeadingIcons-networkSelector":"_5Jkpa","HeadingIcons-multiline":"iq64C",HeadingIconsContent:rt};function At({headingId:e,autoFocus:a}){const{i18n:n}=m(),s=le().value?`${n.translate("payment.billing_must_match_shipping_notice")} `:"",r=n.translate("payment.card_security_notice"),{title:i,creditCardInline:l}=tt(),{ref:d,isMultiline:c}=Ze();return t(_,{gap:l?"small-300":"small-400",children:[t(_,{direction:"inline",gap:"small-200",alignItems:"end",className:P.HeadingRow,children:[t("div",{className:P.HeadingTitle,children:t(ce,{id:e,level:1,autoFocus:a,children:t("span",{ref:d,className:P.HeadingTitleText,children:i})})}),l&&t(it,{cardNetworkStateKey:l.cardNetworkStateKey,availableBrands:l.paymentBrands,headingIsMultiline:c.value})]}),t(de,{color:"subdued",children:s+r}),t(Je,{})]})}function it({cardNetworkStateKey:e,availableBrands:a,headingIsMultiline:n=!1}){const{checkout:{cardNetworkSelection:o}}=m(),s=o.forMethod(e),r=a.filter(Ee),i=s.networkSelectionEnabled.value&&s.selectableBrands.value.length>1,{ref:l,overflowIndicatorRef:d,maxVisibleBrands:c}=ze(r.length);return r.length===0?null:t("div",{ref:l,className:Z(P.HeadingIcons,i&&P["HeadingIcons-networkSelector"],n&&P["HeadingIcons-multiline"]),children:t(_,{direction:"inline",gap:"none",alignItems:"center",justifyContent:"end",className:P.HeadingIconsContent,children:t(Ve,{animate:!0,availableBrands:a,selectableBrands:s.selectableBrands.value,activeBrand:s.activeBrand.value,savedCardBrand:s.selectedSavedCreditCardBrand.value,onSelectBrand:s.setSelectedNetwork,networkSelectionEnabled:s.networkSelectionEnabled.value,binLength:s.bankIdNumberLength.value,viewTransitionKey:e,maxVisibleBrands:c.value,overflowIndicatorRef:d,announceNetworkSelector:!0,announceOverflowBrands:!0})})})}const lt=["AT","BE","BG","HR","CY","CZ","DK","EE","FI","FR","GF","DE","GR","HU","IE","IT","LV","LT","LU","MT","NL","PL","PT","RO","SK","SI","ES","SE","IS","LI","NO"],ct=[...lt,"CH","GB"],U=e=>ct.includes(e);function dt(){const e=Oe.ShopPayRememberMeOptOut,a=k(o=>
2{o?Me(e,o):Te(e)},[e]),n=k(()=>ke(e),[e]);return{storeOptOutPreference:a,getOptOutPreference:n}}function ut(){const{geolocation:e}=K(),{router:a,shop:n}=m(),o=a.currentUrl.value,s=Re(o.searchParams),r=E().shopPayArtifact.value,{getOptOutPreference:i}=dt(),l=z(!0);if(Q(()=>{l.value=!!i()},[i,l]),!(n.shopPayRememberMeAutoOptinEnabled??!0))return{autoOptIn:!1,isOptedIn:!1};const c=!U(e.country.code)&&!s&&!l.value;return{autoOptIn:c,isOptedIn:c&&r?.optIn!==!1}}function pt({busy:e,children:a,title:n,compact:o}){return o?t(ue,{accessibilityLabel:n,children:t(_,{gap:"base",children:t("div",{"aria-busy":e||void 0,children:a})})}):t(V,{children:[t("div",{"aria-busy":e||void 0,"aria-label":n,role:"group",children:a}),t(pe,{blockSize:"large-300"})]})}function mt(){const{geolocation:e}=K();return U(e.country.code)}function ht({buyerPhone:e,isApplePayWalletSelected:a,requiresExplicitConsent:n,validatedProposedPhone:o}){return e?"standard":n?a?"gdprCheckboxOnly":o?"gdprCheckboxWithPhone":"standaloneGdprPhone":"noInputRow"}function yt(e){const a=E(),{shop:n}=m(),s=!n.hasFlagEnabled(Ae)&&!!Le(a.paymentLines.value,"APPLE_PAY"),r=mt(),i=Ue(),l=We(e??i.value).value;return{kind:ht({buyerPhone:a.phone.value,isApplePayWalletSelected:s,requiresExplicitConsent:r,validatedProposedPhone:l}),isApplePayWalletSelected:s,requiresExplicitConsent:r,validatedProposedPhone:l}}function _t({title:e,compact:a}){const{i18n:n,shop:{name:o}}=m(),s=E(),{shopPayArtifact:r}=s,{isOptedIn:i}=ut(),l=!!r.value?.optIn||i,d=He().value??!1,{kind:c}=yt(),g=n.translate("shop_pay_remember_me.terms"),u=n.translate("shop_pay_remember_me.privacy_policy"),p={terms_href:g,privacy_href:u},f=d?n.translate("shop_pay_remember_me.consent_by_completing_order",p):n.translate("shop_pay_remember_me.consent_by_paying",p),R=n.translate("shop_pay_remember_me.value_prop_shop_name_verbose",{shop_name:o}),L=n.translate("shop_pay_remember_me.consent_with_phone",p),h=n.translate("shop_pay_remember_me.consent_with_email",p),I=n.translate("shop_pay_remember_me.consent_with_checkbox_only",p),y=n.translate("shop_pay_remember_me.label"),O=n.translate("shop_pay_remember_me.mobile_phone_optional"),H=n.translate("shop_pay_remember_me.email_label_optional");let b;return c==="standaloneGdprPhone"?b=t(_,{gap:"base",children:[t(S,{children:y}),t(v,{contentDisplay:"block",inlineSize:"100%",children:t(T,{label:O})}),t(C,{content:L,size:"small"})]}):c==="gdprCheckboxWithPhone"?b=t(_,{gap:"base",children:[t(x,{gridTemplateColumns:"auto minmax(0, 1fr)",gap:"base",alignItems:"start",children:[t(v,{children:t(B,{accessibilityLabel:y})}),t(S,{children:y})]}),t(v,{contentDisplay:"block",inlineSize:"100%",children:t(T,{label:O})}),t(C,{content:I})]}):c==="gdprCheckboxOnly"?b=t(x,{gridTemplateColumns:"auto minmax(0, 1fr)",gap:"base",alignItems:"start",children:[t(v,{children:t(B,{accessibilityLabel:y})}),t(_,{children:[t(S,{children:y}),t(C,{content:I,size:"small"})]})]}):c==="standard"?b=t(_,{gap:"base",children:[t(S,{children:y}),t(v,{contentDisplay:"block",inlineSize:"100%",children:t(T,{label:H})}),t(C,{content:h,size:"small"})]}):b=t(x,{gridTemplateColumns:"minmax(0, 1fr) auto",gap:"base",alignItems:"center",children:[t(_,{children:[t(S,{children:y}),t(C,{content:l?f:R,size:"small"})]}),l?t(A,{paddingInlineStart:"small-500",children:t(v,{contentDisplay:"block",children:t(me,{textDecoration:"none",children:n.translate("shop_pay_remember_me.not_now")})})}):t(v,{contentDisplay:"block",children:t(he,{variant:"secondary",children:n.translate("shop_pay_remember_me.save")})})]}),t(pt,{busy:!0,title:e,compact:a,children:b})}const bt=ee({displayName:"RememberMe",renderLoading:e=>t(_t,{...e}),renderError:()=>null,load:()=>te(()=>qe(()=>import("./component-RememberMe.DVPC52tB.js"),__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,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57]))).then(({RememberMeSurface:e})=>e)});function Lt({compact:e}){const{i18n:a}=m(),n=xe(),o=Ke(),s=E(),r=a.translate("shop_pay_remember_me.title"),i=s.shopPayRememberMeVisible.value?r:"";return N(()=>{o||(s.shopPayRememberMeVisible.value=!1)},[o,s.shopPayRememberMeVisible]),!n.value||!o?null:t(V,{children:[t(A,{accessibilityRole:"status",accessibilityVisibility:"exclusive",children:i}),t(bt,{title:r,compact:e})]})}
2export{kt as L,At as P,Lt as R,Tt as S,ut as a,dt as b,yt as c,pt as d,Mt as u};
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.