PageSourceSearch

https://www.watchobsession.co.uk/cdn/shopifycloud/checkout-web/assets/c1/page-ThankYou.KglIcZ1C.js

js watchobsession.co.uk collected 2026-09-29 13:09:28 UTC 149,748 bytes, 2 lines download raw bytes

1import{k as oe,u as e,S as x,A as G,h as U,e as ee,T as he,y as Pn,q as K,f as C,g as F,_ as wn,ai as ar,E as Ke,j as Wn,l as fe,i as E,p as ln,D as rr,av as or,X as Bt,x as Ft,W as Gn,aB as ir,L as sr,Y as lr,Z as cr,n as Kn,o as ur}from"./esnext-vendor.7EcvH7tF.js";import{eD as Q,j as _e,k as y,I as ie,l as k,cq as dr,V as pr,y as H,a8 as Ut,cP as hr,P as w,m as R,$ as z,cv as An,gP as mr,n as mn,o as Ht,ad as _r,a5 as Me,L as Ce,B as A,a6 as Rn,cX as yr,db as zt,cy as Ye,ag as De,cm as Qe,W as Ln,aB as gr,el as Yt,hQ as fr,hR as qt,hS as br,c2 as vr,a0 as Ze,b as kr,bS as Sr,p as ke,U as on,hT as Oe,fW as $t,hU as Se,aj as _n,C as xn,hV as en,hW as nn,hX as tn,hY as Cr,gK as Tr,hZ as Ir,h_ as Pr,h$ as wr,i0 as Er,i1 as Mr,J as Dn,aX as Vt,bx as Ar,b1 as Rr,H as Lr,ey as Wt,i2 as xr,u as Gt,_ as En,i as Kt,a as Dr,br as Or,S as Nr,i3 as yn,cr as jt,i4 as Br,i5 as Fr,dH as Ur,N as Hr,O as zr,az as Yr,aA as qr,i6 as $r,eA as Vr,ck as Wr,bo as Gr,i7 as Kr,i8 as jr,M as Qr}from"./hydrate.CvWSYK3c.js";import{H as je,Q as v,a2 as D,af as ce,j9 as Zr,ja as On,bI as Qt,ej as Nn,aL as Xr,aH as Xe,c6 as gn,jb as Jr,cp as Zt,at as Xt,ax as Mn,S as eo,aV as Jt,bF as ea,dn as na,jc as no,c8 as ta,jd as to,V as jn,aR as ao,je as aa,cD as ro,aG as ra,dh as oo,jf as io,cN as so,ci as lo,b5 as co,dO as uo,b3 as po,jg as ho,bg as Bn,jh as mo,b0 as _o,ev as yo,ep as oa,n as Fn,ji as go,cz as fo,ee as ia,jj as cn,bL as bo,B as vo,jk as ko,ak as So,jl as Co,jm as To,eM as Io,fY as Po,jn as wo,b7 as Qn,as as Eo,i1 as Mo,iY as Ao,ab as Ro}from"./utilities-previous.BNOUhCqt.js";import{d as Ae,c as Lo,S as fn}from"./hooks-useShowShopPayOptin.COfgoH5j.js";import{E as sa}from"./EmailField.CNbfuMCB.js";import{u as xo,S as Zn,f as Do,d as Oo,c as No,P as Bo,a as Fo,b as Uo}from"./Page.iFMNx-gv.js";import{S as Le}from"./hooks-usePickupPoints.Dc_AUzii.js";import{b as la,i as Ho,s as ca,c as zo,a as Yo}from"./shipping-methods-consolidated-included.DDT-wwsl.js";import{d as ua,b as qo}from"./MerchandiseModal.B9gHbOGQ.js";import{P as V}from"./PaymentIcon.BEzHtnxO.js";import{P as $o}from"./Pressable.BKdVKAba.js";import{u as Vo,A as Je}from"./AddressPresenter.mAxMJOkn.js";import{C as da}from"./Checkbox.BcOmMA-W.js";import{P as Wo}from"./PhoneField.z-nvF4Oi.js";import{v as Go,a as Ko,S as un,d as jo}from"./useShopPayButtonClassName.D12YSXlR.js";import{l as $e,m as Qo,r as pa,S as ha,M as ma,R as _a,n as Zo,c as Xo,o as Jo,h as ei,a as Ge,p as ni,I as ti,f as ai,g as Z,j as ri,k as oi,q as ii,P as si,s as li,C as ci,t as ui}from"./useAuthorizeUrl-index.BG7cVetk.js";import{g as di,T as pi}from"./Theme-ThemeOverride.aZ96ki1T.js";import{P as hi,M as mi,m as ya}from"./Map.BB9Ywvy_.js";import{C as _i}from"./OffsitePaymentFailed.DEEFinWK.js";import{P as yi}from"./Popover.snh8_-Id.js";import{I as gi}from"./hooks-useStableHostMethodsReferences.D9BLwpf-.js";import{I as ga}from"./ImpressionEventCapture.DHoHQcSz.js";import{S as bn,P as fi}from"./addresses-is-address-empty.ChTbY4tb.js";import{S as bi}from"./ShipmentLine.C6bsnPV-.js";import{a as vi,i as ki}from"./EstimatedDeliveryContent.Dh3d0XR_.js";import{D as Si,B as Ci}from"./BuyWithPrimeOrderTrackingButton.1fQRbD9t.js";import{S as Ti,a as Ii}from"./ShipmentBreakdown.D5mGyOOV.js";import{a as Un,u as Pi}from"./hooks-useShouldRevealCustomization.xDutk-8T.js";import"./app.9pOKhaB_.js";import{f as wi}from"./shared-permissions.FyWsJaGm.js";import{T as Ei}from"./TransitionHeight.BQH3tbCb.js";import{v as Mi}from"./dist-v4.EwEgHOG0.js";import"./shared-negotiation-input-redeemable.nWvx5Mgl.js";import"./hooks-useShopPayExternalAppContext.DJNBHtP3.js";import"./components-RedirectionNotice.module.wDj6pdp6.js";import"./amazon-pay-useAmazonPayPaymentLine.Dzl9q1le.js";import"./hooks-useSuppressShopPayModalOnLoad.C3rujIgw.js";import"./ShippingMethodRateLabel.CL24HyOG.js";import"./shipping-methods-grouping.C7ILStbm.js";import"./amazon-constants.Bzm_Igik.js";const Ai={id:"0c62c3aaedf84bd307e1134828e5fcc88a47d83c453c97544a6cc8711e6444af",type:"mutation",name:"SubscribeForShippingUpdates",source:""};class Xn extends Error{constructor(){super(...arguments),this.name="SubscribeForShippingUpdateError"}}function Ri(){const{client:n,observability:t,graphql:{coreGraphql:a}}=v(),r=n.unstable_getSerialization("sessionToken"),[o,i]=oe(),[s,l]=oe("idle"),u=Q()?.orderIdentity?.id;async function d(m){if(l("loading"),i(void 0),!r||!u){l("failed"),i("SUBSCRIPTION_FAILED"),t.error(new Xn("Missing sessionToken or orderId"));return}const{data:p}=await a.mutate(Ai,{variables:{sessionToken:r,orderId:u,email:m}});if(p){const{__typename:h}=p?.subscribeForShippingUpdates;switch(h){case"SubscribeForShippingUpdatesSuccess":l("subscribed");return;case"SubscribeForShippingUpdatesFailure":l("failed"),i(p?.subscribeForShippingUpdates.code);return;
1default:l("idle"),t.error(new Xn("Undefined subscribeForShippingUpdates type"))}}}return{submitSubscribeForShippingUpdate:d,status:s,error:o}}function Hn(){const{checkout:n}=v(),t=Ae(),r=Q()?.isRedacted??!1,o=!!t?.shopAppEligible,i=!!t?.shopAppQrCodeKillswitch;return!r&&o&&!i&&!n.configuration.isUniversalCheckoutFinalizer}function fa(){const n=Q();if(n?.orderIdentity?.id)return Number(je(n.orderIdentity.id))}var sn=(n=>(n[n.DisplayButton=0]="DisplayButton",n[n.DisplayForm=1]="DisplayForm",n))(sn||{});function Li({children:n,open:t,label:a,onClick:r,icon:o}){return t?e(x,{children:n}):e(y,{direction:"inline",gap:"base",children:e(_e,{onClick:r,"aria-expanded":!1,children:e(y,{direction:"inline",gap:"small-200",alignItems:"center",children:[e(ie,{type:o}),e(k,{children:a})]})})})}const xi=({label:n,onInputValueChange:t,error:a,value:r})=>{const o=G();return U(()=>{o.current?.focus()},[a]),e(sa,{id:"email",name:"email",label:n,ref:o,onInput:t,required:!0,error:a,value:r})},Di=({onHandleSubmit:n,isFormSubmitting:t,subscriptionErrorMessage:a})=>{const r=ee(""),{i18n:o}=v(),i=r.value,s=he(()=>Pn(void 0),[a]),l=s.value,[c,u]=oe(!1),d=o.translate("thank_you.order_updates_submit_subscription"),m=he(()=>({state:{email:r},errors:{email:s}}),[r,s]),p=()=>{if(u(!1),!/@/.test(i)){s.value=o.translate("field_errors.email_invalid");return}s.value=void 0,n(i)},h=_=>{s.value=void 0,u(!0),r.value=_};return U(()=>{c||(l||a)&&(s.value=l||a)},[c,l,a,s]),e(hr,{target:"order.deliveryUpdates",children:e(dr,{...m,children:e(pr,{onSubmit:p,implicitSubmit:d,children:e(y,{gap:"small-300",children:[e(H,{gap:"small-400 small-200",gridTemplateColumns:"minmax(0, 50%) minmax(auto, max-content)",gridAutoColumns:"1fr",gridTemplateRows:"minmax(auto, max-content)",gridAutoRows:"minmax(auto, max-content)",children:[e(xi,{label:o.translate("contact.email_label"),value:i,error:!!l,onInputValueChange:h}),e(_e,{variant:"primary",type:"submit",loading:t,children:d})]}),l?e(Ut,{controlID:"email",children:l}):null]})})})})},Oi=()=>{const{i18n:n}=v(),{value:t}=D().contactInfo,{submitSubscribeForShippingUpdate:a,status:r,error:o}=Ri(),[i,s]=oe(sn.DisplayButton),[l,c]=oe(!0),u=_=>{_&&a(_)},m=K(_=>{switch(_){case"SUBSCRIPTION_FAILED":return n.translate("thank_you.order_updates_subscribe_to_email_notifications_failed");case"EMAIL_ALREADY_EXISTS":return n.translate("thank_you.order_updates_subscribe_to_email_notifications_email_already_exists");case"INVALID_REQUEST_INPUT":case"INVALID_EMAIL":return n.translate("field_errors.email_invalid")}},[n])(o);U(()=>{c(r!=="subscribed")},[r,o]);const p=()=>{t?.email?u(t.email):s(sn.DisplayForm)},h={subTitle:n.translate("thank_you.order_status_updates_with_email"),fieldLabel:n.translate("thank_you.order_updates_subscribe_to_email_notifications")};return e(x,{children:[e(w,{children:h.subTitle}),l&&e(y,{gap:"base",padding:"base none none none",children:e(Li,{label:h.fieldLabel,open:i===sn.DisplayForm,icon:"email",onClick:p,children:e(Di,{onHandleSubmit:u,isFormSubmitting:r==="loading",subscriptionErrorMessage:m})})})]})},Ni=()=>{const{i18n:n,shop:t}=v(),a=t.hasFlagEnabled(ce),r=n.translate("thank_you.order_updates_title");return e(z,{accessibilityLabel:r,colorLayer:a?void 0:"control",children:e(y,{gap:"small-200",children:[e(R,{children:r}),e(Oi,{})]})})};function Bi(n,t=!0){const{router:a}=v(),r=An();U(()=>{if(t&&n&&!r){window.history&&(window.history.replaceState(null,document.title,window.location.href),window.history.pushState(null,document.title,window.location.href));const o=()=>{document.hidden||(window.location.href=n)};return window.addEventListener("popstate",o),()=>{window.removeEventListener("popstate",o)}}},[t,n,a,r])}function Fi(){const n=D(),t=n.buyerIdentity,a=Zr(),r=mr(),o=n.contactInfo,s=Q()?.isRedacted??!1;return C(()=>!s&&r.value&&!o?.value?.email&&!t?.value?.purchasingCompany&&!a.value)}function Ui(){const n=D().paymentLines,t=Ae();return C(()=>(n.value?n.value.lines.some(({method:r})=>r.type==="wallet"&&r.name==="SHOPIFY_INSTALLMENTS"):!1)&&!!t?.installmentsHighlightEligible)}function Hi(){const n=D(),t=n.deliveryNext,a=n.deliveryExpectations;return C(()=>{const r=t.value,o=a.value,i=r?.status==="filled",s=o?.status==="filled",l=i&&r.lines.some(p=>p.type==="ONE_TIME_PURCHASE"&&p.status==="available"&&p.methods.some(h=>h?.brandedPromise)),c=i?new Set(r.lines.filter(p=>p.status==="available").map(p=>p.status==="available"?p.selectedDeliveryMethodHandle:null)):null,u=s&&o.deliveryExpectationLine
1s.some(({brandedPromise:p,deliveryStrategyHandle:h})=>p&&c?.has(h)),d=l||u,m=s&&o.deliveryExpectationLines.some(({brandedPromise:p,deliveryExpectationPresentmentTitle:h})=>!p&&h?.short&&h?.long);return!!(d||m)})}function qe(){const{deliveryNext:n}=D(),t=Hi(),a=mn(),r=ua(),o=On();return C(()=>{const i=Qt(n.value),s=Ht(a.value.currentDetour),l=o.value.length>=Nn,{oneTimePurchaseLines:c,subscriptionLines:u}=_r(Xr(n.value).filter(Xe)),{groups:d,nonShippableCount:m}=la(c),p=n.value?.status==="filled"&&d.length+m===1;return i&&l&&!p||p&&u.length>=2||r.value||t.value&&s})}const zi="MultibancoBuyerActionInfo",Yi=(n,t)=>n.length===0?t:Object.keys(t).reduce((r,o)=>n.includes(o)?r:{...r,[o]:t[o]},{}),zn=()=>{const{userEvents:n,checkout:t,shop:{myshopifyDomain:a,id:r},source:{checkoutSessionIdentifier:o="checkout_identifier_undefined"}}=v(),i=t.configuration.layout.isOnePage.value,s=Number(je(r)),l=i?"checkout_one_redesign":"checkout_one",c=he(()=>({checkoutToken:o,shopId:s,checkoutVersion:l,shopifyDomain:a}),[o,l,a,s]);return{track:K((d,m,p)=>{n.monorailEvent({schemaId:d,payload:Yi(p?.omit??[],{...c,...m})})},[c,n])}};function qi(){if(typeof window>"u"||!window.shopAppExperimentFlags)return;function n(t){const a={control:"c",treatment:"t"}[t];return a||t}return window.shopAppExperimentFlags.sort((t,a)=>t.name<a.name?-1:1).map(t=>`${t.name}=${n(t.group)}:r`).join(",")}function ba(){return qi()}function Te(n){const t=gn(),a=fa(),{track:r}=zn(),o=ba();return{track:K(s=>{a&&r("order_status_page_interaction/4.0",{interactionType:n,interactionValue:s,orderId:a,pageviewToken:t.value.defaultAttributes?.microSessionId??"",sessionToken:t.value.defaultAttributes?.visitToken??"",experimentFlags:o},{omit:["shopifyDomain"]})},[o,n,r,a,t])}}function $i(){const n=D().paymentLines,t=Q()?.paymentDetails,{track:a}=Te("follow_link"),{i18n:r,source:o,shop:{contactEmail:i}}=v(),s=o.type==="simulated",l=C(()=>{const d=n.value?.lines,m=(d?Jr(d):void 0)?.cost;if(m)return r.formatCurrency(m.amount,{form:"short",currency:m.currencyCode});const p=Number.parseFloat(t?.paymentAmount??""),h=t?.paymentCurrency;return Number.isFinite(p)&&h?r.formatCurrency(p,{form:"short",currency:h}):0}),c=C(()=>r.translate("payment.pending_payment.multibanco.buyer_action_info",{amount_due:l.value})),u=t?.buyerActionInfo;return e(y,{gap:"base",children:e(y,{gap:"small-200",children:[e(R,{children:c}),e(y,{direction:"inline",gap:"base",children:e(Me,{children:r.translate("payment.pending_payment.multibanco.instruction_html",{contact_us:e(Ce,{href:s?void 0:`mailto:${i}`,onClick:s?void 0:()=>a("contact_us"),children:r.translate("thank_you.contact_us")})})})}),e(H,{gridTemplateColumns:"@media (inline-size >= small) 'repeat(3, minmax(0, 1fr))', 'minmax(0, 1fr)'",gridAutoColumns:"@media (inline-size >= small) 'repeat(3, minmax(0, 1fr))', 'minmax(0, 1fr)'",gridTemplateRows:"minmax(auto, max-content)",gridAutoRows:"minmax(auto, max-content)",gap:"small-200",children:[e(z,{children:e(y,{gap:"base",children:[e(y,{gap:"small-200",children:e(R,{children:r.translate("payment.pending_payment.multibanco.entity")})}),e(y,{gap:"small-200",children:e(k,{children:u?.entity})})]})}),e(z,{children:e(y,{gap:"base",children:[e(y,{gap:"small-200",children:e(R,{children:r.translate("payment.pending_payment.multibanco.reference")})}),e(y,{gap:"small-200",children:e(k,{children:u?.reference})})]})}),e(z,{children:e(y,{gap:"base",children:[e(y,{gap:"small-200",children:e(R,{children:r.translate("payment.pending_payment.multibanco.amount")})}),e(y,{gap:"small-200",children:e(k,{children:l})})]})})]})]})})}function Vi(){const{i18n:n,shop:t}=v(),a=Q()?.paymentDetails?.buyerActionInfo,r=t.hasFlagEnabled(ce);return a?.__typename!==zi?null:e(z,{accessibilityLabel:n.translate("thank_you.customer_information_title"),colorLayer:r?void 0:"control",children:e($i,{})})}function va(n){return!!(n?.label&&n?.text)}function Wi(n){return n.details?.filter(va)??[]}function ka(n,t){const a=n.amount;if(!(a?.amount==null||!a.currencyCode))return{accessibleAmount:t.formatCurrency(a.amount,{form:"name",currency:a.currencyCode}),value:`${t.formatCurrency(a.amount,{form:"short",currency:a.currencyCode})} ${a.currencyCode}`}}function Sa(n,t){if(!n)return;const a=new Date(n);return{date:t.formatDate(a,{month:"short",day:"numeric",year:"numeric"}),time:t.formatDate(a,{hour:"numeric",minute:"2-digit"})}}function Ca(n){if(n.status==="expired")return!0;
1if(!n.expiresAt)return!1;const t=new Date(n.expiresAt).getTime();return Number.isFinite(t)&&t<=Date.now()}const Gi="TNF54",Ki="Bedu9",ji="RExUg",Qi="CMO8N",Zi="Bgyek",Xi="JuwoV",Ji="_8A0Cd",es="JIcdC",ns="Xaalv",we={Chains:Gi,Chain:Ki,ChainOpen:ji,Steps:Qi,Step:Zi,Chin:Xi,ChainBody:Ji,ChainBodyInner:es,ChainHeader:ns},ts={familymart:"familymart",lawson:"lawson",ministop:"ministop",seicomart:"seicomart"},Jn="Asia/Tokyo";function Ta(n){return!!(n?.label&&n?.text)}function Ia(n){return n.key??n.label??"konbini"}function as(n,t){const a=n.amount;if(!(a?.amount==null||!a.currencyCode))return{accessibleAmount:t.formatCurrency(a.amount,{form:"name",currency:a.currencyCode}),value:`${t.formatCurrency(a.amount,{form:"short",currency:a.currencyCode})} ${a.currencyCode}`}}function rs(n,t){if(!n)return;const a=new Date(n),r=t.formatDate(a,{month:"short",day:"numeric",year:"numeric",timeZone:Jn}),o=t.formatDate(a,{hour:"numeric",minute:"2-digit",hour12:!0,timeZone:Jn});return t.translate("payment.lpm.konbini.voucher.expiry_date_time",{date:r,time:o})}function os({detail:n,id:t}){const{i18n:a}=v(),r=ee(!1),o=async()=>{try{await zt(n.text),r.value=!0}catch{r.value=!1}},i=a.translate("payment.lpm.konbini.voucher.code_copied");return e(x,{children:[e(yr,{id:t,name:t,label:n.label,value:n.text,readOnly:!0,accessoryEnd:e(_e,{variant:"tertiary",size:"small",onClick:o,accessibilityLabel:r.value?i:a.translate("payment.lpm.konbini.voucher.copy_code",{label:n.label}),children:e(ie,{type:r.value?"check":"clipboard"})})}),e("p",{role:"status","aria-live":"polite",className:Zt({screenReaders:"only"}),children:r.value?i:""})]})}function is({instructionSet:n,open:t,onToggle:a}){const r=Ia(n),o=n.label??r,i=(n.details??[]).filter(Ta),s=(n.steps??[]).filter(Boolean),l=`konbini-chain-${r}-instructions`;return e("div",{id:`konbini-chain-${r}`,className:F(we.Chain,t&&we.ChainOpen),children:[e($o,{accessibilityRole:"expandableControl",accessibilityLabel:o,controlId:l,expanded:t,onPress:a,className:we.ChainHeader,padding:"base",children:e(H,{gridTemplateColumns:"auto minmax(0, 1fr) auto",gap:"small-300",alignItems:"center",children:[e(V,{type:ts[r]??"konbini",active:!0,accessibilityVisibility:"hidden"}),e(k,{type:"strong",children:o}),e(ie,{type:t?"chevronUp":"chevronDown",size:"small"})]})}),e("div",{className:we.ChainBody,children:e(H,{id:l,gridTemplateRows:t?"minmax(0, 1fr)":"minmax(0, 0fr)",children:e("div",{className:we.ChainBodyInner,children:e(A,{inert:!t,padding:"base",paddingBlockStart:"none",children:e(y,{gap:"base",children:[e(H,{gridTemplateColumns:i.length>1?"minmax(0, 1fr) minmax(0, 1fr)":"1fr",gap:"small-400",children:i.map((c,u)=>e(os,{detail:c,id:`konbini-${r}-code-${u}`},c.label))}),s.length>0?e("ol",{className:we.Steps,children:s.map(c=>e("li",{className:we.Step,children:e(k,{color:"subdued",size:"base",children:c})},`${r}-${c}`))}):null]})})})})})]})}function ss({amount:n,expired:t}){const{i18n:a}=v();return t?e(R,{level:1,children:a.translate("payment.lpm.konbini.voucher.expired_title")}):n?e(R,{level:1,children:[e(k,{accessibilityVisibility:"exclusive",children:a.translate("payment.lpm.konbini.voucher.pay",{amount:n.accessibleAmount})}),e(k,{accessibilityVisibility:"hidden",size:"extraLarge",children:a.translate("payment.lpm.konbini.voucher.pay",{amount:n.value})})]}):null}function ls({expiryDate:n,expired:t}){const{i18n:a}=v();if(!n)return null;const r=e(k,{color:"subdued",size:"base",type:"strong",children:n});return e(k,{color:"subdued",size:"base",children:t?a.translate("payment.lpm.konbini.voucher.expired",{date:r}):a.translate("payment.lpm.konbini.voucher.expires_at",{date:r})})}function cs({paymentInstructions:n}){const{i18n:t}=v(),a=(n.instructionSets??[]).filter(c=>(c.details??[]).some(Ta)),r=ee(null);if(a.length===0)return null;const o=as(n,t),i=Ca(n),s=rs(n.expiresAt,t),l=t.translate("payment.lpm.konbini.voucher.label");return e(Rn,{children:e(y,{gap:"none",children:[e(A,{accessibilityLabel:l,accessibilityRole:"section",background:"base",colorLayer:"control",border:"base",borderRadius:i?"large":"large large none none",padding:"large-100",inlineSize:"100%",children:e(y,{gap:"base",children:[e(y,{gap:"small-300",children:[e(H,{alignItems:"start",ga
1p:"base",gridTemplateColumns:"minmax(0, 1fr) auto",children:[e(ss,{amount:o,expired:i}),e(V,{type:"konbini",active:!0,accessibilityVisibility:"hidden"})]}),i?null:e(k,{color:"subdued",size:"base",children:t.translate("payment.lpm.konbini.voucher.choose_outlet")}),e(ls,{expiryDate:s,expired:i})]}),i?null:e("div",{className:we.Chains,role:"group","aria-label":l,children:a.map(c=>{const u=Ia(c);return e(is,{instructionSet:c,open:r.value===u,onToggle:()=>{r.value=r.value===u?null:u}},u)})})]})}),i?null:e(A,{className:we.Chin,padding:"base",paddingInline:"large-100",children:e(k,{color:"subdued",size:"base",children:t.translate("payment.lpm.konbini.voucher.keep_receipt")})})]})})}const us="Gltpp",ds={CodeValue:us};function ps({details:n}){const{i18n:t}=v();return e(y,{gap:"small-500",children:n.map(a=>e(A,{borderRadius:"base",className:ds.CodeValue,inlineSize:"100%",children:e(k,{type:"small",color:"subdued",children:t.translate("payment.pending_payment.multibanco.labelled_code",{label:a.label,code:a.text})})},a.label))})}function hs({step:n,expiry:t}){const{i18n:a}=v();return n?e(y,{gap:"none",children:[e(k,{color:"subdued",size:"base",children:n}),t?e(k,{color:"subdued",size:"base",children:a.translate("payment.pending_payment.multibanco.expires_at",{date:e(k,{color:"subdued",size:"base",type:"strong",children:t})})}):null]}):null}function ms({expiry:n}){const{i18n:t}=v();return n?e(k,{color:"subdued",size:"base",children:t.translate("payment.pending_payment.multibanco.expired",{date:e(k,{color:"subdued",size:"base",type:"strong",children:n})})}):null}function _s({amount:n,expired:t}){const{i18n:a}=v();return t?e(R,{level:1,children:a.translate("payment.pending_payment.multibanco.expired_title")}):n?e(R,{level:1,children:[e(k,{accessibilityVisibility:"exclusive",children:a.translate("payment.pending_payment.multibanco.pay",{amount:n.accessibleAmount})}),e(k,{accessibilityVisibility:"hidden",size:"extraLarge",children:a.translate("payment.pending_payment.multibanco.pay",{amount:n.value})})]}):null}function ys({paymentInstructions:n}){const{i18n:t}=v(),a=n.instructionSets?.find(({key:u})=>u==="multibanco");if(!a)return null;const r=Wi(a);if(r.length===0)return null;const o=ka(n,t),i=Ca(n),s=Sa(n.expiresAt,t),l=s?t.translate("payment.pending_payment.multibanco.expiry_date_time",s):void 0,c=t.translate("payment.pending_payment.multibanco.label");return e(Rn,{children:e(A,{accessibilityLabel:c,accessibilityRole:"section",background:"base",colorLayer:"control",border:"base",borderRadius:"large",padding:"large-100",inlineSize:"100%",children:e(y,{gap:"small-200",children:[e(H,{alignItems:"start",gap:"base",gridTemplateColumns:"minmax(0, 1fr) auto",children:[e(_s,{amount:o,expired:i}),e(V,{type:"multibanco",active:!0,accessibilityVisibility:"hidden"})]}),i?e(ms,{expiry:l}):e(hs,{step:a.steps?.[0],expiry:l}),e(ps,{details:r})]})})})}const gs="/cdn/shopifycloud/checkout-web/assets/c1/assets/add-to-apple-wallet.c2C6mOjH.svg",fs="_8CGB7",bs="chT5l",et={AppleWalletBadge:fs,AppleWalletAction:bs},vs=/Shop App\/[^/]+\/iOS\//;function ks(n){const t=Xt(n);return t==="iOS"||t==="Mac OS"||vs.test(n)}function Ss({passUrl:n}){const{client:t,i18n:a}=v();return!n||!ks(t.userAgent)?null:e(A,{className:et.AppleWalletAction,paddingBlockStart:"large-100",children:e(H,{justifyItems:"center",children:e(Ce,{href:n,children:e(Ye,{src:gs,alt:a.translate("payment.pending_payment.apple_wallet.badge_alt"),className:et.AppleWalletBadge,inlineSize:"auto"})})})})}const Cs=200,Ts=8,nt=8;function Pa(n){return Math.round(n/nt)*nt}function wa(n,t){try{const a=new URL(n);return a.searchParams.set("width",t.toString()),a.toString()}catch{return n}}function Is(n){try{const t=Number(new URL(n).searchParams.get("width"));return Number.isFinite(t)&&t>0?Pa(t):void 0}catch{return}}function Ps(n,t){const a=Is(n);return a!=null&&Math.abs(a-t)<Ts}function ws(n){const t=G(null),a=G(n),r=G(null),o=G(0),i=ee(n),s=ee(!1);return wn(()=>{o.current+=1,a.current=n,r.current=null,i.value=n,s.value=!1},[n,s,i]),wn(()=>{const l=t.current;if(!n||!l)return;const c=typeof ResizeObserver<"u";let u,d=!1;const m=()=>{o.current+=1,r.current=null,s.value=!1,u&&(clearTimeout(u),u=void 0)},p=(g,f)=>{const S=wa(n,g),T=new window.Image;T.onload=()=>{!d&&f===o.current&&(a.current=S,r.current=null,i.value=S,s.value=!1)},T.onerror=()=>{!d&&f===o.current&&(r.current=null,s.value=!1)},T.src=S},h=g=>{const f=Pa(g);if(f<=0)return;const S=a.current;if(S&&Ps(S,f)){m();return}if(r.current===f){s.value=!0;return}r.current=f;const T=o.current+1;o.current=T,s.value=!0,u&&clearTimeout(u),u=setTimeout(()=>p(f,T),Cs)},_=()=>{h(l.getBoundingClientRect().width)};if(_(),!c)return window.addEventListener("resize",_),()=>{d=!0,u&&clearTimeout(u),window.removeEventListener("resize",_)};const b=new ResizeObserver(([g])=>{g&&h(g.contentRect.width)});return b.observe(l),()=>{d=!0,u&&clearTimeout(u),b.disconnect()}},[n,s,i]),{containerRef:t,imageUrl:i,isLoading:s}}const Es="TBsba",Ms="PITIE",As="Fmqjk",kn={BarcodePicture:Es,BarcodeImage:Ms,LoadingOverlay:As},Rs=510;function Ls({imageUrl:n,altText:t,height:a,printWidth:r=Rs}){const{containerRef:o,imageUrl:i,isLoading:s}=ws(n),l=i.value||n,c=wa(n,r);return e(A,{ref:o,inlineSize:"100%",blockSize:a,children:e(A,{inlineSize:"100%",blockSize:"100%",position:"relative",children:[e("picture",{className:kn.BarcodePicture,children:[e("source",{media:"print",srcSet:c}),e(Ye,{src:l,alt:t,className:kn.BarcodeImage,inlineSize:"auto",objectFit:"contain"})]}),s.value?e("div",{"aria-hidden":"true",className:kn.LoadingOverlay,children:e(De,{contentDisplay:"block",inlineSize:"100%",blockSize:"100%",delay:!1})}):null]})})}const xs="OVcKI",Ds={ReferenceValue:xs},Os="67.5px",Ns="510px";function Bs({barcode:n,detail:t}){if(!n?.imageUrl)return null;const a=t?`${t.label}: ${t.text}`:"";return e(A,{inlineSize:"100%",maxInlineSize:Ns,children:e(Ls,{imageUrl:n.imageUrl,altText:n.altText||a,height:Os})})}function Fs({step:n,expiry:t}){const{i18n:a}=v();return n?e(y,{gap:"none",children:[e(k,{color:"subdued",size:"base",children:n}),t?e(k,{color:"subdued",size:"base",children:a.translate("payment.pending_payment.oxxo.expires_at",{date:e(k,{color:"subdued",size:"base",type:"strong",children:t})})}):null]}):null}function Us({detail:n}){const{i18n:t}=v(),a=t.translate("payment.pending_payment.oxxo.reference_number");return e(A,{borderRadius:"base",className:Ds.ReferenceValue,inlineSize:"100%",children:e(k,{type:"small",color:"subdued",children:[a," ",n.text]})})}function Hs({paymentInstructions:n}){const{i18n:t}=v(),a=n.instructionSets?.find(({key:u})=>u==="oxxo");if(!a)return null;const r=ka(n,t),o=a.details?.find(va),i=a.steps?.[0],s=Sa(n.expiresAt,t),l=s?t.translate("payment.pending_payment.oxxo.expiry_date_time",s):void 0,c=t.translate("payment.pending_payment.oxxo.label");return e(Rn,{children:e(A,{accessibilityLabel:c,accessibilityRole:"section",background:"base",colorLayer:"control",border:"base",borderRadius:"large",padding:"large-100",inlineSize:"100%",children:e(y,{gap:"small-200",children:[e(H,{alignItems:"start",ga
1p:"base",gridTemplateColumns:"minmax(0, 1fr) auto",children:[r?e(R,{level:1,children:[e(k,{accessibilityVisibility:"exclusive",children:t.translate("payment.pending_payment.oxxo.pay",{amount:r.accessibleAmount})}),e(k,{accessibilityVisibility:"hidden",size:"extraLarge",children:t.translate("payment.pending_payment.oxxo.pay",{amount:r.value})})]}):null,e(V,{type:"oxxo",active:!0,accessibilityVisibility:"hidden"})]}),e(Fs,{step:i,expiry:l}),e(y,{gap:"none",children:[e(Bs,{barcode:a.barcode,detail:o}),o?e(Us,{detail:o}):null,e(Ss,{passUrl:a.appleWalletPassUrl})]})]})})})}function zs({paymentInstructions:n}){switch(n.method?.toLowerCase()){case"multibanco":return e(ys,{paymentInstructions:n});case"oxxo":return e(Hs,{paymentInstructions:n});case"konbini":return e(cs,{paymentInstructions:n});default:return null}}function Ys(){const t=Q()?.paymentDetails?.buyerActionInfo?.paymentInstructions;return t?e(zs,{paymentInstructions:t}):null}function qs(){const{i18n:n}=v();return e(k,{size:"small",color:"subdued",children:e(Me,{children:n.translate("shop_pay_remember_me.terms_and_privacy_html",{privacy_href:e(Vs,{}),terms_href:e($s,{})})})})}function $s(){const{i18n:n}=v();return e(x,{children:e(Ce,{target:"_blank",href:"https://shop.app/terms-of-service",tone:"monochrome",accessibilityLabel:n.translate("shop_pay_remember_me.new_window_disclaimer"),children:[n.translate("shop_pay_remember_me.terms_of_service"),e(ie,{type:"external",size:"small",display:"inline"})]})})}function Vs(){const{i18n:n}=v();return e(x,{children:e(Ce,{target:"_blank",href:"https://www.shopify.com/legal/privacy/app-users",tone:"monochrome",accessibilityLabel:n.translate("shop_pay_remember_me.new_window_disclaimer"),children:[n.translate("shop_pay_remember_me.privacy_policy"),e(ie,{type:"external",size:"small",display:"inline"})]})})}function Ws({field:n="phone",link:t}){const{i18n:a}=v();return e(x,{children:[e(k,{color:"subdued",children:e(Me,{children:[n==="phone"?a.translate("shop_pay_remember_me.description_html"):a.translate("shop_pay_remember_me.email_description_html")," ",t]})}),e(qs,{})]})}function Ea(){const{shopPayArtifact:n}=D();return C(()=>!!n.value?.optIn)}class Gs extends Error{constructor(){super(...arguments),this.name="OptInFetchError"}}function Ks(){const{userEvents:n,source:t,checkout:a,shop:r,i18n:o,url:i,shop:{checkoutPublicAccessToken:s},source:{checkoutSessionIdentifier:l}}=v(),c=Ea(),u=D(),{value:d}=u.shippingAddress,{value:m}=u.contactInfo,[p,h]=oe(c.peek()),[_,b]=oe(!1),[g,f]=oe(d?.phone||m?.phone||""),[S,T]=oe(m?.email??""),[I,P]=oe(),[L,M]=oe(),N=!m?.phone,{validatePhoneNumber:W}=Vo(),$=K(O=>{const te=Go(O,o.translate("field_errors.email_blank")),ae=Ko(O,o.translate("field_errors.email_invalid"));return te||ae},[o]),Y=K(()=>{I&&P(void 0)},[I]),X=K(async()=>{if(M(void 0),N){const O=!g.includes("+");if(!W(g,O?d?.countryCode:void 0)){P(o.translate("field_errors.thank_you_remember_me_phone_invalid"));return}}else{const O=$(S);if(O){P(O);return}}n.monorailEvent({schemaId:"shopify_pay_user_optin_ui_interaction/3.2",payload:{...Mn(t,a,r),action:N?"update_phone_input":"update_email_input",phoneNumber:g,email:S,source:"thank_you_page",trigger:"manual"}});try{b(!0);const O=await fetch(i.shopPayOptin(l),{method:"POST",body:JSON.stringify({checkout:{vault_phone:g,vault_email:S,is_checkout_one:!0}}),headers:{"Content-Type":"application/json","X-Shopify-Checkout-Version":"2025-03-18",accept:"application/json",authorization:`Basic ${s}`}});if(O.status===200){const{success:te}=await O.json();te?h(!0):M(o.translate("shop_pay_remember_me.errors.optin_retry"));return}throw new Gs("Opt in request didn't succeed")}catch{P(o.translate("shop_pay_remember_me.errors.optin"))}finally{b(!1)}},[n,t,a,r,i,l,s,g,S,N,d?.countryCode,W,$,o]);return{hasOptedIn:p,loading:_,errorBannerContent:L,handleSave:X,showPhoneField:N,phoneNumber:g,setPhoneNumber:f,email:S,setEmail:T,inputError:I,handleInput:Y,countryCode:d?.countryCode||""}}function js(n){return n?{borderWidth:"base none none none",background:"subdued",padding:"base",borderRadius:"none none base base"}:{borderWidth:"base",background:"base",padding:"base",borderRadius:"base"}}function Qs(){const{track:n}=Te("follow_link"),{i18n:t,userEvents:a,source:r,checkout:o,shop:i}=v(),{hasOptedIn:s,loading:l,errorBannerContent:c,handleSave:u,showPhoneField:d,phoneNumber:m,setPhoneNumber:p,email:h,setEmail:_,inputError:b,handleInput:g,countryCode:f}=Ks(),S=ee(s),{value:T}=D().deliveryNext,{value:I}=Qe(),P=Qt(T),L=js(!P||I),M=eo().shippingAddress,N=C(()=>M.value.oneTimeUse?t.translate("thank_you.opt_in_payment_only_welcome_message_html",{shopify_pay:e(un,{inline:!0,color:"branded",size:"xsmall"})}):t.translate("thank_you.opt_in_welcome_message_html",{shopify_pay:e(un,{inline:!0,color:"branded",size:"xsmall"})})),W=C(()=>M.value.oneTimeUse?t.translate("shop_pay_remember_me.payment_information_only_label"):t.translate("shop_pay_remember_me.label")),$=e(x,{children:W});U(()=>{a.monorailEvent({schemaId:"shopify_pay_user_optin_ui_impression/1.0",payload:{...Mn(r,o,i),source:"thank_you_page",elementType:"remember_me_box"}})},[a,r,o,i]);const Y=()=>{const te=!S.value;a.monorailEvent({schemaId:"shopify_pay_user_optin_ui_interaction/3.2",payload:{...Mn(r,o,i),action:te?"click_remember_me_box":"unclick_remember_me_box",phoneNumber:m,email:h,source:"thank_you_page",trigger:"manual"}}),S.value=te},X=e(Ce,{target:"_blank",href:"https://shop.app/pay",onClick:()=>{n("learn_more_pay")},children:t.translate("shop_pay_remember_me.learn_more")});return e(A,{...L,children:s?e(H,{gridAutoFlow:"column",gridTemplateColumns:"minmax(0, 1fr) minmax(auto, max-content)",gridTemplateRows:"minmax(0, 1fr)",gap:"base",alignItems:"end",alignContent:"end",children:[e(Me,{children:N}),X]}):e(y,{gap:"base",children:[c?e(Ln,{tone:"critical",children:c}):null,e(y,{direction:"inline",gap:"base",children:e(da,{checked:S.value,onChange:Y,label:$})}),e(gr,{open:S.value,id:"thankYouRememberMe",children:e(y,{gap:"base",children:[e(A,{padding:"small-200 none none none",children:e(y,{gap:"small-300",children:[e(H,{gap:"small-400 base",gridTemplateColumns:"minmax(auto, max-content) minmax(auto, max-content)",gridAutoColumns:"1fr",gridTemplateRows:"minmax(auto, max-content)",gridAutoRows:"minmax(auto, max-content)",children:[d?e(Wo,{id:"phone",disabled:l,countryCode:f,label:t.translate("shop_pay_remember_me.mobile_phone_number"),icon:"mobile",value:m,error:!!b,onChange:p,onInput:g}):e(sa,{disabled:l,id:"email",name:"email",label:t.translate("shop_pay_remember_me.email_label"),value:h,error:!!b,onChange:_,onInput:g,required:!1}),e(_e,{variant:"primary",onClick:u,loading:l,children:t.translate("shop_pay_remember_me.save")})]}),b?e(Ut,{controlID:d?"phone":"email",children:b}):null]})}),e(Ws,{field:d?"phone":"email",link:X})]})})]})})}const Zs=300,Xs=5e3,Js=n=>{const{duration:t=Xs,onClose:a,text:r,subText:o,actionText:i,handleAction:s,id:l,variant:c="default"}=n,[u,d]=oe(!1);U(()=>{d(!0);const p=setTimeout(()=>{if(t!==0){d(!1);const h=setTimeout(()=>{a(l)},Zs);return()=>clearTimeout(h)}},t);return()=>clearTimeout(p)},[t,l,a]);const m=$e(c==="error"?"text-poppy-d1":"text-black");return e("div",{className:$e("z-max mx-auto flex w-85 transform items-center justify-start gap-x-3 rounded-md border-[0.5px] border-solid border-grayscale-l2l px-4 py-3 text-white shadow-lg transition-transform duration-300 ease-in-out sm_bottom-0 sm_max-w-none sm_rounded-none",u?"translate-y-0":"translate-y-94",c==="error"?"bg-poppy-l2":"bg-white"),"data-testid":"shop-toast-element",children:[c!=="error"&&e(Qo,{className:"size-8 flex-shrink-0 text-purple-primary"}),e("div",{className:"flex flex-col overflow-hidden",children:[e("div",{className:$e("font-sans text-body-title-small",m),children:r}),o&&e("div",{className:$e("truncate font-sans text-caption",m),children:o})]}),i&&s&&e("button",{type:"button","aria-label":i,className:$e("ml-auto h-8 w-fit max-w-[40%] rounded-sm100 px-3 font-sans text-button-medium",c==="error"?"bg-poppy-d1 text-white":"bg-grayscale-l5 text-black"),"data-testid":"toast-action-button",onClick:s,children:i})]})},el=()=>{const{instanceId:n}=Zo(),{trackPageImpression:t}=Xo(),[a,r]=oe([]),{recordCounter:o}=Jo(),i=K(c=>{r(u=>u.filter(d=>d.id!==c))},[]),s=K(c=>{r(u=>[...u,c])},[]),l=he(()=>({renderToast:({detail:u})=>{u.flow&&o("shop_js_toast_rendered",{attributes:{flow:u.flow,variant:u.variant||"default"}}),t({allowDuplicates:!0,analyticsTraceId:u.analyticsTraceId,flow:u.flow,page:"RENDER_TOAST"}),s(u)}}),[s,o,t]);return ei(l),ar(e(ni,{instanceId:n,type:"toast",variant:"default",children:e("div",{className:"fixed inset-x-0 bottom-8 z-max mx-auto flex flex-col items-center gap-3",children:a.map(c=>e(Js,{...c,onClose:i},c.id))})}),Ge.body)},nl=()=>pa(({element:n,...t})=>e(_a,{element:n,featureName:"ShopToastManager",children:e(ha,{children:e(ma,{children:e(el,{...t})})})}),{methods:["renderToast"],name:"shop-toast-manager",props:{},shadow:"open"}),tl={id:"520f926255e48c24cf1b0e497a7dfa36db1b5b10f628941f45c629153aa67e5f",type:"query",name:"PendingPayEscrowReceipt",source:""},al=1e3,rl=Jt(({graphql:{coreGraphql:n}},{receiptId:t,retries:a,sessionToken:r,skip:o})=>{const i=Pn(1),s=Pn(!o.peek()),l=n.query(tl,{variables:()=>({receiptId:t.value,sessionToken:r.value}),skip:()=>o.value}),c=Ke(()=>ol(l.data.value,l.error.value));let u=!0;function d(){!u||i.peek()>=a||(u=!1,setTimeout(()=>{l.loading.peek()||l.refetch(),i.value++,u=!0,i.peek()<a?d():s.value=!1},al))}return Wn(function(){c.value&&(s.value=!1,u=!1)}),Wn(function(){l.loading.value||s.value&&d()}),{attempts:Ke(()=>i.value),error:l.error,loading:Ke(()=>s.value),pendingPayEscrow:c}});function ol(n,t){return!!(n?.receipt?.__typename==="ProcessedReceipt"&&n?.receipt?.shopAppLinksAndResources?.hasPendingPayEscrow)&&!t}const il=5;function Ma(){return!!Ae()?.payEscrowMayExist}function sl(){const{client:n}=v(),t=n.unstable_getSerialization("sessionToken"),a=Q()?.id,r=Ma(),[o,i]=oe(!r),{attempts:s,loading:l,pendingPayEscrow:c}=ea(rl,{receiptId:fe(a),retries:il,sessionToken:fe(t),skip:fe(!r||!a||!t)}),u={status:"verified_user",isVerifiedShopAccount:o,setIsVerifiedShopAccount:i,loading:l.value,fetchAttempts:s.peek()};return r?l.value?{...u,status:"fetching_status"}:{...u,status:c.value?"split_user":"verified_user"}:u}function ll(){const{i18n:n}=v(),{track:t}=Te("pay_escrow"),{isVerifiedShopAccount:a,setIsVerifiedShopAccount:r,loading:o,status:i,fetchAttempts:s}=sl();U(()=>{!a&&i==="verified_user"&&!o&&(t("verify_button_removed"),r(!0))},[a,i,o,t,r]);const l=K(c=>{const{email:u}=c;u&&(t("verify_action_completed"),cl({email:u,text:n.translate("thank_you.verify_shop_account_confirmation")})),r(!0)},[t,r,n]);return{status:i,isVerifiedShopAccount:a,loading:o,handleSetIsVerifiedShopAccount:l,fetchAttempts:s}}const cl=({email:n,text:t})=>{customElements.get("shop-toast-manager")||nl();const a=document.createElement("shop-toast-manager");document.body.appendChild(a),a.renderToast({flow:"thank_you_page_escrow",text:t,subText:n})};function ul(){const n=fe(Lo()),t=Ea(),a=fe(Ma());return C(()=>!!((n.value||t.value)&&!a.value))}function dl(){const{i18n:n}=v(),t=D().buyerIdentity.value?.purchasingCompany;return t?e(y,{gap:"small-200",children:[e(R,{children:n.translate("thank_you.company_location_section_title")}),e(y,{children:[e(w,{children:t.company.name}),e(w,{children:t.location.name})]})]}):null}function pl({lines:n}){return n.length>0?e(y,{children:n.map(t=>e(w,{children:t},t))}):null}function hl(){const{i18n:n}=v(),t=D().deliveryNext,a=C(()=>na(t.value).find(({method:r})=>r.methodType==="PICK_UP")?.method.pickupLocation);return e(E,{when:a,children:r=>e(y,{gap:"small-200",children:[e(R,{children:n.translate("thank_you.pick_up_in_store_marker.shipping")}),e(Je,{address:r.address,multiline:!0})]})})}
1class tt extends Error{constructor(){super(...arguments),this.name="PaymentMethodError"}}const at=" · ";function ze({children:n}){return e("bdi",{children:n})}function dn({label:n,fallback:t}){return n?e(ze,{children:n}):e(x,{children:t})}function Aa({cost:n,method:t}){const{shop:a,i18n:r,observability:o}=v(),i=D(),{value:s}=i.paymentMethods,{value:l}=i.paymentFlexibilityPaymentTermsTemplate,c=Yt(),u=Q(),d=u?.paymentDetails,m=u?.paymentExtensionBrand,p=Ra({paymentDetails:d}),h=a.hasFlagEnabled(no),_=!!ta().value?.amount,b=l&&!_,g=!n||b?null:e(k,{children:[at,r.formatCurrency(n.amount,{currency:n.currencyCode,form:"explicit"})]});switch(t.type){case"direct":case jn.CreditCard:return e(ml,{method:t,payment:g,installmentInfo:n&&d?.installmentDetails?{cost:n,installmentDetails:d.installmentDetails}:null});case jn.PayPal:return e(rt,{payment:g});case"wallet":{if(t.name==="PAYPAL_EXPRESS")return e(rt,{payment:g});if(t.name==="SHOPIFY_INSTALLMENTS")return e(_l,{walletContent:t.walletContent});if(t.name==="SHOP_PAY")return e(ot,{payment:g,paymentDetails:d,walletContent:t.walletContent,paymentExtensionBrand:m,installmentInfo:n&&d?.installmentDetails?{cost:n,installmentDetails:d.installmentDetails}:null});const f=T=>{switch(T){case"APPLE_PAY":return e(V,{type:"apple-pay"});case"GOOGLE_PAY":return e(V,{type:"google-pay"});default:return o.error(new tt(`Unknown wallet payment method for icon: ${T}`)),null}},S=T=>{switch(T){case"APPLE_PAY":return r.translate("brand.apple_pay");case"GOOGLE_PAY":return r.translate("brand.google_pay");default:return o.error(new tt(`Unknown wallet payment method for label: ${T}`)),null}};return e(y,{direction:"inline",alignItems:"center",gap:"small-200",children:[f(t.name),e(w,{children:[e(dn,{label:p({displayBrandLabel:!0}),fallback:S(t.name)}),g]})]})}case"shopWallet":return e(ot,{payment:g,paymentDetails:d});case"walletsPlatformPaymentMethod":return e(H,{gridAutoFlow:"column",gridTemplateColumns:"minmax(auto, max-content) minmax(0, 1fr)",gridTemplateRows:"minmax(0, 1fr)",alignItems:"center",alignContent:"center",gap:"small-300",children:[e(V,{type:t.name}),e(w,{children:[e(dn,{label:d?.paymentDescriptor??p({displayBrandLabel:!0})}),g]})]});case"local":{const S=s?.find(T=>T.type==="local"&&T.name===t.name)?.displayName||t.name;return e(y,{direction:"inline",alignItems:"center",gap:"small-200",children:[e(V,{type:t.name}),e(w,{children:[S,g]})]})}case"paymentOnDelivery":return e(y,{direction:"inline",alignItems:"center",gap:"small-200",children:[e(V,{type:"cash"}),e(w,{children:[r.translate("payment_gateway.cash_on_delivery_label"),g]})]});case"manualPayment":case"customManualPayment":return e(y,{direction:"inline",alignItems:"center",gap:"small-200",children:[e(V,{type:"cash"}),e(w,{children:[t.name,g]})]});case"deferred":return c.value?null:e(y,{children:l&&l.type!=="FIXED"?e(x,{children:[e(w,{children:l.translatedName}),e(w,{children:r.translate("payment_gateway.deferred_payment_label")})]}):e(w,{children:[r.translate("payment_gateway.deferred_payment_label"),g]})});case"giftCard":{if(h)return null;const f=t.code.slice(-4).toUpperCase();return e(y,{direction:"inline",alignItems:"center",gap:"small-200",children:[e(V,{type:"gift-card"}),e(w,{children:[e(ze,{children:r.translate("payment.masked_digits_label",{last_digits:f})}),g]})]})}case"redeemable":{if(t.redemptionSource==="STORE_CREDIT")return e(y,{direction:"inline",alignItems:"center",gap:"small-200",children:[e(V,{type:"store-credit"}),e(w,{children:[r.translate("payment.store_credit.label"),g]})]});if(t.redemptionSource==="SHOP_CASH"){const f=t.redemptionContent;return f?.redemptionPaymentOptionKind==="ZERO_BALANCE_OFFER"?null:f?.details?.length?f.details.map(S=>{if(!to.includes(S.redemptionType))return null;const T=S.destinationAmount&&!b?e(k,{children:[at,r.formatCurrency(parseFloat(S.destinationAmount.amount),{currency:S.destinationAmount.currencyCode,form:"short"})]}):null;return S.redemptionType==="SHOP_CASH_BALANCE"?e(y,{direction:"inline",alignItems:"center",gap:"small-200",children:[e(V,{type:"shop-cash"}),e(w,{children:[r.translate("order_summary.shop_cash_title"),T]})]},S.redemptionType):null}):e(y,{direction:"inline",alignItems:"center",gap:"small-200",children:[e(V,{type:"shop-cash"}),e(w,{children:[r.translate("order_summary.shop_cash_title"),g]})]})}if(t.redemptionSource==="CUSTOM"){const f=t.redemptionContent,S=f?fr(f)?.toUpperCase():"";return e(y,{direction:"inline",alignItems:"center",gap:"small-200",children:[e(V,{type:"gift-card"}),e(w,{children:[e(ze,{children:r.translate("payment.ends_with_label",{last_digits:S||""})}),g]})]})}return null}case"offsite":case"customOnsite":{const f=d?.paymentIcon,T=!!m||!f||["generic","usdc"].includes(f)?La(m,r):t.name;return e(y,{direction:"inline",alignItems:"center",gap:"small-200",children:[e(V,{type:m||f||"generic"}),e(w,{children:[T,g]})]})}case"bank":return e(y,{gap:"small-400",children:[e(k,{children:t.bankName}),e(y,{direction:"inline",alignItems:"center",gap:"small-200",children:[e(V,{type:di(t.bankName??"")}),e(w,{children:[e(ze,{children:r.translate("payment.masked_digits_label",{last_digits:t.lastDigits??""})}),t.lastDigits?" · ":null,n?.amount&&r.formatCurrency(n.amount,{currency:n.currencyCode,form:"short"})]})]})]});default:return null}}function ml({method:n,payment:t,installmentInfo:a}){const{i18n:r}=v(),o=D().buyerIdentity.value?.purchasingCompany,i=D().paymentFlexibilityPaymentTermsTemplate,s=Yt(),l=C(()=>i.value&&!s.value?i.value.translatedName:void 0),c=n.brand??"generic",u=n.type==="direct"?n.creditCardLastFourDigits:n.displayLastDigits,d=c==="MAESTRO"?r.translate("payment_gateway.debit_card_label"):r.translate("payment_gateway.credit_card_label"),m=u?e(ze,{children:r.translate("payment.masked_digits_label",{last_digits:u})}):d,p=(()=>{const h=a?.installmentDetails?.count,_=a?.cost;if(!h||!_)return null;const b=qt(_.amount,h);return r.translate("payment.msi_installment_plan",{amount:r.formatCurrency(b,{currency:_.currencyCode,form:"explicit"}),num_payments:h})})();return e(y,{gap:"small-400",children:[e(E,{when:l,children:h=>e(w,{children:h})}),e(y,{direction:"inline",alignItems:"center",gap:"small-200",children:[e(V,{type:c}),e(w,{children:[m,t]})]}),p?e(k,{color:"subdued",children:p}):null,n.type==="direct"&&n.vaultingAgreement?e(y,{direction:"inline",alignItems:"center",gap:"small-400",children:[e(ie,{size:"small",type:"check"}),e(k,{color:"subdued",children:o?r.translate("payment.card_vaulted_company_location"):r.translate("payment.payment_method_s
1aved")})]}):null]})}function rt({payment:n}){const{i18n:t}=v();return e(y,{direction:"inline",alignItems:"center",gap:"small-200",children:[e(V,{type:"paypal"}),e(w,{children:[t.translate("brand.paypal"),n]})]})}function _l({walletContent:n}){const{i18n:t}=v(),a=Ae(),r=()=>n?.creditCardBrand?e(V,{type:n.creditCardBrand}):e(un,{color:"branded",size:"xsmall"}),o=()=>n?.creditCardLastFourDigits&&t.translate("payment.masked_digits_label",{last_digits:n.creditCardLastFourDigits}),i=()=>a?e(w,{children:e(Ce,{target:"_blank",href:a.shopInstallmentsViewSchedules,children:t.translate("shop_pay_remember_me.installments.view_schedule")})}):null;return e(y,{gap:"small-300",children:[e(y,{direction:"inline",alignItems:"center",gap:"small-200",children:[r(),e(w,{children:e(ze,{children:o()})})]}),e(w,{children:t.translate("shop_pay_remember_me.installments.paid_in_installments")}),i()]})}function ot({payment:n,paymentDetails:t,walletContent:a,paymentExtensionBrand:r,installmentInfo:o}){const i=Ra({paymentDetails:t}),{i18n:s}=v(),{value:l}=D().managedByMarketsPro,c=ao({managedByMarketsPro:l}),u=(()=>{const d=o?.installmentDetails?.count,m=o?.cost;if(!d||!m)return null;const p=qt(m.amount,d);return s.translate("payment.msi_installment_plan",{amount:s.formatCurrency(p,{currency:m.currencyCode,form:"explicit"}),num_payments:d})})();return r?e(y,{direction:"inline",alignItems:"center",gap:"small-200",children:[e(V,{type:r}),e(w,{children:[La(r,s),n]})]}):t?.paymentCardBrand?e(y,{gap:"small-400",children:[e(y,{direction:"inline",alignItems:"center",gap:"small-200",children:[e(V,{type:t.paymentCardBrand}),e(w,{children:[e(dn,{label:i({displayBrandLabel:!1})}),n]})]}),u?e(k,{color:"subdued",children:u}):null]}):c&&a?.paymentMethod==="IDEAL"?e(y,{direction:"inline",alignItems:"center",gap:"small-200",children:[e(V,{type:"ideal"}),e(w,{children:[s.translate("payment.ideal_label"),n]})]}):e(y,{gap:"small-400",children:[e(y,{direction:"inline",alignItems:"center",gap:"small-200",children:[e(V,{type:"shop-pay"}),e(w,{children:[e(dn,{label:i({displayBrandLabel:!0}),fallback:s.translate("payment_gateway.shop_pay.name")}),n]})]}),u?e(k,{color:"subdued",children:u}):null]})}function Ra({paymentDetails:n}){const{i18n:t}=v();return K(({displayBrandLabel:a})=>{if(!n||!n.creditCardLastFourDigits)return null;const r=gl(n),o=t.translate("payment.masked_digits_label",{last_digits:n.creditCardLastFourDigits});return r&&a?`${r} ${o}`:o},[n,t])}const yl=new Map([["UNKNOWN",void 0],["AMERICAN_EXPRESS","American Express"],["BOGUS","Test Payment Gateway"],["CARTESBANCAIRES","Cartes Bancaires"],["DANKORT","Dankort"],["DINERS_CLUB","Diners Club"],["DISCOVER","Discover"],["EFTPOS_AU","EftposAu"],["ELO","Elo"],["FORBRUGSFORENINGEN","Forbrugsforeningen"],["GIROCARD","girocard"],["HYPERCARD","HyperCard"],["INTERAC","Interac"],["JCB","JCB"],["LASER","Laser"],["MAESTRO","Maestro"],["MASTER","Mastercard"],["SOLO","Solo"],["SWITCH","Switch"],["UNIONPAY","UnionPay"],["VISA","Visa"]]);function gl(n){return n?.paymentCardBrand?yl.get(n.paymentCardBrand):void 0}function La(n,t){switch(n){case"alipay":return t.translate("payment.alipay_label");case"bancontact":return t.translate("payment.bancontact_label");case"blik":return t.translate("payment.blik_label");case"bizum":return t.translate("payment.bizum_label");case"eps":return t.translate("payment.eps_label");case"ideal":return t.translate("payment.ideal_label");case"mobilepay":return t.translate("payment.mobilepay_label");case"oxxo":return t.translate("payment.oxxo_label");case"mb":return t.translate("payment.multibanco_label");case"mbway":return t.translate("payment.mb_way_label");case"paynow":return t.translate("payment.paynow_label");case"przelewy24":return t.translate("payment.przelewy24_label");case"satispay":return t.translate("payment.satispay_label");case"scalapay":return t.translate("payment.scalapay_label");case"swish":return t.translate("payment.swish_label");case"twint":return t.translate("payment.twint_label");case"usdc":return t.translate("payment.usdc_label");case"vipps":return t.translate("payment.vipps_label");case"wechatpay":return t.translate("payment.wechat_pay_label");case null:case void 0:return"";default:return n}}function fl(){const{i18n:n}=v(),t=D(),a=t.shippingAddress,r=t.deliveryNext,o=C(()=>na(r.value).find(({method:l})=>l.methodType==="PICKUP_POINT")?.method.pickupLocation),i=C(()=>{const l=o.value,c=a.value??l?.address;if(c)return l?.name?{...c,lastName:l.name}:c}),s=C(()=>{const l=o.value;return l?.type==="PickupPointLocation"&&l.carrierCode?l:void 0});return e(E,{when:i,children:l=>e(y,{gap:"small-200",children:[e(R,{children:n.translate("pickup_point.title")}),e(Je,{address:l,multiline:!0,hiddenFields:["firstName"]}),e(E,{when:s,children:c=>e(hi,{pickupLocation:c})})]})})}function xe(){return Q()?.completedRemoteCheckouts}const it=" · ",Sn="unknown";function bl(){const{i18n:n,shop:{name:t,remoteShopsConfigMap:a}}=v(),r=D().paymentLines,o=fe(xe()),i=C(()=>
1{if(!o.value?.length)return;const c=[],u=new Map([[Sn,{method:null,items:[]}]]);return r.value?.lines.forEach(d=>{const m=st(d.method);u.set(m,{method:d.method,items:[{shopName:t,cost:d.cost,textKey:`local-${m}`}]})}),o.value.forEach(d=>{const{status:m,shopId:p}=d,h=a?.get(p)?.name||n.translate("thank_you.thank_you_from_other_store");if(m==="failed"){c.push({textKey:`failed-${p}`,remoteShopName:h});return}d.remotePurchaseOrder.paymentLines?.forEach(_=>{const{cost:b,method:g}=_;if(g){const f=st(g);u.has(f)||u.set(f,{method:g,items:[]}),u.get(f)?.items.push({shopName:h,cost:b,textKey:`${f}-${d.checkoutSessionToken}`})}else u.get(Sn)?.items.push({shopName:h,cost:b,textKey:`${Sn}-${d.checkoutSessionToken}`})})}),{failedCheckouts:c,groupedPayments:Array.from(u.entries()).map(([d,{method:m,items:p}])=>({key:d,method:m,items:p}))}}),s=C(()=>i.value?.groupedPayments??[]),l=C(()=>i.value?.failedCheckouts??[]);return e(E,{when:i,children:e(y,{gap:"small-400",children:[e(ln,{each:s,getKey:c=>c.key,children:({method:c,items:u})=>c?e(y,{gap:"small-400",children:[e(Aa,{cost:void 0,method:c}),e(y,{gap:"small-400",children:u.map(({cost:d,shopName:m,textKey:p})=>e(k,{children:[m,d&&e(x,{children:[it,n.formatCurrency(d.amount,{currency:d.currencyCode,form:"explicit"})]})]},p))})]}):u.map(({shopName:d,textKey:m})=>e(k,{children:d},m))}),e(ln,{each:l,getKey:c=>c.textKey,children:({remoteShopName:c})=>e(k,{children:[c,it,n.translate("thank_you.payment_method_not_charged")]})})]})})}function st(n){const t=[aa(n)];return"brand"in n&&n.brand&&t.push(n.brand),"creditCardLastFourDigits"in n&&n.creditCardLastFourDigits&&t.push(n.creditCardLastFourDigits),"displayLastDigits"in n&&t.push(n.displayLastDigits),"code"in n&&t.push(n.code.slice(-4)),n.type==="wallet"&&n.walletContent&&("lastDigits"in n.walletContent&&n.walletContent.lastDigits&&t.push(n.walletContent.lastDigits),"creditCardLastFourDigits"in n.walletContent&&n.walletContent?.creditCardLastFourDigits&&t.push(n.walletContent.creditCardLastFourDigits)),t.join("-")}const lt=" · ";function vl({completedRemoteCheckouts:n}){const t=qe().value,{i18n:a,shop:{name:r,remoteShopsConfigMap:o}}=v(),i=br(n);if(!i.length)return null;const s=i.map(l=>{const c=`${o?.get(l.shopId)?.name||a.translate("thank_you.thank_you_from_other_store")}${lt}`;return e(w,{children:[c,l.title]},l.handle)});if(t){const l=`${r}${lt}${a.translate("shipping.split_shipping_multiple_shipment_label")}`;return e(y,{gap:"small-200",children:[e(k,{color:"subdued",children:a.translate("thank_you.shipping_method_title")}),l,s]})}return e(y,{gap:"small-200",children:[e(R,{children:a.translate("thank_you.shipping_method_title")}),s]})}function ct({shippingRequired:n=!0}={}){const{i18n:t}=v(),a=D().shippingAddress,r=qe();return n?e(E,{when:a,children:o=>e(y,{gap:"small-200",children:[e(E,{when:r,fallback:e(R,{children:t.translate("thank_you.shipping_address_title")}),children:e(k,{color:"subdued",children:t.translate("thank_you.shipping_address_title")})}),e(Je,{address:o,multiline:!0})]})}):null}function kl(){const n=D(),t=n.deliveryNext,a=n.remoteMerchandiseDetails,{i18n:r,shop:o}=v(),i=o.hasFlagEnabled(ro),s=fe(xe()),l=C(()=>!!s.value?.some(h=>h.status==="submitted")),c=C(()=>{const h=t.value;return!!(h&&h.status!=="unavailable")}),u=C(()=>{const h=t.value;if(!h||h.status==="unavailable")return[];const _=i&&h.lines.some(b=>b.targetMerchandiseLines?.some(g=>g.properties.some(f=>f.name==="_shopify_non_subscription_item")));return h.lines.filter(b=>!_||b.type!=="SUBSCRIPTION")}),d=C(()=>{const h=new Set(u.value.map(({type:_})=>_));return h.size>1&&h.has("SUBSCRIPTION")}),m=C(()=>{const h=new Set;return ra(u.value).flatMap((_,b)=>{const g=oo(_);if(!g)return[];if(_.type==="ONE_TIME_PURCHASE"&&_.status==="available"&&Ho({line:_,method:g})){const f=ca(g,_.id??`index-${b}`);if(h.has(f))return[];h.add(f)}return[{deliveryLine:_,selectedDeliveryMethod:g}]})}),p=(h,_)=>!d.value&&h.type==="ONE_TIME_PURCHASE"?_?.title:h.type==="ONE_TIME_PURCHASE"?`${r.translate("shipping.shipping_method_first_shipment_group_title",{count:1})} · ${_?.title}`:`${r.translate("shipping.shipping_method_recurring_shipments_group_title.other")} · ${_?.title}`;return e(E,{when:c,children:e(y,{gap:"small-200",children:[e(R,{children:r.translate("thank_you.shipping_method_title")}),e(ln,{each:m,getKey:({selectedDeliveryMethod:h})=>h.handle,children:({deliveryLine:h,selectedDeliveryMethod:_})=>{const b=p(h,_);if(l.value){const{shopName:g}=io({deliveryLine:h,remoteMerchandiseDetails:a.value,remoteShopsConfigMap:o.remoteShopsConfigMap,localShopId:o.id,localShopName:o.name});return e(w,{children:`${g}
1 · ${_.title}`})}return e(w,{children:b})}})]})})}function Sl({shippingRequired:n,showMethods:t}){const a=xe();return!n&&!a?.length?null:t?e(x,{children:[e(ct,{shippingRequired:n}),e(kl,{})]}):e(x,{children:[e(ct,{shippingRequired:n}),a?.length?e(vl,{completedRemoteCheckouts:a}):null]})}function Cl(){const{i18n:n}=v(),{track:t}=Te("follow_link");return e(x,{children:e(H,{gridAutoFlow:"column",gridTemplateColumns:"minmax(0, 1fr) minmax(auto, max-content)",gridTemplateRows:"minmax(0, 1fr)",gap:"base",alignItems:"end",alignContent:"end",children:[e(k,{children:n.translate("completed_with_shop_pay.text",{shopPay:e(un,{inline:!0,color:"branded",size:"xsmall"})})}),e(Ce,{target:"_blank",href:"https://shop.app/pay",onClick:()=>t("learn_more_pay"),children:n.translate("completed_with_shop_pay.learn_more")})]})})}function Tl({message:n,loading:t}){return t?e(De,{children:e(vr,{lines:1,size:"base"})}):n?e(k,{children:n}):null}function Il({message:n,loading:t,completedWithShopPay:a}){return e(y,{gap:"small-300",children:[e(Ze,{}),e(kr,{blockSize:"small-500"}),n||t?e(Tl,{message:n,loading:t}):null,a?e(Cl,{}):null]})}function Pl(){const{checkout:n,i18n:t,shop:a,url:r,mobileCheckoutSdk:o,source:i,embed:s}=v(),{billingAddress:l,buyerIdentity:c,contactInfo:u,deliveryNext:d,paymentLines:m}=D(),p=C(()=>m.value?.lines??[]),h=so(),_=qe(),b=Qe(),g=ul(),f=Sr(),S=mn(),T=ke("Checkout::CustomerInformation::RenderAfter"),I=ke("Checkout::ThankYou::CustomerInformation::RenderAfter"),P=t.translate("thank_you.customer_information_title"),L=t.translate("thank_you.contact_information_title"),M=t.translate("thank_you.payment_method_title"),N=t.translate("thank_you.billing_address_title"),W=t.translate("thank_you.view_business_customer_account"),$=i.type==="draftOrder",Y=o.variant.isStandard()||s?.isCheckoutKit(),X=!a.hasFlagEnabled(lo),O=C(()=>{const j=n.latestReceipt.value;return j?.status==="processed"?j:void 0}),te=C(()=>{const j=O.value?.shopAppLinksAndResources;return j?{...j}:void 0}),ae=C(()=>O.value?.isRedacted??!1),B=C(()=>!!O.value?.completedRemoteCheckouts?.length),ue=C(()=>c.value?.purchasingCompany),ne=C(()=>l.value??ue.value?.location.billingAddress),se=C(()=>!!c.value?.customerProfile),Ie=C(()=>{const j=c.value,ge=u.value;return[j?.purchasingCompany?j.customerProfile?.fullName:void 0,ge?.email??ge?.phone].filter(He=>!!He)}),be=C(()=>co(d.value)),Re=C(()=>uo(d.value)),J=C(()=>!Re.value&&!be.value),Ne=C(()=>!_.value),Pe=C(()=>!!f.value.shippableDeliveryLines?.length),me=C(()=>!_.value||b.value),Be=C(()=>!Y&&!$&&a.hasStorefront&&se.value),Fe=C(()=>!n.configuration.isUniversalCheckoutFinalizer&&!!a.loginLinkVisible&&(Be.value||!!ue.value)),ye=C(()=>{const j=p.value;return!!(!h.value&&j.length||B.value||po({checkout:n})&&j.length)}),Ue=C(()=>!B.value&&p.value.length>0),ja=C(()=>!b.value),Qa=C(()=>!b.value&&ye.value||!!ne.value),Za=C(()=>!ae.value),Xa=C(()=>{const j=n.rememberMe.response.value,ge=n.rememberMe.status.value,He=!!j?.data,er=p.value.some(({method:Vn,cost:tr})=>tr?.amount&&Vn.type==="wallet"&&["SHOP_PAY","SHOPIFY_INSTALLMENTS"].includes(Vn.name)),$n=!!((X?te.value?.shopPayOrder:!!er)||He),nr=He||ge==="loading";if(!(ae.value||n.configuration.isUniversalCheckoutFinalizer||!$n&&!nr))return{completedWithShopPay:$n,loading:ge==="loading",message:j?.data}}),Ja=C(()=>!ae.value&&!n.configuration.isUniversalCheckoutFinalizer&&g.value),qn=()=>e(E,{when:ye,children:e(y,{gap:"small-200",children:[e(E,{when:me,fallback:e(k,{color:"subdued",children:M}),children:e(R,{children:M})}),e(E,{when:Ue,children:e(y,{gap:"small-200",children:e(ln,{each:p,getKey:({method:j,cost:ge})=>`${aa(j)}-${ge?.amount}`,children:({method:j,cost:ge})=>e(Aa,{cost:ge,method:j})})})}),e(E,{when:B,children:e(bl,{})})]})});return e(wl,{sectionTitle:P,renderAsCard:me,afterStack:e(E,{when:Ja,children:e(Qs,{})}),children:[e(H,{gridAutoFlow:"column",gridTemplateColumns:"minmax(auto, max-content) minmax(0, 1fr)",gridTemplateRows:"minmax(0, 1fr)",justifyContent:"end",justifyItems:"end",children:[e(R,{children:P}),e(E,{when:Fe,children:e(Ce,{href:r.account(),children:W})})]}),e(H,{gridTemplateColumns:"@media (inline-size >= small) 'repeat(2, minmax(0, 1fr))', 'minmax(0, 1fr)'",gridAutoColumns:"@media (inline-size >= small) 'repeat(2, minmax(0, 1fr))', 'minmax(0, 1fr)'",gridTemplateRows:"minmax(auto, max-content)",gridAutoRows:"minmax(auto, max-content)",gap:"large-100",children:[e(z,{children:e(ut,{renderAsCard:me,children:[e(E,{when:Z
1a,children:e(El,{contactInformationLines:Ie,renderAsCard:me,title:L})}),e(E,{when:ue,children:e(dl,{})}),e(E,{when:b,fallback:e(x,{children:[e(E,{when:be,children:e(hl,{})}),e(E,{when:Re,children:e(fl,{})}),e(E,{when:J,children:e(Ml,{shippingRequired:Pe,showMethods:Ne})})]}),children:qn()})]})}),e(E,{when:Qa,children:e(z,{children:e(ut,{renderAsCard:me,children:[e(E,{when:ja,children:qn()}),e(E,{when:ne,children:j=>e(y,{gap:"small-200",children:[e(E,{when:me,fallback:e(k,{color:"subdued",children:N}),children:e(R,{children:N})}),e(Je,{address:j,multiline:!0})]})})]})})})]}),e(E,{when:Xa,children:({completedWithShopPay:j,loading:ge,message:He})=>e(Il,{message:He,loading:ge,completedWithShopPay:j})}),e(Al,{journey:S,defaultExtensions:T,thankYouExtensions:I})]})}function wl({afterStack:n,children:t,renderAsCard:a,sectionTitle:r}){const{shop:o}=v(),i=o.hasFlagEnabled(ce),s=a.value;return e(Le,{target:s?"edgeToEdgeCard":"plain",children:e(z,{accessibilityLabel:r,colorLayer:s&&!i?"control":void 0,children:[e(y,{gap:"base",padding:s?"base":"base none",children:t}),n]})})}function ut({children:n,renderAsCard:t}){return e(y,{gap:t.value?"base":"large-100",children:n})}function El({contactInformationLines:n,renderAsCard:t,title:a}){return e(y,{gap:"small-200",children:[e(E,{when:t,fallback:e(k,{color:"subdued",children:a}),children:e(R,{children:a})}),e(pl,{lines:n.value})]})}function Ml({shippingRequired:n,showMethods:t}){return e(Sl,{shippingRequired:n.value,showMethods:t.value})}function Al({journey:n,defaultExtensions:t,thankYouExtensions:a}){const r=n.value.currentDetour?.type==="thankYou"?a:t;return e(on,{customizations:r})}function Rl(){const{i18n:n,shop:t}=v(),a=t.hasFlagEnabled(ce),r=D().contactInfo,o=ho(),i=C(()=>r.value?.email?n.translate("thank_you.gift_card_email_title",{count:o.value}):n.translate("thank_you.gift_card_text_title",{count:o.value})),s=C(()=>r.value?.email?n.translate("thank_you.gift_card_confirmation_by_email_typ",{count:o.value}):n.translate("thank_you.gift_card_confirmation_by_text_typ",{count:o.value}));return e(z,{accessibilityLabel:i.value,colorLayer:a?void 0:"control",children:e(y,{gap:"base",children:[e(R,{children:i}),e(w,{children:e(Me,{children:s})})]})})}const Ll=(...n)=>{const t=n.find(a=>a?.firstName&&a?.lastName)||n.find(a=>a?.lastName);return t?{firstName:t.firstName,lastName:t.lastName}:{}},xl=" • ";function dt(){const{i18n:n,checkout:t}=v(),a=fe(Q()),{buyerIdentity:r,shippingAddress:o,billingAddress:i}=D(),s=Bn(),c=xe()?.some(f=>f.status==="failed"),u=Oe(),d=$t(),m=C(()=>!d||t.thankYouEntrance.phase.value==="settled"),p=C(()=>{const f=r.value?.purchasingCompany,S=r.value?.customerProfile,{firstName:T,lastName:I}=f&&S?{firstName:S.firstName??void 0,lastName:S.lastName??void 0}:Ll(i.value,o.value),P=a.value?.isRedacted?null:n.formatName(T,I);return P?n.translate("thank_you.page_title",{display_name:P}):n.translate("thank_you.page_title_no_name")}),h=C(()=>{const f=a.value?.orderIdentity.buyerIdentifier||null,S=!!a.value?.completedRemoteCheckouts?.length;return!s.value&&f&&!S?n.translate("order_summary.confirmation_number_label",{confirmation_number:`${f}`}):null}),_=C(()=>{const f=a.value?.purchaseOrderNumber;return f?n.translate("thank_you.purchase_order_number_title",{purchase_order_number:f}):null}),b=C(()=>!!h.value||!!_.value);if(c)return null;const g=e(x,{children:[e(E,{when:b,children:()=>e(w,{color:"subdued",textAlign:u?"center":void 0,children:[e(E,{when:h,children:f=>e(x,{children:[f,e(E,{when:_,children:xl})]})}),_]})}),e(R,{level:1,autoFocus:m.value,textAlign:u?"center":void 0,children:p})]});return u?e(Le,{target:"card",children:e(z,{accessibilityRole:"presentation",className:Se.ThankYouEntranceHeading,colorLayer:"control",children:e(y,{gap:"small-300",children:g})})}):e(_i,{status:"success",children:g})}const pt=n=>n.reduce((t,a)=>t+(a.quantity??0),0);function Dl({confirmedShops:n,failedShops:t}){const{i18n:a}=v(),r=he(()=>pt(n),[n]),o=he(()=>pt(t),[t]),i=r+o;return e(R,{children:a.translate("thank_you.confirmed_items_count",{confirmed_count:r,total_count:i})})}function Ol({thumbnailUrl:n,thumbnailAlt:t,primaryText:a,secondaryText:r,orderAmount:o,checkoutUrl:i,buttonText:s}){const{i18n:l}=v(),c=o?l.formatCurrency(o.amount,{currency:o.currencyCode,form:"short"}):void 0;return e(H,{gridAutoFlow:"column",gridTemplateColumns:"minmax(auto, max-content) minmax(0, 1fr) minmax(auto, max-content)",gridTemplateRows:"minmax(0, 1fr)",gap:"base",children:[e(_n,{alt:t,size:"small",src:n}),e(y,{gap:"base",children:[e(H,{gridAutoFlow:"column",gridTemplateColumns:"minmax(0, 1fr) minmax(auto, max-content)",gridTemplateRows:"minmax(0, 1fr)",gap:"base",children:[e(y,{children:[a,r&&e(k,{color:"subdued",children:r})]}),c?e(k,{type:"strong",children:c}):null]}),i&&s&&e(A,{inlineSize:"@media (inline-size >= extraSmall) fit-content, 100%",children:e(_e,{variant:"secondary",size:"small",onClick:()=>window.open(i,"_blank"),inlineSize:"fill",children:e(H,{gridAutoFlow:"column",gridTemplateColumns:"minmax(0, 1fr) minmax(auto, max-content)",gridTemplateRows:"minmax(0, 1fr)",gap:"small-400",alignItems:"center",alignContent:"center",children:[e(k,{children:s}),e(ie,{type:"external",size:"small"})]})})})]})]})}function ht({image:n,quantity:t,title:a,subtitle:r,totalPrice:o}){const{i18n:i}=v();return e(H,{gridAutoFlow:"column",gridTemplateColumns:"minmax(auto, max-content) minmax(0, 1fr) minmax(auto, max-content)",gridTemplateRows:"minmax(0, 1fr)",gap:"base",children:[e(A,{children:e(_n,{alt:n?.altText,size:"base",src:n?.url,totalItems:t})}),e(A,{blockAlignment:"center",children:e(y,{children:[e(k,{children:a}),r&&e(k,{color:"subdued",children:r})]})}),o?e(A,{blockAlignment:"center",children:e(k,{children:i.formatCurrency(o.amount,{currency:o.currencyCode,form:"short"})})}):null]})}const Nl="·";function Bl({deliveryLines:n,merchandiseItems:t}){const{i18n:a}=v(),r=!!(n&&n.length>=Nn);if(!r&&(!t||!t.length))return null;if(r){const o=[];return n?.forEach(i=>
1{if(!Xe(i))return;const s=i.methods.find(l=>l.handle===i.selectedDeliveryMethodHandle);s&&o.push({line:i,selectedMethod:s})}),o.length?e(y,{gap:"large-200",children:o.map(({line:i,selectedMethod:s},l)=>e(y,{gap:"base",children:[e(y,{children:[e(y,{direction:"inline",gap:"small-400",children:[e(k,{type:"strong",children:a.translate("shipping.split_shipping_shipment_number",{number:l+1})}),e(k,{children:Nl}),e(k,{children:s.title})]}),e(k,{color:"subdued",children:s.deliveryPromisePresentmentTitle?.long})]}),i.targetMerchandiseLines?.map(c=>{const u=t?.find(d=>d.id===c.stableId);return u?e(ht,{image:u.image,quantity:u.quantity,title:u.title,subtitle:u.subtitle,totalPrice:u.totalPrice},c.id):null})]},i.id||l))}):null}return e(y,{gap:"base",children:t?.map(o=>e(ht,{image:o.image,quantity:o.quantity,title:o.title,subtitle:o.subtitle,totalPrice:o.totalPrice},o.id))})}const mt="·",Fl=Dn("ShopOrderSummaryTooltip");function Ul({details:n}){const{i18n:t,shop:a}=v(),r=n.shopId===a.id,o=xn(void 0,Fl),i=!!("deliveryLines"in n&&n.deliveryLines&&n.deliveryLines.length>=Nn);return e(Mr,{title:t.translate("order_summary.cost_table_title"),children:[n.subtotal&&e(en,{children:[e(nn,{children:e(y,{direction:"inline",gap:"small-400",children:[e(k,{children:t.translate("order_summary.subtotal_label")}),n.quantity&&e(x,{children:[e(k,{children:mt}),e(k,{children:t.translate("thank_you.thank_you_item_label",{count:n.quantity})})]})]})}),e(tn,{children:e(k,{children:t.formatCurrency(n.subtotal.amount,{currency:n.subtotal.currencyCode,form:"short"})})})]}),r&&e(Cr,{disableTooltip:!0}),"shippingTotal"in n&&n.shippingTotal&&e(en,{children:[e(nn,{children:e(y,{direction:"inline",gap:"small-400",children:[e(k,{children:t.translate("order_summary.shipping_label")}),n.deliveryMethodHandle&&!i&&e(x,{children:[e(k,{children:mt}),e(k,{children:n.deliveryMethodHandle})]})]})}),e(tn,{children:e(k,{letterCase:n.shippingTotal.amount===0?"uppercase":void 0,children:n.shippingTotal.amount===0?t.translate("order_summary.free_shipping_total_label"):t.formatCurrency(n.shippingTotal.amount,{currency:n.shippingTotal.currencyCode,form:"short"})})})]}),"estimatedTaxes"in n&&n.estimatedTaxes&&e(en,{children:[e(nn,{children:e(y,{direction:"inline",gap:"small-300",alignItems:"center",children:[e(k,{children:t.translate("order_summary.estimated_taxes_label")}),e(ie,{type:"question-circle",size:"small",interestFor:o,accessibilityLabel:t.translate("tooltip.accessibility_label_context",{context:t.translate("order_summary.estimated_taxes_label")})}),e(Tr,{id:o,children:t.translate("order_summary.estimated_taxes_finalization_tooltip_content")})]})}),e(tn,{children:e(k,{children:t.formatCurrency(n.estimatedTaxes.amount,{currency:n.estimatedTaxes.currencyCode,form:"short"})})})]}),r&&e(Ir,{}),r&&e(Pr,{}),r&&e(wr,{disableTooltip:!0}),"checkoutTotal"in n&&n.checkoutTotal&&e(en,{children:[e(nn,{children:e(R,{level:1,children:t.translate("order_summary.total_label")})}),e(tn,{children:e(R,{level:1,children:t.formatCurrency(n.checkoutTotal.amount,{currency:n.checkoutTotal.currencyCode,form:"short"})})})]}),r&&e(Er,{})]})}function Hl({details:n,open:t,onClose:a,onAfterHide:r}){const{i18n:o}=v();return e(Ar,{id:`order-modal-${n.shopId}`,open:t,onHide:a,onAfterHide:r,heading:n.shopName?o.translate("thank_you.thank_you_from_shop",{shop_name:n.shopName}):o.translate("thank_you.thank_you_from_other_store"),size:"base",children:e(Vt,{children:e(y,{gap:"base",children:[e(z,{children:e(Bl,{deliveryLines:"deliveryLines"in n?n.deliveryLines:void 0,merchandiseItems:n.merchandiseItems})}),e(Ze,{}),e(z,{children:e(Ul,{details:n})}),"orderConfirmationNumber"in n&&n.orderConfirmationNumber&&e(k,{color:"subdued",children:o.translate("order_summary.confirmation_number_label",{confirmation_number:n.orderConfirmationNumber})}),"trackingUrl"in n&&n.trackingUrl&&e(_e,{variant:"primary",size:"base",inlineSize:"fill",onClick:n.trackingUrl?()=>window.open(n.trackingUrl,"_blank"):void 0,children:e(y,{direction:"inline",gap:"small-200",alignItems:"center",children:[e(k,{children:o.translate("thank_you.track_your_order_link_text")}),e(ie,{type:"external",size:"small"})]})})]})})})}function vn(){const n=D().contactInfo;return C(()=>{const t=n.value,a=t?.email!=null&&t?.email.length>0,r=t?.phone!=null&&t?.phone.length>0;return{confirmWithEmail:a,confirmWithPhone:r}})}function zl({itemCount:n}){const{i18n:t}=v(),{confirmWithEmail:a,confirmWithPhone:r}=vn().value,o=n>1,i=(()=>
1{if(a)return o?t.translate("thank_you.thank_you_confirmed_with_email_description.multi_store"):t.translate("thank_you.thank_you_confirmed_with_email_description.single_store");if(r)return o?t.translate("thank_you.thank_you_confirmed_with_phone_description.multi_store"):t.translate("thank_you.thank_you_confirmed_with_phone_description.single_store")})();return e(Ln,{tone:"info",iconHidden:!0,heading:t.translate("thank_you.confirmed"),children:e(w,{children:i})})}function Yl({itemCount:n}){const{i18n:t}=v();return e(Ln,{tone:"critical",heading:t.translate("thank_you.thank_you_unconfirmed_items_heading",{count:n}),children:e(w,{children:t.translate("thank_you.thank_you_unconfirmed_items_description",{count:n})})})}function _t({status:n,detailsList:t}){const a=ee(null),r=ee(!1),{shop:o,i18n:i}=v(),s=o.hasFlagEnabled(ce),l=!!xe()?.some(p=>p.status==="failed"),c=o.hasFlagEnabled(mo);if(!t.length)return null;const u=n==="confirmed",d=t[0].status==="failed"?t[0].recoveryUrl:void 0,m=t.find(p=>p.shopId===a.value);return e(x,{children:[e(z,{overflow:"hidden",colorLayer:s?void 0:"control",children:e(y,{gap:"base",children:[e(ql,{isConfirmed:u,hasFailedRemoteCheckouts:l,detailsList:t}),t.map((p,h)=>{const _=h===t.length-1;return e(y,{gap:"base",children:[e(Ol,{primaryText:e(y,{direction:"inline",gap:"small-400",children:[e(Ce,{textDecoration:"none",onClick:()=>{a.value=p.shopId,r.value=!0},children:i.translate("thank_you.thank_you_item_label",{count:p.quantity??0})}),e(k,{children:Rr}),e(k,{children:p.shopName||i.translate("thank_you.thank_you_from_other_store")})]}),secondaryText:$l({details:p,i18n:i}),orderAmount:p.checkoutTotal,thumbnailUrl:p.merchandiseItems?.[0]?.image?.url,thumbnailAlt:p.merchandiseItems?.[0]?.image?.altText,...p.status==="failed"?Wl({details:p,i18n:i,isSingleCheckoutButtonEnabled:c}):Vl({details:p,i18n:i})}),!_&&e(Lr,{below:"small",children:e(Ze,{direction:"inline",borderWidth:"base"})})]},p.shopId)}),!u&&c&&d&&e(_e,{onClick:()=>window.open(d,"_blank"),inlineSize:"fill",variant:"primary",children:e(H,{gridAutoFlow:"column",gridAutoColumns:"minmax(auto, max-content)",gridTemplateColumns:"minmax(auto, max-content)",gridTemplateRows:"minmax(0, 1fr)",gap:"small-400",alignItems:"center",alignContent:"center",children:[e(k,{children:i.translate("thank_you.checkout_again")}),e(ie,{type:"external",size:"small"})]})})]})}),m&&e(Hl,{open:r.value,onClose:()=>r.value=!1,onAfterHide:()=>a.value=null,details:m})]})}function ql({isConfirmed:n,hasFailedRemoteCheckouts:t,detailsList:a}){if(n)return t?e(zl,{itemCount:a.length}):null;const r=a.filter(o=>o.status==="failed").reduce((o,i)=>o+(i.quantity||0),0);return e(Yl,{itemCount:r})}function $l({details:n,i18n:t}){if(n.status==="failed")return t.translate("payment_errors.generic_error");if("orderConfirmationNumber"in n&&n.orderConfirmationNumber)return t.translate("order_summary.confirmation_number_label",{confirmation_number:n.orderConfirmationNumber})}function Vl({details:n,i18n:t}){return{buttonText:n.shopName?t.translate("thank_you.checkout_on_remote_shop_link_text",{remoteShopName:n.shopName}):t.translate("thank_you.checkout_on_another_store")}}function Wl({details:n,i18n:t,isSingleCheckoutButtonEnabled:a}){return a?{checkoutUrl:void 0,buttonText:void 0}:{checkoutUrl:n.recoveryUrl,buttonText:n.shopName?t.translate("thank_you.checkout_on_remote_shop_link_text",{remoteShopName:n.shopName}):t.translate("thank_you.checkout_on_another_store")}}function Gl(){const n=On();return C(()=>{const t=n.value.filter(Xe);if(!t.length)return;const[{methods:[{costAfterDiscounts:{currencyCode:a}}]}]=t;return{amount:t.reduce((o,i)=>{const s=i.methods?.find(({handle:l})=>l===i.selectedDeliveryMethodHandle);return s?o+(s.costAfterDiscounts.amount??0):o},0),currencyCode:a}})}function Kl(){const n=Q(),t=_o(),a=ta();return C(()=>{const r=n?.purchaseOrder.paymentDue,o=n?.checkoutTotal;return yo({paymentDue:r,checkoutTotal:o,orderDeposit:a.value,hasFixedSellingPlan:t.value})})}function yt(n){return n?.length?n.reduce((t,a)=>t+a.quantity,0):0}function jl(n){if(n?.length)return n.reduce((t,a)=>a.lineAmount?{amount:(t?.amount||0)+a.lineAmount.amount,currencyCode:a.lineAmount.currencyCode}:t,void 0)}function Ql(n){return n.map(({stableId:a,title:r,subtitle:o,image:i,quantity:s,totalPrice:l})=>a?{id:a,title:r,subtitle:o||void 0,image:i?.url?{url:i.url,altText:i.altText||void 0}:void 0,quantity:s,totalPrice:l}:null).filter(a=>a!==null)}function gt(n){return n.map(({stableId:a,title:r,productTitle:o,image:i,quantity:s,price:l})=>({id:a,title:o,subtitle:r||void 0,image:i?{url:i.url,altText:i.altText||void 0}:void 0,quantity:s,totalPrice:l})).filter(a=>a!==null)}function Zl(){const n=xe(),{shop:{name:t,id:a,brandSettings:r,remoteShopsConfigMap:o}}=v(),{totalLineQuantities:i}=Wt(),s=Kl(),l=Q(),c=xr(),d=D().taxes.value,{value:m}=oa("ONE_TIME_PURCHASE"),p=Fn(m),h=On(),_=Gl();return he(()=>{const b=[],g=[];if(!n?.length)return{confirmedShops:[],failedShops:[]};if(i&&i>0){const f=Ql(c)||[],S=d&&d.status==="available_total"?d.totalTax:void 0,T={shopId:a,shopName:t,shopLogo:r?.squareLogo?.url,quantity:i,checkoutTotal:s.value,merchandiseItems:f,subtotal:l?.subtotal,estimatedTaxes:S,shippingTotal:_.value,deliveryMethodHandle:p?.title,orderConfirmationNumber:l?.orderIdentity?.buyerIdentifier||void 0,trackingUrl:l?.orderStatusPageUrl||void 0,deliveryLines:h.value,status:"confirmed"};b.push(T)}
1return n?.length&&n.forEach(f=>{if(f.status==="submitted"){const{orderIdentity:{buyerIdentifier:S},orderStatusPageUrl:T,remotePurchaseOrder:{merchandiseLines:I,deliveryLines:P,checkoutTotal:L,subtotalBeforeTaxesAndShipping:M,tax:N}}=f,W={shopId:f.shopId,shopName:o?.get(f.shopId)?.name,shopLogo:o?.get(f.shopId)?.brandSettings?.squareLogo?.url,quantity:yt(I),checkoutTotal:L,subtotal:M,estimatedTaxes:N,shippingTotal:jl(P),merchandiseItems:gt(I)||[],deliveryMethodHandle:P?.[0]?.title,orderConfirmationNumber:S||void 0,trackingUrl:T||void 0,status:"confirmed"};b.push(W)}if(f.status==="failed"){const{recoveryUrl:S,merchandiseLines:T,checkoutTotal:I,subtotalBeforeTaxesAndShipping:P,tax:L}=f,M={shopId:f.shopId,shopName:o?.get(f.shopId)?.name,shopLogo:o?.get(f.shopId)?.brandSettings?.squareLogo?.url,quantity:yt(T),checkoutTotal:I,subtotal:P,estimatedTaxes:L,merchandiseItems:gt(T)||[],recoveryUrl:S,status:"failed"};g.push(M)}}),{confirmedShops:b,failedShops:g}},[n,a,t,i,s.value,l,r?.squareLogo?.url,o,c,d,p,h.value,_.value])}function Xl(){const{confirmedShops:n,failedShops:t}=Zl(),a=!!t?.length,r=!!n?.length;return!r&&!a?null:e(y,{gap:"base",children:[a?e(Dl,{confirmedShops:n,failedShops:t}):null,r?e(_t,{status:"confirmed",detailsList:n}):null,a?e(_t,{status:"failed",detailsList:t}):null]})}const Jl=()=>{const{i18n:n}=v();return e(y,{padding:"base",children:e(R,{children:n.translate("thank_you.offers.title")})})},ft=(n,t=Z)=>{if(n.origin!=="https://shop.app"||n.data===void 0||n.data.type!=="redirect")return;const a=n.data.redirect_to;if(a===void 0)return;const r=new URL(a);`${r.protocol}//${r.hostname}`=="https://shop.app"&&(n.data.open_in_new_tab!==void 0&&n.data.open_in_new_tab===!0&&typeof t.open=="function"?t.open(a,"_blank","noopener,noreferrer"):t.location.href=a)},ec=({shopId:n,personalizeAds:t,placement:a,checkoutToken:r,orderId:o,hideButtons:i,hideHeader:s,accentColor:l,darkMode:c})=>{const u=G(null);U(()=>{const m=h=>{h.origin==="https://shop.app"&&clearTimeout(p)},p=setTimeout(()=>{u.current?.iframeRef?.current&&(u.current.iframeRef.current.style.height="0px")},2e3);return Z.addEventListener("message",ft),Z.addEventListener("message",m),()=>{Z.removeEventListener("message",ft),clearTimeout(p)}},[]);const{authorizeUrl:d}=ri({avoidPayAltDomain:!0,avoidSdkSession:!0,analyticsContext:"shopCashOffers",proxy:!0,locale:void 0,flow:"shop_cash_offers",redirectType:"iframe",responseType:"code",clientId:"",shopId:n,personalizeAds:t,placement:a,checkoutToken:r,orderId:o,hideButtons:i,hideHeader:s,accentColor:l,darkMode:c});return e(oi,{proxy:!0,insideModal:!1,ref:u,src:d,scrolling:"no",variant:"default"})},nc=()=>pa(({element:n,...t})=>e(_a,{element:n,featureName:"ShopCashOffers",children:e(ha,{children:e(ma,{children:e(ti,{children:e(ai,{children:e(ec,{...t})})})})})}),{name:"shop-cash-offers",props:{shopId:"number",personalizeAds:"boolean",placement:"string",orderId:"number",checkoutToken:"string",hideButtons:"boolean",hideHeader:"boolean",accentColor:"string",darkMode:"boolean"},shadow:"open"});function tc(){const{shop:n}=v(),t=n.hasFlagEnabled(go),{colors:{global:a,schemes:r={}}}=Gt(),{main:o}=En(),i=r[o.colorScheme??"scheme1"],s=o.section?.colorScheme?r[o.section.colorScheme]:void 0,l=t?an(s,a?.control)??an(i,a?.control)??an(r.scheme1,a?.control):an(i),c=l===void 0?t:bt(l),u=a?.accent,d=u!==void 0&&c!==bt(u);return{...c?null:{dark_mode:"true"},...d?{accent_color:u.toRgb()}:null}}function an(n,t){if(n==null)return;const a=n.control?.background??t;return a==null||fo(a)?n.base?.background:a}function bt(n){return typeof n>"u"?!1:n.getYiqPerceivedBrightness()>=.65}const vt=new URL("https://shop.app"),kt=String(!0),St="thank_you",ac="https://shop.app/offers-compact",rc="211px",Ct="100%";function oc(n,t){const a=new URL(n).toString(),r=new URLSearchParams(t).toString();return`${a}?${r}`.toString()}const ic=rr(({shopId:n,personalizeAds:t,preview:a,orderId:r,checkoutSessionIdentifier:o,setHeight:i},s)=>{const l=String(t),c=tc(),{i18n:u,observability:d,url:m}=v(),p=G(null),h=G(null),_=()=>p.current?.shadowRoot?.querySelector("iframe")??h.current,b=!!r||a;if(U(()=>{const g={type:b?"iframe":"shop-js-iframe"};d.counter({name:"shop_ads_2p_rail_render_started",value:1,attributes:g}),d.log("shop_ads_2p_rail_render_started","shop_ads_2p_rail_render_started",{...g})},[b,d]),U(()=>{const g=f=>{if(f.origin!==vt.origin)return;const S=f?.data?.type,T=f?.data?.redirect_to;
1if(S==="resize_iframe"){let I=f?.data?.height;const P=f?.data?.width;if(typeof I=="number"&&typeof P=="number"){I=I>0?I:0,i(I);const L={type:I>0?"with_content":"without_content"};d.counter({name:"shop_ads_2p_rail_resize",value:1,attributes:L}),d.log("shop_ads_2p_rail_resize","shop_ads_2p_rail_resize",{height:I,width:P,...L});const M=_();M&&(M.style.height=`${I}px`,M.style.width=Ct)}}else if(b&&S==="redirect"&&T!==void 0){const I=new URL(T);(I.origin===vt.origin||I.origin===new URL(m.storefront()).origin)&&(f.data.open_in_new_tab!==void 0&&f.data.open_in_new_tab===!0?window.open(T,"_blank","noopener,noreferrer"):window.location.assign(T))}};return window.addEventListener("message",g),()=>{window.removeEventListener("message",g)}},[b,i,d,m]),or(s,()=>({iframeElement:_}),[]),b){const g=oc(ac,{shop_id:String(n),placement:St,hide_header:kt,personalize_ads:l,merchant_url:m.storefront(),...a?{preview:String(a)}:null,...r?{order_id:String(r)}:null,...o?{checkout_token:o}:null,...c});return e("iframe",{ref:h,id:"offers",title:u.translate("thank_you.offers.title"),src:g,width:Ct,height:rc,scrolling:"no"})}else return typeof window<"u"&&typeof customElements<"u"&&!customElements.get("shop-cash-offers")&&nc(),e("shop-cash-offers",{"shop-id":n,"personalize-ads":l,"hide-header":kt,"dark-mode":c.dark_mode,"accent-color":c.accent_color,placement:St,"order-id":r,"checkout-token":o,ref:p})});function sc({preview:n}){const{shop:t,source:{checkoutSessionIdentifier:a},consentManager:r}=v(),{id:o}=t,i=parseInt(je(o),10),s=r.saleOfDataAllowed.value&&r.marketingAllowed.value,[l,c]=oe(),u=t.hasFlagEnabled(ce),d=Q(),m=d?.orderIdentity.id?ia(d.orderIdentity.id):void 0,p=G(null);return e(z,{colorLayer:u?void 0:"control",display:l===0?"none":"block",children:[e(Jl,{}),e(ic,{checkoutSessionIdentifier:a,orderId:m,personalizeAds:s,shopId:i,ref:p,setHeight:c,preview:n})]})}const pn=(n,t)=>{try{const a=new URL(n.replace(/\/$/,""));return Object.entries(t).forEach(([r,o])=>{a.searchParams.append(r,o)}),a.toString()}catch{return n}},rn=102,lc=32,cc=20,uc=n=>e("svg",{xmlns:"http://www.w3.org/2000/svg",width:32,height:32,viewBox:"0 0 318 350",...n,children:e("path",{d:"M9.267 33.017C37.148 13.574 77.319 0 120.113 0c114.074 0 197.039 77.132 197.039 182.787 0 98.501-
171.299 167.213-170.479 167.213C61.764 350 .848 292.972.848 216.482c0-51.855 31.182-90.1 75.205-104.994l35.641 60.274c-23.975 11.006-33.018 27.221-33.018 47.307 0 33.017 27.881 56.404 68.052 56.404 49.269 0 88.156-38.905 88.156-91.402 0-61.577-48.608-108.223-114.716-108.223a132.56 132.56 0 0 0-73.243 21.388z"})}),dc="gTxFI",pc="kfcrU",Tt={Container:dc,overlay:pc},hc="white";function xa({color:n="branded",containerSize:t=lc,iconSize:a=cc,backgroundColor:r=hc,overlay:o=!1}){const i=n==="branded"?bn.toRgb():n;return e("div",{className:F(Tt.Container,o?Tt.overlay:""),style:{backgroundColor:r,height:t,width:t,borderRadius:"10px"},children:e(uc,{"aria-hidden":"true",style:{fill:i},height:a,width:a})})}const mc="_3nOgQ",_c="NmBBp",yc="_0wOrq",gc="I6KnV",fc="e1FkT",bc="Ww91E",vc="sCXu3",kc="iIHiG",Sc="oacnN",Cc="_8Slfk",Tc="_2i0qK",Ic="xjUvL",Pc="Iiyyo",re={Root:mc,Ready:_c,Track:yc,Fill:gc,FillDelivered:fc,Rail:bc,Marker:vc,StageIcon:kc,Confirmed:Sc,Delivered:Cc,InTransit:Tc,OutForDelivery:Ic,CheckPath:Pc},wc=Dn("tracking-delivered-gradient-");function Ec(){return e("svg",{"aria-hidden":"true",viewBox:"0 0 40 40",children:[e("circle",{cx:"20",cy:"20",fill:"#000",r:"20"}),e("path",{className:re.CheckPath,d:"m12.25 20.5 5 5 10.5-12",fill:"none",stroke:"white",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"3.25"})]})}function Mc(){const n=xn(void 0,wc);return e("svg",{"aria-hidden":"true",viewBox:"0 0 40 40",children:[e("defs",{children:e("linearGradient",{id:n,x1:"0",x2:"1",children:[e("stop",{offset:"0",stopColor:"#3ccd7f"}),e("stop",{offset:"1",stopColor:"#56bc39"})]})}),e("circle",{cx:"20",cy:"20",fill:`url(#${n})`,r:"20"}),e("path",{clipRule:"evenodd",d:"M12.5914 21.8064 12.5926 21.8055 12.5944 21.8042 12.6 21.8001 12.6185 21.7863C12.6341 21.7746 12.6562 21.758 12.6844 21.7365 12.7406 21.6937 12.8211 21.6316 12.9223 21.5514 13.1245 21.3909 13.4102 21.1574 13.7514 20.8594 14.4326 20.2647 15.3426 19.407 16.2553 18.3551 18.0477 16.2895 20 13.3052 20 10 20 5.58172 16.4183 2 12 2 7.58172 2 4 5.58172 4 10c0 3.3052 1.95225 6.2895 3.74471 8.3551.91273 1.0519 1.82269 1.9096 2.50389 2.5043.3412.298.6269.5315.8291.692.1012.0802.1817.1423.2379.1851.0282.0215.0503.0381.0659.0498l.0185.0138.0056.0041.0025.0018c.352.2582.8313.2585 1.1833.0004ZM11.9978 12.5A2.5 2.5 0 1 0 11.9978 7.5a2.5 2.5 0 0 0 0 5Z",fill:"white",fillRule:"evenodd",transform:"translate(8 8)"})]})}function Ac({animate:n=!0}={}){return e("div",{"aria-hidden":"true",className:F(re.Root,{[re.Ready]:n}),children:e("div",{className:re.Track,children:[e("span",{className:re.Fill}),e("span",{className:re.FillDelivered}),e("span",{className:re.Rail}),e("span",{className:re.Marker,children:[e("span",{className:F(re.StageIcon,re.Confirmed),children:e(Ec,{})}),e("span",{className:F(re.StageIcon,re.InTransit)}),e("span",{className:F(re.StageIcon,re.OutForDelivery)}),e("span",{className:F(re.StageIcon,re.Delivered),children:e(Mc,{})})]})]})})}const Rc=n=>e("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 393 63",...n,children:[e("path",{fill:"currentColor",d:"M57.69 28.063q.963 0 1.827.357a4.1 4.1 0 0 1 1.527 1.095q.672.74 1.054 1.901.382 1.154.382 2.781v.017q0 2.016-.581 3.453-.581 1.435-1.669 2.208-1.079.763-2.581.763-1.104 0-1.992-.398a4.1 4.1 0 0 1-1.461-1.112 3.9 3.9 0 0 1-.772-1.627l-.017-.092h2.1l.034.083q.157.415.448.73.299.316.714.49.423.167.946.167.945 0 1.544-.556.605-.566.905-1.503a7.7 7.7 0 0 0 .348-2.092q.009-.124.009-.24v-.241l-.374-2q0-.681-.315-1.238a2.4 2.4 0 0 0-.855-.88 2.27 2.27 0 0 0-1.204-.323 2.3 2.3 0 0 0-1.187.315q-.54.315-.863.864a2.3 2.3 0 0 0-.324 1.212v.016q0 .697.307 1.237.307.531.838.838.532.308 1.212.308t1.22-.3.856-.83.315-1.203v-.017h.498v2.208h-.29a2.9 2.9 0 0 1-.64.88q-.422.407-1.046.656-.613.249-1.444.249-1.146 0-2.025-.515a3.73 3.73 0 0 1-1.386-1.41q-.498-.898-.498-2.026v-.017q0-1.22.564-2.166a4 4 0 0 1 1.577-1.494q1.013-.549 2.3-.548m8.559 10.666a1.3 1.3 0 0 1-.947-.373 1.28 1.28 0 0 1-.373-.93q0-.555.373-.93.382-.381.947-.382.572 0 .946.382.373.375.373.93 0 .547-.373.93-.375.373-.946.373m0-6.159a1.3 1.3 0 0 1-.947-.373 1.28 1.28 0 0 1-.373-.93q0-.555.373-.93.382
1-.381.947-.382.572 0 .946.382.373.375.373.93 0 .547-.373.93-.375.373-.946.373m9.579 7.77v-2.3h-5.86v-1.75l.946-1.619a155 155 0 0 1 1.959-3.22q.497-.798.987-1.57.498-.78.996-1.518h3.014v7.91h1.618v1.768H77.87v2.3zm-3.868-4.018h3.9v-6.25h-.124q-.365.564-.755 1.162-.382.597-.772 1.22t-.772 1.253q-.381.622-.755 1.254-.374.623-.722 1.236zm12.484 4.018v-9.87h-.15l-2.98 2.1v-2.009l3.13-2.2h2.133V40.34z"}),e("rect",{width:24,height:12,x:334,y:28.5,stroke:"currentColor",opacity:.35,rx:3.8}),e("path",{fill:"currentColor",d:"M359.5 32.781v4.076a2.21 2.21 0 0 0 1.328-2.038c0-.89-.523-1.693-1.328-2.038",opacity:.4}),e("rect",{width:21,height:9,x:335.5,y:30,fill:"currentColor",rx:2.5}),e("path",{fill:"currentColor",fillRule:"evenodd",d:"M317.771 31.104c2.487 0 4.879.922 6.681 2.576a.355.355 0 0 0 .487-.004l1.297-1.263a.34.34 0 0 0 .105-.248.34.34 0 0 0-.108-.246c-4.731-4.375-12.195-4.375-16.926 0a.35.35 0 0 0-.108.246c0 .093.037.182.105.248l1.298 1.263c.133.13.35.131.486.004 1.803-1.654 4.195-2.576 6.683-2.576m-.004 4.22c1.357 0 2.666.512 3.672 1.436a.344.344 0 0 0 .484-.006l1.287-1.32a.367.367 0 0 0-.005-.519 7.9 7.9 0 0 0-10.873 0 .367.367 0 0 0-.005.52l1.287 1.319a.34.34 0 0 0 .483.006 5.43 5.43 0 0 1 3.67-1.436m2.525 2.794a.4.4 0 0 1-.103.28l-2.177 2.455a.32.32 0 0 1-.241.113.32.32 0 0 1-.242-.113l-2.177-2.455a.4.4 0 0 1-.102-.28.4.4 0 0 1 .113-.276c1.39-1.314 3.426-1.314 4.816 0 .07.07.111.17.113.276M301.7 29.682c0-.633-.478-1.146-1.067-1.146h-1.066c-.589 0-1.067.513-1.067 1.146v9.934c0 .633.478 1.146 1.067 1.146h1.066c.589 0 1.067-.513 1.067-1.146zm-7.434 1.3h1.067c.589 0 1.066.525 1.066 1.173v7.434c0 .648-.477 1.173-1.066 1.173h-1.067c-.589 0-1.067-.525-1.067-1.173v-7.434c0-.648.478-1.174 1.067-1.174m-4.332 2.648h-1.067c-.589 0-1.066.532-1.066 1.189v4.755c0 .656.477 1.188 1.066 1.188h1.067c.589 0 1.067-.532 1.067-1.188v-4.755c0-.657-.478-1.189-1.067-1.189m-5.301 2.445h-1.066c-.589 0-1.067.525-1.067 1.172v2.344c0 .647.478 1.171 1.067 1.171h1.066c.589 0 1.067-.524 1.067-1.171v-2.344c0-.647-.478-1.172-1.067-1.172",clipRule:"evenodd"})]}),Lc="RqWCL",xc="vcF4y",Dc="Z7YHY",Oc="U17Bl",Nc="XiB25",Bc="rRjrG",Fc="nm5oZ",Uc="pXsW1",Hc="XAh5C",zc="rjvR4",ve={Phone:Lc,PhoneReady:xc,Screen:Dc,StatusBar:Oc,Clock:Nc,Island:Bc,Banner:Fc,AppIcon:Uc,Copy:Hc,Time:zc},Yc=28,qc=17;function It(n,t){return new Intl.DateTimeFormat(t,{hour:"numeric",minute:"2-digit"}).formatToParts(n).filter(({type:a})=>a!=="dayPeriod").map(({value:a})=>a).join("").trim()}function $c(n){const t=new Date(n),a=n.getHours(),r=a>=20?"tomorrow":"today";return a>=20||a<9?(a>=20&&t.setDate(t.getDate()+1),t.setHours(9,0,0,0)):t.setHours(t.getHours()+1,0,0,0),{day:r,time:t}}function Vc({animate:n=!0,title:t,body:a,time:r,now:o}={}){const{i18n:i}=v(),s=o?It(o,i.locale):"",l=o?$c(o):void 0,c=l?It(l.time,i.locale):"";let u="";return l?.day==="today"?u=i.translate("thank_you.qr_code.phone_banner.body_today",{time:c}):l&&(u=i.translate("thank_you.qr_code.phone_banner.body_tomorrow",{time:c})),e("div",{"aria-hidden":"true",className:F(ve.Phone,{[ve.PhoneReady]:n}),children:e("div",{className:ve.Screen,children:[e("div",{className:ve.StatusBar,children:[e(Rc,{"aria-hidden":"true"}),e("span",{className:ve.Clock,dir:"auto",children:s}),e("span",{className:ve.Island})]}),e("div",{className:ve.Banner,children:[e("span",{className:ve.AppIcon,children:e(xa,{backgroundColor:bn.toRgb(),color:"white",containerSize:Yc,iconSize:qc})}),e("span",{className:ve.Copy,children:[e("strong",{dir:"auto",children:t??i.translate("thank_you.qr_code.phone_banner.title")}),e("span",{dir:"auto",children:a??u})]}),e("span",{className:ve.Time,dir:"auto",children:r??i.translate("thank_you.qr_code.phone_banner.time")})]})]})})}const Wc="HLHdp",Gc="E1A3F",Kc="_2gHo1",Cn={PhoneReveal:Wc,PhoneRevealReady:Gc,BarReveal:Kc};function jc({treatment:n,isReady:t=!0,now:a}){return n==="phone"?e("div",{"aria-hidden":"true",className:F(Cn.PhoneReveal,{[Cn.PhoneRevealReady]:t}),children:e(Vc,{animate:t,now:a})}):e("div",{"aria-hidden":"true",className:Cn.BarReveal,children:e(H,{accessibilityVisibility:"hidden",gridTemplateRows:t?"1fr":"0fr",overflow:"hidden",children:e(Ac,{animate:t})})})}const Qc="eB1Wk",Zc="Ipunz",Xc="F0OjS",Jc="_3ne1k",eu="_5eMgt",nu="WYqsK",tu="smgwg",au="v7JCj",ru="cnARA",ou="UIp5B",iu="IATLg",su="JN61f",lu="JwOzi",de={QrCodeSkeleton:Qc,QrC
1ode:Zc,QrCodeLoaded:Xc,Popover:Jc,StyledQrPopover:eu,TrackingPopover:nu,PopoverContent:tu,PhonePopoverContent:au,PopoverContentStack:ru,TrackingPopoverContent:ou,PopoverCopy:iu,QrCodeCopy:su,TrackingHeadline:lu},cu=[cn.Bar,cn.Phone];function uu(n){return cu.includes(n??"")}function du(n){const t=ee(void 0);return U(()=>{if(!n)return;let a;const r=()=>{t.value=new Date},o=6e4-Date.now()%6e4;r();const i=window.setTimeout(()=>{r(),a=window.setInterval(r,6e4)},o);return()=>{window.clearTimeout(i),a!==void 0&&window.clearInterval(a)}},[n,t]),t.value}function pu({link:n,label:t,message:a,installCampaign:r,styledQrCode:o,onQrCodeInteraction:i}){const{i18n:s,observability:l}=v(),c=Oe(),u=ee(!1),d=G(null),m=G(0),p=ee(!1),h=ee(!1),_=Kt(),b=!u.value,g=h.value,f=u.value&&g,S=r?.variant,T=uu(S),I=T?a?.subtitle:a?.title,P=T?void 0:a?.subtitle,L=K(()=>{i?.()},[i]),M=K(()=>{u.value=!0,d.current!==null&&(l.histogram({name:"qr_code_load_time",value:Math.round(performance.now()-d.current),unit:"ms",attributes:{page:"thank_you"}}),d.current=null)},[l,u]),N=S===cn.Phone,W=du(N),$=K(()=>{h.value=!0,m.current+=1,!u.value&&d.current===null&&(d.current=performance.now())},[h,u]),Y=K(()=>{h.value=!1,p.value=!1},[p,h]);U(()=>{if(!(!g||!I))return Dr({content:I})},[g,I]),U(()=>{_&&f&&(p.value=!0)},[p,_,f]);const X=O=>{g&&!p.value&&O.propertyName==="filter"&&(p.value=!0)};return e(A,{children:e(ga,{impressionType:"download_shop_button",impressionFeatures:["desktop","qr_code"],children:e(_e,{inlineSize:c?"fill":void 0,onClick:L,overlay:e(pi,{theme:{popover:{cornerRadius:20}},children:e(yi,{keepMounted:!0,padding:"none",positionArea:"inline-end",onHide:Y,onShow:$,children:e(A,{className:F(de.Popover,{[de.TrackingPopover]:T,[de.StyledQrPopover]:o}),children:e(A,{padding:"none",className:F(de.PopoverContent,{[de.TrackingPopoverContent]:T,[de.PhonePopoverContent]:N}),children:e(y,{gap:"none",className:de.PopoverContentStack,children:[e(H,{gridTemplateColumns:"auto minmax(0, 1fr)",columnGap:"none",children:[e(H,{gridTemplateColumns:"1fr",children:[b?e(A,{className:de.QrCodeSkeleton,children:e(De,{contentDisplay:"block",inlineSize:"100%",blockSize:"100%"})}):null,e(A,{className:F(de.QrCode,{[de.QrCodeLoaded]:f}),padding:"none",onTransitionEnd:X,children:[o?e("img",{src:n,height:rn,width:rn,alt:s.translate("thank_you.qr_code.iframe_title"),"aria-hidden":b,onLoad:M}):e(gi,{src:n,height:rn,width:rn,title:s.translate("thank_you.qr_code.iframe_title"),"aria-hidden":b,onLoad:M}),o?null:e(xa,{overlay:!0})]})]}),e(A,{children:e(H,{gridTemplateColumns:"1fr",blockSize:"100%",children:e(A,{className:de.QrCodeCopy,children:e(y,{gap:"none",className:de.PopoverCopy,children:[e(A,{className:F({[de.TrackingHeadline]:T}),children:I?e(R,{level:3,children:I}):null}),P?e(w,{children:e(Me,{children:P})}):null]})})})})]}),T?e(jc,{isReady:p.value,treatment:S,now:W},m.current):null]})})})})}),children:t})})})}const Pt="order_status_page";class hu extends Error{constructor(){super(...arguments),this.name="ShopMobileClipboardInteractionError"}}function mu({label:n,link:t,onClipboardInteraction:a}){const r=Ae(),o=gn(),{observability:i,mobileCheckoutSdk:s,embed:l}=v(),c=Oe(),u=s.variant.isStandard()||l?.isCheckoutKit();if(!r)return null;const d=r?.mobileUrlAttributionPayload,m=o.value.defaultAttributes?.visitToken;return e(A,{children:e(ga,{impressionType:"download_shop_button",impressionFeatures:["mobile"],children:e(_e,{inlineSize:c?"@media (inline-size >= medium) auto, fill":void 0,onClick:async()=>{try{const b=_(d,m);await zt(b)}catch(b){b instanceof Error&&i.error(new hu(b.message,{cause:b}))}finally{a?.();const b=h(t,m);window.location.href=b}},children:n})})});function h(b,g){const f=new URL(b);return g&&f.searchParams.set("sid",g),u&&f.searchParams.set("open_externally","true"),f.toString()}function _(b,g){return g?`${b},${g},${Pt}`:`${b},,${Pt}`}}function Da({label:n,message:t,mobileLinkToShop:a,desktopLinkToShop:r,styledQrCode:o,installCampaign:i,onClipboardInteraction:s,onQrCodeInteraction:l}){return bo()?e(mu,{label:n,link:a,onClipboardInteraction:s}):e(pu,{label:n,link:r,message:t,styledQrCode:o,installCampaign:i,onQrCodeInteraction:l})}const wt="installments_order",_u="open.shop.app";function yu(){const{i18n:n}=v(),t=Ae(),{track:a}=Te("shop_pay_installments_highlight_button");if(U(()=>{t&&a("shop_button_rendered")},[t,a]),!t)return null;const{shopInstallmentsMobileUrl:r,qrCodeUrl:o}=t,i={title:n.translate("installments.installments_highlight_qr_flow_modal.title"),subtitle:n.translate("installments.installments_highlight_qr_flow_modal.subtitle")}
1,s=pn(r,{utm_content:wt}),l=pn(o,{link_provider:_u,utm_content:wt});return e(Da,{label:n.translate("installments.installments_highlight_shop_button_get_reminders"),message:i,desktopLinkToShop:l,mobileLinkToShop:s,onClipboardInteraction:()=>{a("arrive")},onQrCodeInteraction:()=>{a("arrive_show_qr_code")}})}function gu(){const{i18n:n,shop:t}=v(),a=t.hasFlagEnabled(ce),r=n.translate("installments.installments_highlight_headline");return e(z,{accessibilityLabel:r,colorLayer:a?void 0:"control",children:e(y,{gap:"large-200",children:[e(R,{children:r}),e(y,{gap:"base",children:[e(w,{children:e(Me,{children:n.translate("installments.installments_highlight_copy")})}),e(yu,{})]})]})})}function Et({shipmentGroups:n,title:t,subtitle:a,subtitleIcon:r,address:o,addressHeading:i,modalHeader:s}){const{shop:l}=v(),c=l.hasFlagEnabled(ce);return e(z,{overflow:"hidden",colorLayer:c?void 0:"control",children:e(y,{gap:"base",children:[e(y,{gap:"small-200",children:[e(R,{level:2,children:t}),a&&e(y,{direction:"inline",gap:"small-400",alignItems:"center",children:[r&&e(ie,{type:r}),e(k,{color:"subdued",children:a})]})]}),n.map((u,d)=>e(bi,{merchandiseLines:u.merchandiseLines,deliveryMethod:u.deliveryMethod,deliveryMethodHandle:u.deliveryMethod.handle,modalHeader:s(d),showPrice:!1,showPriceInModal:!0,showDeliveryIcon:!1,choiceListContext:!1,isNotFirstLine:d>0,showDivider:!1,subtitle:u.deliveryMethod.pickupLocation?.type==="PickupInStoreLocation"?u.deliveryMethod.pickupLocation.instructions:void 0},u.id)),o&&e(y,{gap:"small-200",children:[e(R,{level:3,children:i}),e(Je,{address:o,multiline:!0})]})]})})}function fu(n,{i18n:t}){const a=n.filter(({selectedMethod:o})=>o.methodType==="PICK_UP");if(a.length===0)return;const[r]=a;return{shipmentGroups:a.map(({id:o,line:i,selectedMethod:s})=>({id:o,deliveryMethod:s,merchandiseLines:(i.targetMerchandiseLines??[]).filter(l=>l.requiresShipping)})),title:t.translate("delivery_options.pickup"),subtitle:t.translate("split_delivery.separate_pickup_email_notice"),address:r.selectedMethod.pickupLocation?.address,addressHeading:t.translate("thank_you.pick_up_in_store_marker.shipping"),modalHeader:()=>t.translate("delivery_options.pickup")}}function bu(n,{checkout:t,i18n:a,shop:r}){const{shippingAddress:o}=t.latestReceipt.value?.status==="processed"?t.latestReceipt.value.purchaseOrder:{},i=n.filter(({selectedMethod:m})=>m.methodType==="SHIPPING");if(i.length===0)return;const s=i.map(({line:m,selectedMethod:p})=>({line:m,method:p})),l=r.marketDrivenShippingEnabled?vi(i.map(({line:m})=>m),s):new Set,c=new Map;i.forEach((m,p)=>{const h=ca(m.selectedMethod,m.line.id??`index-${p}`);c.has(h)||c.set(h,m)});const u=zo(s).flatMap(({key:m,methods:p,merchandiseLines:h})=>{const _=c.get(m),b=p[0];if(!_||!b)return[];const f=p.find(S=>!l.has(S))??Yo(b);return[{id:_.id,deliveryMethod:f,merchandiseLines:h.filter(S=>S.requiresShipping)}]}),d=u.length;return{shipmentGroups:u,title:a.translate("order_summary.shipping_label"),subtitle:d>1?a.translate("shipping.split_shipping_multiple_shipment_notice_one_time_purchase",{quantity:d}):void 0,subtitleIcon:"truck",address:o,addressHeading:a.translate("thank_you.shipping_address_title"),modalHeader:m=>d===1?a.translate("order_summary.shipping_label"):a.translate("shipping.split_shipping_merchandise_shipment_number",{number:m+1,total:d})}}function vu(n){return n.status!=="filled"?[]:n.lines.filter(Xe).flatMap(t=>{const a=Fn(t);return a?[{id:t.id??vo(),line:t,selectedMethod:a}]:[]})}function ku(){const n=v(),{deliveryNext:t}=n.checkout.latestReceipt.value?.status==="processed"?n.checkout.latestReceipt.value.purchaseOrder??{}:{};if(!t)return null;const a=vu(t).filter(({line:i})=>i.type==="ONE_TIME_PURCHASE"),r=fu(a,n),o=bu(a,n);return e(y,{gap:"base",children:[r&&e(Et,{...r}),o&&e(Et,{...o})]})}function Su(){const{i18n:n,shop:t}=v(),a=t.hasFlagEnabled(ce),r=n.translate("shipping.shipping_method_title"),o=D().deliveryNext,i=qo(),s=ua(),l=mn(),c=C(()=>{const T=o.value;if(T?.status!=="filled")return[];const I=ko(T.lines).filter(Xe);return ra(I)}),u=C(()=>c.value.filter(({type:T})=>T==="ONE_TIME_PURCHASE")),d=C(()=>la(u.value).groups),m=C(()=>d.value.length),p=C(()=>c.value.filter(({type:T})=>T==="SUBSCRIPTION")),h=C(()=>p.value.length>0),_=C(()=>c.value.map(({methods:T})=>T[0]?.handle)),b=C(()=>n.translate("shipping.shipping_method_first_shipment_group_title",{count:m.value})),g=C(()=>h.value&&!i.value.showShipmentBreakdown&&!Ht(l.value.currentDetour)),f=C(()=>
1{if(h.value||s.value)return n.translate("shipping.split_shipping_multiple_shipment_notice");if(m.value>1)return n.translate("shipping.split_shipping_multiple_shipment_notice_one_time_purchase",{quantity:m.value})}),S=t.marketDrivenShippingEnabled&&ki(u.value);return e(E,{when:()=>o.value?.status==="filled",children:()=>e(Le,{target:"plain",children:e(z,{accessibilityLabel:r,children:e(y,{gap:"base",padding:"small-300 none none none",children:[e(y,{gap:"small-400",children:[e(R,{level:2,children:r}),e(E,{when:()=>i.value.showShipmentBreakdown,fallback:e(Cu,{multipleShipmentsHeading:f}),children:e(Ti,{})})]}),e(y,{gap:"large-200",children:[e(y,{gap:"small-200",children:[e(E,{when:g,children:()=>e(R,{level:3,children:b.value})}),e(Le,{target:"edgeToEdgeCard",children:e(z,{accessibilityRole:"presentation",colorLayer:a?void 0:"control",children:e(Si,{deliveryLines:c.value,selectedDeliveryMethodHandles:_.value,choiceListContext:!1,showGroupPrices:!S,shipmentGroups:d.value})})})]}),e(Ii,{subscriptionLines:p.value})]})]})})})})}function Cu({multipleShipmentsHeading:n}){return e(E,{when:n,children:t=>e(y,{direction:"inline",gap:"small-400",alignItems:"center",children:[e(ie,{type:"truck"}),e(k,{color:"subdued",children:t})]})})}function Tu(n){return n.some(t=>t.key==="_shopify_buyer_membership_key"&&t.value==="buy_with_prime")}const Mt="/cdn/shopifycloud/checkout-web/assets/c1/assets/envelope.C3KgH2Yk.svg",Iu="sv7SI",Pu="fF5mZ",wu="k3nMX",Eu="oMEEK",Mu="p3BjS",Ve={Backdrop:Iu,BackdropFill:Pu,BackgroundImage:wu,Content:Eu,Envelope:Mu};function Au({active:n,children:t,products:a,colorLayer:r}){const o=ee(new Set),[i]=a.filter(({src:l})=>l&&!o.value.has(l));function s(l){if(!(l.target instanceof HTMLImageElement))return;const c=l.target.getAttribute("src");c&&(o.value=new Set([...o.value,c]))}return e("div",{onErrorCapture:s,children:e(H,{children:[n?e(z,{accessibilityRole:"presentation",className:F(Ve.Backdrop,Se.ThankYouEntranceStatus),colorLayer:r,overflow:"hidden",children:e(A,{background:"subdued",className:Ve.BackdropFill,overflow:"hidden",position:"absolute",children:i?e(Ye,{alt:"",className:Ve.BackgroundImage,inlineSize:"auto",objectFit:"cover",src:i.src}):null})}):null,e(y,{alignItems:n?"center":void 0,className:Ve.Content,padding:n?"base":void 0,paddingBlockStart:n?"large-300":void 0,children:[n?e(y,{alignItems:"center",className:Se.ThankYouEntranceStatus,children:[i?e(_n,{src:i.src}):null,o.value.has(Mt)?null:e(A,{className:Ve.Envelope,inlineSize:"95px",children:e(Ye,{alt:"",aspectRatio:"95/102",src:Mt})})]}):null,e(A,{inlineSize:"100%",children:t})]})]})})}const Oa=Bt(void 0);function Na(){return Ft(Oa)}const Ru="Q3L2z",Lu="wpbKf",xu="_1H07Y",Tn={StaticMapContainer:Ru,StaticMapContainerWithOverlay:Lu,StaticMapOverlay:xu};function Du({src:n,title:t,overlayTitle:a,overlayLabel:r,overlay:o,onError:i}){const s=So();return e(E,{when:s,fallback:e(De,{contentDisplay:"block",aspectRatio:"2 / 1"}),children:e("div",{className:F(Tn.StaticMapContainer,{[Tn.StaticMapContainerWithOverlay]:!!o}),children:[e(Ye,{src:n,alt:t??"Map",loading:"lazy",objectFit:"cover",aspectRatio:"2/1",onError:i?()=>i():void 0}),r?e("div",{"aria-hidden":"true",className:Tn.StaticMapOverlay,children:e(y,{gap:"small-500",alignItems:"center",children:[a?e(k,{color:"subdued",type:"small",children:a}):null,e(k,{type:"strong",children:r})]})}):null,o]})})}function Ou(n,t){return n?t?n.dark:n.light:null}function Nu(){v();const n=Un(),t=Q();return Ou(t?.mapUrl,n)}const Bu="_1hWL4",Fu="l8QVy",Uu="pJQCE",Hu="_35R1C",zu="_9uLa0",Yu="_1w8la",qu="xQXew",$u="gj4N0",Vu="VImf6",Wu="_9CuNx",Gu="O8Seo",Ku="_01CKh",ju="KQs71",Qu="Ic4fS",Zu="IMQvT",Xu="_7hUKC",Ju="QZR8x",le={ProductMapMarker:Bu,"ProductMapMarker-borderColorBase":"Kv2J9","ProductMapMarker-borderColorCustom":"Wv7wJ","ProductMapMarker-badgeToneBase":"WtS0D","ProductMapMarker-badgeToneAccent":"GgkBH",ProductMapMarkerCards:Fu,ProductMapMarkerPin:Uu,ProductMapMarkerPinBody:Hu,ProductMapMarkerPinGlyph:zu,ProductMapMarkerLabel:Yu,ProductMapMarkerLabelEnter:qu,ProductMapMarkerCard:$u,ProductMapMarkerCardEnter:Vu,ProductMapMarkerCardPrimary:Wu,ProductMapMarkerCardShadowReveal:Gu,ProductMapMarkerCheckmark:Ku,ProductMapMarkerCheckmarkEnter:ju,ProductMapMarkerCheckmarkSvg:Qu,ProductMapMarkerCheckmarkPath:Zu,ProductMapMarkerCheckmarkPathDraw:Xu,ProductMapMarkerCards2:Ju},Ba=5;function Fa({children:n,products:t}){const a=t.slice(0,Ba),{merchandiseThumbnail:{borderColor:r="base",badge:{background:o}={}}
1={}}=Gt(),i=!o||o==="base"?"base":"accent";return e("div",{className:F(le.ProductMapMarker,le[Gn("ProductMapMarker-borderColor",r)],le[Gn("ProductMapMarker-badgeTone",i)]),children:[a.length>0?e("div",{"aria-hidden":"true",className:F(le.ProductMapMarkerCards,a.length===2&&le.ProductMapMarkerCards2),children:a.map((s,l)=>e("div",{className:F(le.ProductMapMarkerCard,l===0&&le.ProductMapMarkerCardPrimary),children:[e(_n,{src:s.src}),l===0&&e("span",{className:le.ProductMapMarkerCheckmark,children:e("svg",{"aria-hidden":"true",className:le.ProductMapMarkerCheckmarkSvg,focusable:"false",viewBox:"0 0 75 75",children:e("path",{className:le.ProductMapMarkerCheckmarkPath,d:"M20 39 L32 50 L56 25",fill:"none",pathLength:"1"})})})]},s.key))}):e(ed,{}),e(A,{background:"base",borderRadius:"fullyRounded",boxShadow:"base",className:le.ProductMapMarkerLabel,minBlockSize:"26px",overflow:"hidden",paddingBlock:"small-400",paddingInline:"small-200",children:e(H,{alignItems:"center",columnGap:"small-400",gridAutoFlow:"column",children:n})})]})}function ed(){return e("svg",{"aria-hidden":"true",className:le.ProductMapMarkerPin,focusable:"false",width:"48",height:"57",viewBox:"0 0 48 57",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e("path",{className:le.ProductMapMarkerPinBody,d:"M7.02944 7.02944C16.402 -2.34315 31.598 -2.34315 40.9706 7.02944C50.3431 16.402 50.3431 31.598 40.9706 40.9706L26.1665 55.7747C24.97 56.9712 23.03 56.9712 21.8335 55.7747L7.02944 40.9706C-2.34315 31.598 -2.34315 16.402 7.02944 7.02944Z"}),e("path",{className:le.ProductMapMarkerPinGlyph,clipRule:"evenodd",d:"M24 11.832C30.7191 11.8321 36.166 17.2794 36.1664 23.9985C36.1664 30.7179 30.7194 36.1648 24 36.1649C17.2806 36.1648 11.8335 30.7179 11.8335 23.9985C11.834 17.2795 17.2809 11.8321 24 11.832ZM29.7483 19.6037C29.2536 19.1915 28.5173 19.2586 28.1046 19.7526L22.6617 26.2832L19.8149 23.5063C19.3539 23.0565 18.6152 23.0655 18.1651 23.526C17.7154 23.9872 17.7253 24.7259 18.1864 25.1758L21.3173 28.2307C21.4104 28.3216 21.5315 28.4409 21.6469 28.536C21.7723 28.6393 21.9738 28.7869 22.2546 28.8672C22.61 28.9687 22.99 28.9485 23.3331 28.811C23.6038 28.7022 23.7903 28.5361 23.9043 28.4206C24.0094 28.314 24.1173 28.1817 24.2005 28.0818L29.8971 21.2474C30.3088 20.7526 30.2425 20.0161 29.7483 19.6037Z",fillRule:"evenodd"})]})}const nd="QiTzJ",td="BsmDF",At={MapFallback:nd,BackgroundImage:td};function ad({children:n,products:t,background:a="subdued"}){const r=ee(new Set),o=t.filter(({src:l})=>l&&!r.value.has(l)),i=a==="product"?o[0]?.src:void 0;function s(l){if(!(l.target instanceof HTMLImageElement))return;const c=l.target.getAttribute("src");c&&(r.value=new Set([...r.value,c]))}return e(A,{background:"subdued",className:At.MapFallback,inlineSize:"100%",onErrorCapture:s,overflow:"hidden",position:"relative",children:[i?e(Ye,{alt:"",className:At.BackgroundImage,inlineSize:"auto",objectFit:"cover",src:i}):null,e(Fa,{products:o,children:n})]})}function Ua({title:n,markerTitle:t,markerLabel:a,fallbackTitle:r=t,products:o,failedSources:i,...s}){const l=Nu(),c=l?i.value.has(l):i.value.size>0;function u(){i.value=new Set([...i.value,l])}const d=e(x,{children:[e(k,{color:"subdued",children:r}),e(Or,{children:e(k,{type:"strong",children:e("bdi",{children:a})})})]});return c?e(ad,{products:o??[],background:o?"product":"subdued",children:d}):l?e(Du,{src:l,title:n,overlayTitle:o?void 0:t,overlayLabel:o?void 0:a,overlay:o?e(Fa,{products:o,children:d}):void 0,onError:u},l):e(mi,{...s,title:n,onLoadFailure:u})}function Ha(){const{checkout:n,shop:t}=v(),{acceptEmailMarketing:a,buyerIdentity:r,contactInfo:o}=D();return C(()=>!r.value?.purchasingCompany&&o.value?.email!==void 0&&t.emailMarketing!=="OFF"&&!a.value&&n.latestReceipt.value?.status==="processed"&&n.latestReceipt.value.eligibleForMarketingOptIn)}const rd=/^(e_[0-9a-f]{32})_(.+?)(?:_osp)?$/;function od(n){if(!n)return{clientHandle:null,variant:null};let t;try{t=new URL(n).searchParams.get("utm_campaign")}catch{return{clientHandle:null,variant:null}}if(!t)return{clientHandle:null,variant:null};const a=rd.exec(t);return a?{clientHandle:a[1],variant:a[2]}:{clientHandle:null,variant:null}}function id(n){return od(n)}const sd="CGD68",ld="MPVYO",cd="_3MQvk",ud="_8PSDP",dd="fWnnD",pd="_1IOC2",hd="bDnw9",md="lK5x7",_d="c0CTL",yd="_4davv",gd="_38oLJ",fd="oXdcI",bd="hOZAu",vd="_2Vr9X",kd="ogNqn",Sd="aAfSd",Cd="kujmI",Td="q19KC",Id="_6rZN2",Pd="E1DyI",wd="gRzAZ",Ed="EHhRv",Md="KaI2p",Ad="taDzR",Rd="gvU7N",Ld="w7U7g",xd="Cl5Kz",Dd="Dh152",Od="TjYGl",Nd="EzlVD",Bd="JcEQU",Fd="HEqog",Ud="OaqG3",Hd="xHfD9",zd="Qhbfd",Yd="_1C9SL",qd="jvrs3",$d="ayiZt",Vd="JVpja",Wd="y2YPD",Gd="t0uAF",Kd="rLm9q",jd="PXe2R",Qd="_63ITw",q={Root:sd,VisualLabel:ld,Layer:cd,Phrase:ud,Token:dd,IntroToken:pd,ShopButtonAnimationCharOut:hd,FinalToken:md,ShopButtonAnimationCharIn:_d,IconSpacer:yd,ShopLogoSpacer:gd,Icon:fd,BellIcon:bd,ShopButtonAnimationBellRing:vd,ShopLogoToken:kd,ShopLogo:Sd,StaticLabel:Cd,StaticShopLogoWrapper:Td,AccessibleLabel:Id,Delay0:Pd,Delay1:wd,Delay2:Ed,Delay3:Md,Delay4:Ad,Delay5:Rd,Delay6:Ld,Delay7:xd,Delay8:Dd,Delay9:Od,Delay10:Nd,Delay11:Bd,Delay12:Fd,Delay13:Ud,Delay14:Hd,Delay15:zd,Delay16:Yd,Delay17:qd,Delay18:$d,Delay19:Vd,Delay20:Wd,Delay21:Gd,Delay22:Kd,Delay23:jd,Delay24:Qd};function Zd({icon:n,introText:t,finalPrefix:a,accessibleLabel:r,staticLabel:o}){const{i18n:i}=v(),{locale:s,localeDirection:l}=i,c=p=>l==="rtl"&&ir(p)?"rtl":"ltr",[u,d]=oe(!1);U(()=>{d(!0)},[]);const m=za(a,s,u).length;return e("span",{className:q.Root,children:[e("span",{className:q.VisualLabel,"aria-hidden":"true",children:[e("span",{className:q.Layer,children:e("span",{className:q.Phrase,dir:c(t),children:[e("span",{className:F(q.Token,q.IntroToken,q.IconToken,q.Delay0),children:n}),e("span",{className:q.IconSpacer}),Rt({text:t,tokenClassName:q.IntroToken,locale:s,graphemesEnabled:u,delayOffset:1})]})}),e("span",{className:q.Layer,children:e("span",{className:q.Phrase,dir:c(a),children:[Rt({text:a,tokenClassName:q.FinalToken,locale:s,graphemesEnabled:u}),e("span",{className:q.ShopLogoSpacer}),e("span",{className:F(q.Token,q.FinalToken,q.ShopLogoToken,q[Ya(m)]),children:e(fn,{className:q.ShopLogo,"aria-hidden":"true"})})]})})]}),e("span",{className:q.StaticLabel,dir:c(r),"data-testid":"static-label","aria-hidden":"true",children:o}),e("span",{className:q.AccessibleLabel,children:r})]})}const Xd=/^(ar|fa|ur|he|iw|hi|th)\b/i;function za(n,t,a){const r=n.match(/\s+|\S+/gu)??[];
1if(!a||Xd.test(t)||typeof Intl.Segmenter!="function")return r;let i;try{i=new Intl.Segmenter(t,{granularity:"grapheme"})}catch{return r}return r.flatMap(s=>/^\s+$/u.test(s)?[s]:Array.from(i.segment(s),l=>l.segment))}function Rt({text:n,tokenClassName:t,locale:a,graphemesEnabled:r,delayOffset:o=0}){return za(n,a,r).map((i,s)=>{const l=s+o;return e("span",{className:F(q.Token,t,q[Ya(l)]),children:i.replaceAll(" "," ")},`${l}-${i}`)})}function Ya(n){return`Delay${Math.min(n,24)}`}function Jd(){return e(y,{direction:"inline",alignItems:"center",className:q.StaticShopLogoWrapper,children:e(fn,{className:q.ShopLogo,"aria-hidden":"true"})})}function ep(){return e("svg",{className:F(q.Icon,q.BellIcon),viewBox:"0 0 16 16","aria-hidden":"true",focusable:"false",children:e("path",{fill:"currentColor",d:"M8.00016 1.5C10.4655 1.50006 12.5234 3.3978 12.8439 5.90137L13.4718 10.8096C13.5286 11.2533 13.3853 11.6709 13.1173 11.9805L13.1203 12H13.1007C12.8276 12.305 12.4309 12.5 11.9836 12.5H10.8908C10.3479 13.6581 9.2848 14.4999 8.00016 14.5C6.71553 14.5 5.6524 13.6581 5.10953 12.5H4.01578C3.56841 12.4998 3.17155 12.3052 2.8986 12H2.88004L2.88199 11.9814C2.61413 11.6719 2.47168 11.2533 2.52848 10.8096L3.15641 5.90137C3.47688 3.3978 5.53483 1.50006 8.00016 1.5ZM6.25504 12.5C6.68857 13.1293 7.32689 13.5 8.00016 13.5C8.67344 13.5 9.31174 13.1293 9.74527 12.5H6.25504Z"})})}const np="mnuHb",tp="ZHLC1",ap="ggkpn",rp="jNjME",We={ShopOrderUpdates:np,"ShopOrderUpdates-redesign":"LOmaT",ManageOrderButton:tp,ShopLogoWrapper:ap,ShopLogo:rp},Lt={delivery:"delivery_order",pickup:"pickup_order"},op="/qr/u/download.svg";function ip(n){const t=new URL(n);return t.pathname=op,t.toString()}class sp extends Error{constructor(){super(...arguments),this.name="PickupInstallCampaignAssignmentError"}}function qa({className:n,variant:t="delivery"}={}){const{i18n:a,observability:r,shop:o}=v(),i=Oe(),s=Q(),l=Ae(),c=id(l?.mobileUrl),u=a.translate("app_promotions.animated_shop_button.final_prefix"),d={icon:e(ep,{}),introText:a.translate("app_promotions.animated_shop_button.intro.value_props"),finalPrefix:u,accessibleLabel:`${u}Shop`,staticLabel:e(x,{children:[u,e(Jd,{})]})},{track:m}=Te("order_updates"),p=jo();U(()=>{l&&m("shop_button_rendered")},[l,m]);const h=t==="pickup"&&c.clientHandle!==null&&c.variant!==null;if(U(()=>{h&&r.error(new sp("Pickup order received an install campaign assignment"),{severity:"warning",metadata:{installCampaign:{clientHandle:c.clientHandle,variant:c.variant}}})},[h,c.clientHandle,c.variant,r]),!l)return null;const{mobileUrl:_,orderTrackingMobileUrl:b,qrCodeUrl:g,buyerHasOrderTrackingPush:f,orderTrackingPushCtaVariant:S}=l,T=t!=="pickup"&&f!==!0&&S==="treatment",I={shop:e("span",{className:We.ShopLogoWrapper,children:e(fn,{className:We.ShopLogo,"aria-label":"Shop"})})};let P,L;t==="pickup"?(P=a.translate("app_promotions.track_pickup_with_shop_logo",I),L={title:a.translate("thank_you.qr_code.pickup_title"),subtitle:a.translate("thank_you.qr_code.pickup_description")}):(f===!0?P=a.translate("app_promotions.order_updates_track_order_logo",I):T?P=a.translate("app_promotions.get_notified_with_shop_logo",I):P=e(Zd,{...d}),L=c.variant===cn.LegacyCopy?{title:a.translate("thank_you.qr_code.legacy_shipping_title"),subtitle:a.translate("thank_you.qr_code.legacy_shipping_description")}:{title:a.translate("thank_you.qr_code.shipping_title"),subtitle:a.translate("thank_you.qr_code.shipping_description")});const M=pn(T&&b?b:_,{utm_content:Lt[t]}),N=o.hasFlagEnabled(Co),W=pn(N?ip(g):g,{link_provider:"open.shop.app",utm_content:Lt[t],...N?{qr_secure_deferred:"true",qr_style:"rounded",qr_error_correction_level:"m",qr_branded_center:"true","qr_branded_center_options[padding]":"0.08"}:{}}),$=e(Da,{label:P,message:L,mobileLinkToShop:M,desktopLinkToShop:W,styledQrCode:N,installCampaign:t==="pickup"?void 0:c,onClipboardInteraction:()=>{m("arrive")},onQrCodeInteraction:()=>{m("arrive_show_qr_code")}}),Y=i?s?.orderStatusPageUrl:void 0;return e("div",{className:F(We.ShopOrderUpdates,Y?void 0:p,n,{[We["ShopOrderUpdates-redesign"]]:i}),children:Y?e(H,{gridTemplateColumns:"@media (inline-size >= medium) 'repeat(2, minmax(0, 1fr))', 'minmax(0, 1fr)'",gap:"base",children:[e("div",{className:p,children:$}),e(_e,{className:We.ManageOrderButton,inlineSize:"fill",variant:"secondary",href:Y,children:a.translate("thank_you.manage_order_label")})]}):$})}function $a(){const t=Q()?.paymentDetails?.financialPendingReason;return{financialPendingReason:t,isBuyerActionRequired:t==="BUYER_ACTION_REQUIRED",isProviderActionRequired:["NETWORK_ACTION_REQUIRED","PARTNER_ACTION_REQUIRED","SLOW_COMPLETION_CONFIRMATION","SLOW_COMPLETION_PAYMENT"].includes(t??"")}}const Yn=({isPickup:n}={isPickup:!1})=>{const{i18n:t}=v(),a=vn(),r=fe($a()),o=fe(n),i=t.translate("thank_you.thank_you_title_payments_app_pending_buyer_action_required"),s=t.translate("thank_you.thank_you_title_payments_app_pending_default");return C(()=>{const{confirmWithEmail:h,confirmWithPhone:_}=a.value,b=r.value;return{pendingOrderConfirmationTitle:l(b),pendingOrderConfirmationMessage:c({confirmWithEmail:h,confirmWithPhone:_,isPickup:o.value,financialPendingReason:b}),isOrderPendingStatus:!!b.financialPendingReason}});function l(h){return h.isBuyerActionRequired?i:s}function c({confirmWithEmail:h,confirmWithPhone:_,isPickup:b,financialPendingReason:g}){return g.isBuyerActionRequired?d({confirmWithEmail:h,confirmWithPhone:_,isPickup:b}):g.isProviderActionRequired?t.translate("thank_you.thank_you_payments_app_pending_payment_description_provider_action_required_default"):p({confirmWithEmail:h,confirmWithPhone:_,isPickup:b})}function u({confirmWithEmail:h,confirmWithPhone:_}){return h&&_?t.translate("thank_you.thank_you_payments_app_pending_payment_description_buyer_action_required_with_email_and_phone_pick_up"):h?t.translate("thank_you.thank_you_payments_app_pending_payment_description_buyer_action_required_with_email_pick_up"):_?t.translate("thank_you.thank_you_payments_app_pending_payment_description_buyer_action_required_with_phone_pick_up"):t.translate("thank_you.thank_you_payments_app_pending_payment_description_buyer_action_required_with_missing_pick_up")}function d({confirmWithEmail:h,confirmWithPhone:_,isPickup:b}){return b?u({confirmWithEmail:h,confirmWithPhone:_}):h&&_?t.translate("thank_you.thank_you_payments_app_pending_payment_description_buyer_action_required_with_email_and_phone"):h?t.translate("thank_you.thank_you_payments_app_pending_payment_description_buyer_action_required_with_email"):_?t.translate("thank_you.thank_you_payments_app_pending_payment_description_buyer_action_required_with_phone"):t.translate("thank_you.thank_you_payments_app_pending_payment_description_buyer_action_required_with_missing")}function m({confirmWithEmail:h,confirmWithPhone:_}){return h&&_?t.translate("thank_you.thank_you_payments_app_pending_payment_description_default_with_email_and_phone_pick_up"):h?t.translate("thank_you.thank_you_payments_app_pending_payment_description_default_with_email_pick_up"):_?t.translate("thank_you.thank_you_payments_app_pending_payment_description_default_with_phone_pick_up"):t.translate("thank_you.thank_you_payments_app_pending_payment_description_default_with_missing_pick_up")}function p({confirmWithEmail:h,confirmWithPhone:_,isPickup:b}){return b?m({confirmWithEmail:h,confirmWithPhone:_}):h&&_?t.translate("thank_you.thank_you_payments_app_pending_payment_description_default_with_email_and_phone"):h?t.translate("thank_you.thank_you_payments_app_pending_payment_description_default_with_email"):_?t.translate("thank_you.thank_you_payments_app_pending_payment_description_default_with_phone"):t.translate("thank_you.thank_you_payments_app_pending_payment_description_default_with_missing")}};function Va(n,{legacyRepresentProductsAsFees:t=!1,remoteMerchandiseDetails:a}={}){return(n?.length?n.map(o=>({giftCard:o.giftCard,key:o.stableId,legacyFee:o.legacyFee,quantity:o.quantity,requiresShipping:o.requiresShipping,src:o.image?.two}
1)):cp(a)).filter(({quantity:o,legacyFee:i})=>o>0&&!(t&&i)).map(({giftCard:o,key:i,requiresShipping:s,src:l})=>({giftCard:o,key:i,requiresShipping:s,src:l}))}function lp(n,{legacyRepresentProductsAsFees:t=!1,remoteMerchandiseDetails:a}={}){const r=Va(n,{legacyRepresentProductsAsFees:t,remoteMerchandiseDetails:a}),o=[];for(const i of r)if(!(!i.requiresShipping||i.giftCard||!i.src)&&(o.push({key:i.key,src:i.src}),o.length===Ba))break;return o}function cp(n){const t=n?.mergedBuyerProposalMerchandise;return t?.__typename!=="PurchaseOrderMerchandiseTerms"?[]:t.merchandiseLines.map(a=>({giftCard:a.merchandise.giftCard,key:a.stableId,legacyFee:"legacyFee"in a&&a.legacyFee===!0,quantity:a.quantity.items,requiresShipping:a.merchandise.requiresShipping,src:a.merchandise.image?.two}))}const up={id:"766f1a73f6f5729d8de999514e11f6d1a0015979328b3a23a3ffe084b071b5ed",type:"mutation",name:"EmailMarketingOptIn",source:""};function dp({optInState:n}){const{i18n:t}=v();let a,r;return n.value==="loading"?(a=e(Nr,{size:"small"}),r=t.translate("marketing.accept_marketing_checkbox_label")):n.value==="opt_in_pending"?(a=e(ie,{type:"email",size:"small"}),r=t.translate("marketing.pending_accept_marketing_checkbox_label")):(a=e(ie,{type:"check",size:"small"}),r=t.translate("marketing.post_accept_marketing_checkbox_label")),e(y,{direction:"inline",gap:"base",alignItems:"center",children:[a,r]})}function Wa({colorLayer:n}){const{track:t}=zn(),{client:a,i18n:r,observability:o,userEvents:i,shop:{id:s,myshopifyDomain:l},source:c,checkout:u,graphql:{coreGraphql:d}}=v(),m=ee("not_opted_in"),p=gn(),h=D().buyerIdentity.value?.customerProfile,_=Q(),b=a.unstable_getSerialization("sessionToken"),g=c.type==="simulated",f=u.configuration.layout.isOnePage.value;U(()=>{t("thank_you_page_email_consent_page_view/4.0",{page:"thank_you",customerId:h?.id?Number(je(h.id)):void 0,orderId:ia(_?.orderIdentity.id),sessionToken:p?.value?.defaultAttributes?.visitToken,uniqueToken:p?.value?.defaultAttributes?.uniqToken})},[h?.id,_,t,p?.value?.defaultAttributes?.uniqToken,p?.value?.defaultAttributes?.visitToken]);async function S(T){if(g){m.value="opted_in";return}if(!T)return;const I=Number(je(s));i.monorailEvent({schemaId:"checkout_email_marketing_optin_ui_interaction/1.0",payload:{checkoutToken:c.checkoutSessionIdentifier||c.sourceId,shopId:Number.isNaN(I)?0:I,shopifyDomain:l,action:"click_email_opt_in",origin:"thank_you_page",checkoutVersion:f?"checkout_one_redesign":"checkout_one"}}),m.value="loading";const{data:P,error:L}=await d.mutate(up,{variables:{orderId:_.orderIdentity.id,sessionInput:{sessionToken:b}}});if(L){m.value="not_opted_in",L instanceof sr||o.error(L);return}const M=P?.subscribeToMarketing.__typename;M==="MarketingOptInFailure"&&P?.subscribeToMarketing.code!=="ALREADY_SUBSCRIBED"?m.value="not_opted_in":M==="MarketingOptInFailure"&&P?.subscribeToMarketing.code==="ALREADY_SUBSCRIBED"?m.value="opted_in":M==="MarketingOptInSuccess"&&(m.value=P?.subscribeToMarketing.pending?"opt_in_pending":"opted_in")}return e(A,{borderWidth:"base none none none",background:"subdued",padding:"base",colorLayer:n,children:e(E,{when:()=>m.value==="not_opted_in",fallback:e(dp,{optInState:m}),children:e(da,{id:"marketing_opt_in",name:"marketing_opt_in",onChange:S,label:r.translate("marketing.accept_marketing_checkbox_label")})})})}function Ga({children:n}){return typeof n!="string"?null:e(x,{children:n.split(`
2`).filter(Boolean).map(t=>e(w,{children:t},t))})}const pp=({deliveryInformation:n,paymentInstructions:t,color:a,textAlign:r})=>{const{i18n:o}=v(),{confirmWithEmail:i,confirmWithPhone:s}=vn().value,{isOrderPendingStatus:l,pendingOrderConfirmationMessage:c}=Yn().value,u=yn().value,d=Hn(),m=Ae()?.buyerHasOrderTrackingPush,p=()=>{if(l)return c;if(i&&s)return u?o.translate("thank_you.thank_you_confirmed_with_email_and_phone_description.multi_store"):o.translate("thank_you.thank_you_confirmed_with_email_and_phone_description.single_store");if(i)return u?o.translate("thank_you.thank_you_confirmed_with_email_description.multi_store"):d&&m===!0?o.translate("thank_you.thank_you_confirmed_with_
2shop_updates_description"):o.translate("thank_you.thank_you_confirmed_with_email_description.single_store");if(s)return u?o.translate("thank_you.thank_you_confirmed_with_phone_description.multi_store"):o.translate("thank_you.thank_you_confirmed_with_phone_description.single_store")},h=()=>p()||o.translate("thank_you.thank_you_confirmed_order_with_missing"),_=()=>n?e(x,{children:[e(k,{type:"strong",children:o.translate("thank_you.delivery_information_label")})," ",e(Me,{children:n})]}):null,b=t&&t.length>0;return e(y,{gap:"small-300",children:[b?null:e(w,{color:a,textAlign:r,children:h()}),n?e(w,{color:a,textAlign:r,children:_()}):null,b?e(y,{gap:"base",children:t.map(g=>e(Ga,{children:g},g))}):null]})};function hp({children:n,shippingAddress:t,deliveryInformation:a,deliveryMethodType:r,paymentInstructions:o,isBuyWithPrime:i,legacyRepresentProductsAsFees:s,merchandiseLines:l,remoteMerchandiseDetails:c}){const{shop:u,i18n:d,checkout:m}=v(),p=Na(),h=u.hasFlagEnabled(ce),_=Oe(),{track:b}=Te("map"),g=Un(),f=qe().value,{pendingOrderConfirmationTitle:S,isOrderPendingStatus:T}=Yn().value,I=Ha(),P=yn().value,L=Hn()&&!P,M=T?S:P?d.translate("thank_you.confirmed_orders_title"):d.translate("thank_you.thank_you_title"),N=jt(t,{countryFormat:"explicit",hiddenFields:["address1","address2","company","firstName","lastName","phone","postalCode","countryCode"]}),W=_&&u.hasFlagEnabled(To)&&r==="SHIPPING",$=Q(),Y=$?.completedRemoteCheckouts?.some(ye=>ye.status==="submitted"&&(ye.remotePurchaseOrder.deliveryLines?.length??0)>1)??!1,X=$?.isRedacted??!1,O=C(()=>!X&&I.value),te=ee(new Set),ae=$?.mapVisibility==="VISIBLE",B=he(()=>ae&&t?.coordinates&&N?{label:N,position:{lat:t.coordinates.latitude,lng:t.coordinates.longitude}}:null,[t,N,ae]),ue=he(()=>W?lp(l,{legacyRepresentProductsAsFees:s,remoteMerchandiseDetails:c}):[],[W,s,l,c]),ne=!f&&!P&&!Y,se=W&&ne,Ie=Va(l,{legacyRepresentProductsAsFees:s,remoteMerchandiseDetails:c}),be=_&&ne&&!X&&!m.isShippingRequired.value&&Ie.length>0&&Ie.every(({requiresShipping:ye})=>!ye),Re=he(()=>B?[{type:"destination",title:d.translate("thank_you.marker.shipping"),headerDisabled:!0,...B}]:[],[B,d]);let J=null;if(B&&!be){const ye=d.translate("thank_you.marker.shipping"),Ue=`${d.translate("thank_you.shipping_address_map_title",{address:B.label})}`;J=e(Ua,{failedSources:te,title:Ue,markerTitle:ye,markerLabel:B.label,fallbackTitle:d.translate("shipping.shipping_address_title"),products:se?ue:void 0,options:{mapOptions:{center:B.position,styles:g?ya:[]}},markers:Re,handleClick:()=>b("click"),handleDoubleClick:()=>b("dblclick"),handleDragEnd:()=>b("dragend"),handleZoomChanged:()=>b("zoom_changed")})}const Ne=J===null?"none":"base",Pe=J&&p?e(A,{ref:p,children:J}):J,me=e(x,{children:[e(R,{textAlign:_?"center":void 0,children:M}),e(pp,{color:_?"subdued":void 0,deliveryInformation:a,paymentInstructions:o,textAlign:_?"center":void 0})]}),Be=L?e(qa,{variant:"delivery"}):null,Fe=e(x,{children:[e(y,{gap:"base",borderWidth:_?void 0:`${Ne} none none none`,padding:"base",children:[_?e(y,{gap:"small-300",children:me}):me,Be]}),i&&!f&&e(y,{gap:"base",borderWidth:_?void 0:`${Ne} none none none`,padding:"base",children:e(Ci,{})}),e(E,{when:O,children:e(Wa,{colorLayer:h?void 0:"control"})})]});return _?e(x,{children:[Pe?e(z,{accessibilityRole:"presentation",colorLayer:h?void 0:"control",overflow:"hidden",className:Se.ThankYouEntranceStatus,children:Pe}):null,e(Au,{active:be,colorLayer:h?void 0:"control",products:Ie.flatMap(({key:ye,src:Ue})=>Ue?[{key:ye,src:Ue}]:[]),children:n}),e(z,{accessibilityLabel:M,colorLayer:h?void 0:"control",overflow:"hidden",children:Fe})]}):e(z,{accessibilityLabel:M,colorLayer:h?void 0:"control",overflow:"hidden",className:Se.ThankYouEntranceStatus,children:[Pe,Fe]})}const Ka=Bt(null);var mp={ProgressTracker:"_1ojciyd1 _1ojciyd0 _1fragemqt _1fragemsm _1fragemp0 _1fragemuf _1fragem11h _1fragemzk"};function _p({activeStep:n,children:t}){const a=lr.toArray(t).map(i=>cr(i)?i.props.id:void 0),r=a.join("|"),o=he(()=>({steps:a.reduce((i,s,l)=>(i[s]={active:n?n===s:l===0,completed:a.indexOf(n)>a.indexOf(s)},i),{})}),[n,r]);return e(Ka.Provider,{value:o,children:e("ol",{className:mp.ProgressTracker,role:"list",children:t})})}function yp(){const n=Ft(Ka);if(n===null)throw new Io("<Step />  must be used inside of an <ProgressTracker />");return n}var Ee={Step:"_4xihkw1 _4xihkw0 _1fragem64",Icon:"_4xihkw4",Label:"_4xihkw5",Connector:"_4xihkw6",completed:"_4xihkw2",active:"_4xihkw3"};function gp({children:n,description:t,icon:a,iconTone:r,id:o,label:i,state:s,stateHidden:l=!0}){const{steps:c}=yp(),u=Object.keys(c).indexOf(o)===0,{[o]:{active:d,completed:m}}=c,p=F(Ee.Step,m&&Ee.completed);return e(x,{children:[!u&&e(vp,{active:d,completed:m}),e("li",{className:p,"aria-current":d,children:[e(fp,{active:d,completed:m,type:a,tone:r}),e(bp,{active:d,completed:m,description:t,label:i,state:s,stateHidden:l}),n]})]})}function fp({active:n,tone:t="accent",type:a,completed:r}){const o=F(Ee.Icon,n&&Ee.active,r&&Ee.completed);return e("div",{className:o,children:e(ie,{type:a,tone:n||r?t:void 0})})}function bp({active:n,completed:t,description:a,label:r,state:o,stateHidden:i}){const s=F(Ee.Label,(n||t)&&Ee.completed);return e(x,{children:[e("div",{className:s,children:[i?e(k,{accessibilityVisibility:"exclusive",children:o}):e(w,{children:o}),e(w,{children:e(k,{type:n||t?"strong":"generic",children:r})})]}),(n||t)&&a&&e(w,{type:"small",color:"subdued",children:a})]})}function vp({active:n,completed:t}){const a=F(Ee.Connector,(n||t)&&Ee.completed);return e("li",{className:a,"aria-hidden":!0})}function kp({activeStep:n="inReview"}){const{i18n:t,shop:a}=v(),r=a.hasFlagEnabled(ce),o=t.formatDate(new Date,{month:"long",day:"2-digit",timeZone:a.timeZone}),i=[{id:"submitted",date:o,label:t.translate("thank_you.breadcrumbs_submitted"),state:t.translate("thank_you.breadcrumbs_submitted"),icon:"arrow-right"},{id:"inReview",date:o,label:t.translate("thank_you.breadcrumbs_in_review"),state:t.translate("thank_you.breadcrumbs_in_review"),icon:"note"},{id:"confirmed",label:t.translate("thank_you.breadcrumbs_confirmed"),state:t.translate("thank_you.breadcrumbs_confirmed"),icon:"check"}];return e(z,{colorLayer:r?void 0:"control",children:[e(y,{gap:"base",padding:"base",children:e(_p,{activeStep:n,children:i.map(s=>e(gp,{description:s.date,icon:s.icon,id:s.id,label:s.label,state:s.state},s.id))})}),e(Ze,{}),e(y,{gap:"base",padding:"base",children:[e(R,{children:t.translate("thank_you.thank_you_title_review")}),e(w,{children:t.translate("thank_you.thank_you_confirmed_order_with_draft")})]})]})}function Sp({children:n,paymentInstructions:t}){const{value:a}=Qe(),{shop:r,i18n:o}=v(),i=Na(),s=r.hasFlagEnabled(ce),l=Oe(),c=D().deliveryNext,u=Po(c.value,"ONE_TIME_PURCHASE",!0),d=u?.status==="available"?u.methods.find(J=>J.methodType==="PICK_UP")?.pickupLocation:void 0,{confirmWithEmail:m,confirmWithPhone:p}=vn().value,{isOrderPendingStatus:h,pendingOrderConfirmationTitle:_,pendingOrderConfirmationMessage:b}=Yn({isPickup:!0}).value,g=Un(),{track:f}=Te("map"),S=Q(),T=ee(new Set),I=yn().value,P=Hn()&&!I,L=jt(d?.address,{hiddenFields:["address1","address2","company","firstName","lastName","phone","postalCode","countryCode"]}),M=Ie(),N=S?.isRedacted??!1,W=Ha(),$=C(()=>!N&&W.value),Y=o.translate("thank_you.pick_up_in_store_marker.shipping"),X=d?.name||L,O=d?.address?.coordinates,te=l?S?.mapVisibility==="VISIBLE"&&O?.accuracy==="PRECISE":!r.hasFlagEnabled(wo)&&!!O;let ae=null;if(te&&O){const J=`${o.translate("thank_you.shipping_address_map_title",{address:X??L})}`;ae=e(Ua,{failedSources:T,title:J,markerTitle:Y,markerLabel:X,options:{mapOptions:{styles:g?ya:[]}},markers:Re(),handleDragEnd:()=>f("dragend")})}const B=ae?e(A,{borderWidth:l?void 0:"none none base none",ref:i,children:ae}):null,ue=e(x,{children:[e(R,{textAlign:l?"center":void 0,children:M}),e(w,{color:l?"subdued":void 0,textAlign:l?"center":void 0,children:be()})]}),ne=P?e(qa,{variant:a?"delivery":"pickup"}):null,se=e(x,{children:[e(y,{gap:"base",padding:"base",children:[l?e(y,{gap:"small-300",children:ue}):ue,t&&t.length>0&&e(y,{gap:"base",children:[e(Ze,{direction:"inline"}),t.map(J=>e(Ga,{children:J},J))]}),ne]}),e(E,{when:$,children:e(Wa,{colorLayer:s?void 0:"control"})})]});if(!l)return e(z,{accessibilityLabel:M,colorLayer:s?void 0:"control",className:Se.ThankYouEntranceStatus,children:[B,se]});return e(x,{children:[ae?e(z,{accessibilityRole:"presentation",colorLayer:s?void 0:"control",overflow:"hidden",className:Se.ThankYouEntranceStatus,children:B}):null,n,e(z,{accessibilityLabel:M,colorLayer:s?void 0:"control",overflow:"hidden",children:se})]});function Ie(){return h?_:o.translate("thank_you.thank_you_title")}function be(){return h?b:a?m&&p?o.translate("thank_you.thank_you_confirmed_with_email_and_phone_description.single_store"):m?o.translate("thank_you.thank_you_confirmed_with_email_description.single_store"):p?o.translate("thank_you.thank_you_confirmed_with_phone_description.single_store"):o.translate("thank_you.thank_you_confirmed_order_with_missing"):m&&p?o.translate("thank_you.thank_you_confirmed_order_with_email_and_phone_pick_up"):m?o.translate("thank_you.thank_you_confirmed_order_with_email_pick_up"):p?o.translate("thank_you.thank_you_confirmed_order_with_phone_pick_up"):o.translate("thank_you.thank_you_confirmed_order_with_missing")}function Re(){const J=d?.address?.coordinates;return J?[{type:"destination",title:Y,position:{lat:J.latitude,lng:J.longitude},label:X,headerDisabled:!0}]:[]}}function Cp({children:n}){const t=D(),{value:a}=t.paymentLines,{value:r}=t.shippingAddress,{value:o}=oa("ONE_TIME_PURCHASE"),{value:i}=t.customAttributes,{value:s}=t.legacyRepresentProductsAsFees,{value:l}=t.remoteMerchandiseDetails,c=Fn(o),u=Bn(),{value:d}=Qe();if(xe()?.some(_=>_.status==="failed"))return null;if(u.value)return e(x,{children:[n,e(kp,{})]});const p=a?.lines.map(({method:_,specialInstructions:b})=>_.type==="paymentOnDelivery"||_.type==="customManualPayment"||_.type==="manualPayment"?b??_.paymentInstructions:null).filter(
2Boolean),h=c?.methodType==="LOCAL"?c.description:void 0;return d||c?.methodType==="PICK_UP"?e(Sp,{paymentInstructions:p,children:n}):e(hp,{shippingAddress:r,legacyRepresentProductsAsFees:s,merchandiseLines:t.merchandiseLines.value?.lines,remoteMerchandiseDetails:l,paymentInstructions:p,deliveryInformation:h,deliveryMethodType:c?.methodType,isBuyWithPrime:Tu(i??[]),children:n})}function Tp(){const n=Bn(),{financialPendingReason:t}=$a(),a=xe()?.some(r=>r.status==="failed");return!n.value&&!t&&!a}const Ip=3e3,Pp=2e3,wp="(max-width: 749px)";function Ep(){const{checkout:n,client:t,router:a}=v(),r=n.thankYouEntrance,o=$t(),i=An(),s=Tp(),l=yn().value,c=Kt(),u=s&&!l,d=a.currentUrl.value.normalizedPath,m=wi(t.initialRequest.url.pathname).endsWith(d),p=G(o&&u&&!i&&!m).current,h=r.progress?.phase.value,_=h==="loading"||h==="completing",g=ee(p?_?"waiting-for-progress":"waiting-for-hydration":"complete"),f=g.value,S=ee("centered"),T=r.isRevealing.value,I=ee(null),P=G(null),L=G(null),{lock:M,unlock:N}=Br(),W=c||!u,$=K(()=>{Kn(()=>{g.value="complete",r.skip()})},[r,g]),Y=K(()=>{Kn(()=>{r.settle(),$()})},[r,$]),X=K(()=>{g.value==="running"&&r.reveal()},[r,g]);wn(()=>{r.progress?.complete()},[r]),U(()=>{if(!p){r.skip();return}if(W){Y();return}(g.value==="waiting-for-hydration"||g.value==="waiting-for-progress"&&!_)&&(g.value="running")},[r,_,Y,p,W,g]),U(()=>{if(!p||f!=="running")return;const B=window.setTimeout(Y,Ip);return()=>window.clearTimeout(B)},[f,Y,p]),U(()=>{if(!T)return;const B=window.setTimeout(Y,Pp);return()=>{window.clearTimeout(B),Y()}},[T,Y]),U(()=>{if(!(!p||f!=="running"))return window.scrollTo(0,0),M(),N},[f,M,p,N]);const O=K(()=>{const B=P.current,ue=L.current;if(!B||!ue)return;const ne=B.getBoundingClientRect(),se=ue.getBoundingClientRect();I.value={x:ne.left+ne.width/2-(se.left+se.width/2),y:ne.top+ne.height/2-(se.top+se.height/2)}},[I]),te=K(B=>{P.current=B,(g.value==="waiting-for-progress"||g.value==="waiting-for-hydration")&&(S.value=B&&window.matchMedia(wp).matches?"traveling":"centered"),O()},[O,S,g]),ae=K(B=>{L.current=B,O()},[O]);return{isAfterProgress:h==="complete",isContentHidden:r.phase.value==="pending"&&p,isEntranceRevealing:T,mode:S.value,morphOffset:I.value,onDrawn:O,onEntranceSettled:Y,onRevealed:X,onSettled:$,registerMapTarget:te,registerMark:ae,shouldAnimate:p,status:g.value}}const Mp="_1BgJP",Ap="coXlQ",Rp="Ea8kH",Lp="HDNQw",xp="JnQXy",Dp="BoaBN",Op="_98hLo",pe={ThankYouInterstitial:Mp,"ThankYouInterstitial-afterProgress":"MXKBd","ThankYouInterstitial-running":"In8pu",ThankYouInterstitialBackdrop:Ap,"ThankYouInterstitial-scrollContained":"_8DY5a",ThankYouInterstitialGraphic:Rp,ThankYouInterstitialDisc:Lp,ThankYouInterstitialStroke:xp,ThankYouInterstitialCircle:Dp,ThankYouInterstitialCheckmark:Op,"ThankYouInterstitialGraphic-running":"NiSUe","ThankYouInterstitial-traveling":"t5tTv"},hn=56,xt=hn/2,Np=26.5,Bp=75,Fp=hn/Bp,Up="M 6 40.1 C 7.1 34.6 11.5 31.9 16.5 33 C 19.2 33.6 21.8 36.5 24.1 38.8 L 34.8 49.6 L 52.2 26.8";function Hp({afterProgress:n=!1,appearance:t,centerOnScreen:a=!1,confirmation:r,mode:o,morphOffset:i,onDrawn:s,onRevealed:l,onSettled:c,registerMark:u,status:d}){const m=i??{x:0,y:0},p=zp(a),h=d==="running",_=o==="traveling",b=f=>{f.target===f.currentTarget&&c()},g=f=>{f.target===f.currentTarget&&s()};return e("div",{ref:p,className:F(pe.ThankYouInterstitial,Se.ThankYouInterstitialOverlay,{[pe["ThankYouInterstitial-afterProgress"]]:n,[pe["ThankYouInterstitial-running"]]:h,[pe["ThankYouInterstitial-traveling"]]:_}),role:"status","aria-hidden":d==="waiting-for-progress"?!0:void 0,"aria-label":r,children:[e(k,{accessibilityVisibility:"exclusive",children:r}),e("div",{className:pe.ThankYouInterstitialBackdrop,"aria-hidden":"true",onAnimationStart:h?l:void 0,onAnimationEnd:h&&_?c:void 0}),e("div",{className:F(pe.ThankYouInterstitialGraphic,{[pe["ThankYouInterstitialGraphic-running"]]:h}),ref:u,onAnimationEnd:h&&!_?b:void 0,style:{"--morph-x":`${m.x}px`,"--morph-y":`${m.y}px`,"--thank-you-interstitial-disc-color":t==="shopPay"?bn.toRgb():void 0,"--thank-you-interstitial-stroke-color":t==="shopPay"?fi.Grayscale.White.toRgb():void 0},"aria-hidden":"true",children:e("div",{className:pe.ThankYouInterstitialDisc,children:e("svg",{className:pe.ThankYouInterstitialStroke,viewBox:`0 0 ${hn} ${hn}`,focusable:"false","aria-hidden":"true",onAnimationStart:h&&_?g:void 0,children:[e("circle",{className:pe.ThankYouInterstitialCircle,cx:xt,cy:xt,r:Np,pathLength:"1"}),e("g",{transform:`scale(${Fp})`,children:e("path",{className:pe.ThankYouInterstitialCheckmark,d:Up})})]})})})]})}function zp(n){const t=G(null);return U(()=>{const a=t.current;if(!n||!a||typeof IntersectionObserver>"u")return;const r=[document.documentElement,document.body];for(const i of r)i.classList.add(pe["ThankYouInterstitial-scrollContained"]);const o=new IntersectionObserver(([i])=>{if(!i?.isIntersecting)return;const s=i.boundingClientRect.bottom-i.intersectionRect.bottom;a.style.setProperty("--offscreen-block-end",`${s}px`)},{threshold:Array.from({length:101},(i,s)=>s/100)});return o.observe(a),()=>{o.disconnect();for(const i of r)i.classList.remove(pe["ThankYouInterstitial-scrollContained"])}},[n]),t}const Yp={"ThankYouContent-hidden":"_3UsL1"};function qp({children:n}){const{i18n:t,checkout:a}=v(),r=Ep(),o=$p(Q());if(!r.shouldAnimate)return e(x,{children:n});const i=r.status==="complete"?null:e(Hp,{afterProgress:r.isAfterProgress,appearance:o,centerOnScreen:a.configuration.isUniversalCheckoutFinalizer,confirmation:`${t.translate("thank_you.thank_you_title")}`,mode:r.mode,morphOffset:r.morphOffset,onDrawn:r.onDrawn,onRevealed:r.onRevealed,onSettled:r.onSettled,registerMark:r.registerMark,status:r.status});return e(Oa.Provider,{value:r.registerMapTarget,children:[r.status==="running"?e(Fr,{children:e("div",{children:i})}):i,e(A,{className:F({[Yp["ThankYouContent-hidden"]]:r.isContentHidden,[Se.ThankYouEntrance]:r.isEntranceRevealing}),inert:r.isContentHidden,children:n}),r.isEntranceRevealing?e("span",{className:Se.ThankYouEntranceBeat,"aria-hidden":"true",onAnimationEnd:r.onEntranceSettled}):null]})}function $p(n){return n?.shopAppLinksAndResources.shopPayOrder?"shopPay":"merchant"}const Vp=Dn("ThankYouOrderSummaryContent");function Wp(){const{checkout:n,i18n:t,source:a}=v(),{value:r}=D().merchandiseLines,{open:o,setOpen:i}=Ur(),s=xn(void 0,Vp),l=`${s}-heading`,c=t.translate("order_summary.title"),u=ke("Checkout::ThankYou::Dynamic::Render","ORDER_SUMMARY1"),d=ke("Checkout::ThankYou::CartLineDetails::RenderAfter"),m=ke("Checkout::ThankYou::CartLines::RenderAfter"),p=ke("Checkout::ThankYou::Dynamic::Render","ORDER_SUMMARY2"),h=ke("Checkout::ThankYou::Dynamic::Render","ORDER_SUMMARY3"),_=Pi([...u,...d,...m,...p,...h]);ur(()=>{i(_.value)});const b=n.proposal.facts.merchandiseLines??[],g=Qn(a)?b:r?.lines||[],{totalLineQuantities:f=0,totalLineQuantitiesFact:S=0}=Wt(),T=t.translate("order_summary.number_items",{count:Qn(a)?S:f}),I=o.value,P=()=>{i(!o.peek())},L=n.configuration.visibility.showAside;return e(A,{display:L?"@media (inline-size >= medium) none, auto":"auto",children:e(z,{accessibilityLabelledBy:l,colorLayer:"control",padding:"base",children:[e(R,{id:l,level:2,visibility:"hidden",children:c}),e(Hr,{section:"top_summary",children:e(zr,{section:"top_summary",children:e(Ei,{children:[e(Yr,{"aria-controls":s,"aria-expanded":I,"data-event-name":I?"order_summary_hide":"order_summary_show",inlineSize:"100%",onClick:P,children:e(H,{alignItems:"center",gap:"small-200",gridTemplateColumns:"minmax(0, 1fr) minmax(auto, max-content) minmax(auto, max-content)",children:[I?e(k,{size:"large",type:"strong",children:c}):e(k,{children:[e("span",{className:Zt({screenReaders:"only"}),children:c})," ",T]}),!I&&e(y,{direction:"inline",alignItems:"center",gap:"small-200",children:[e(qr,{variant:"fan-legacy",size:"small",merchandise:g,useImageAltTexts:!1,sortByPrice:!0}),e($r,{})]}),e(ie,{type:I?"chevron-up":"chevron-down",size:"small-200"})]})}),I?e("div",{id:s,children:e(A,{paddingBlockStart:"large-200",children:e(Vr,{skipWrappingSection:!0,hideAccessibilityTitle:!0})})},"thank-you-order-summary-open"):e("div",{id:s},"thank-you-order-summary-closed")]})})})]})})}const Dt={},Gp=(n,t)=>{const a=Z.screenLeft===void 0?Z.screenX:Z.screenLeft,r=Z.screenTop===void 0?Z.screenY:Z.screenTop;let o;Z.innerWidth?o=Z.innerWidth:Ge.documentElement.clientWidth?o=Ge.documentElement.clientWidth:o=screen.width;let i;Z.innerHeight?i=Z.innerHeight:Ge.documentElement.clientHeight?i=Ge.documentElement.clientHeight:i=screen.height;
2const s=Math.max(1,o/Z.screen.availWidth),l=(o-n)/2/s+a,c=(i-t)/2/s+r;return{height:t/s,left:l,top:c,width:n/s}},Kp=n=>{n?.close()},jp=(n,t,a="SignInWithShop")=>{const r=Gp(365,554);Dt[a]?.();const o=Z.open(n,"SignInWithShop",`popup,width=${r.width},height=${r.height},top=${r.top},left=${r.left}`),i=c=>{ii({allowedOrigins:[si,li,ci,Z.location.origin],event:c,source:o})&&t(c)},s=()=>Kp(o);t(new MessageEvent("message",{data:{type:"windoidopened"}}));const l=setInterval(()=>{o?.closed&&(t(new MessageEvent("message",{data:{type:"windoidclosed"}})),clearInterval(l))},200);return["beforeunload","unload","pagehide"].forEach(c=>{Z.addEventListener(c,s,{once:!0})}),Z.addEventListener("message",i),Dt[a]=()=>{["beforeunload","unload","pagehide"].forEach(c=>{Z.removeEventListener(c,s)}),Z.removeEventListener("message",i),clearInterval(l)},o};let In=null;function Qp(){return In||(In=Mi()),In}const Zp=(n,t)=>{const a=ui({...n,analyticsTraceId:Qp(),uxMode:"windoid"});if(!a){console.warn?.("Failed to build authorize URL due to incorrect parameters",n);return}let r=null;r=jp(a,i=>{switch(i.data.type){case"completed":t.onComplete?.(i.data),r?.close();break;case"error":t.onError?.(i.data),r?.close();break;case"windoidopened":t.onWindoidOpen?.();break}})},Xp={"aria-label":"Shop",style:{fill:bn.toRgb(),width:44,height:17}},Jp=({loading:n,onSignInCompleted:t,fetchAttempts:a=1})=>{const{i18n:r,shop:o}=v(),i=qe().value,s=r.translate("thank_you.verify_shop_account_title"),{track:l}=Te("pay_escrow"),{value:c}=D().contactInfo,u=!i,d=o.hasFlagEnabled(ce);U(()=>{if(n&&a>=1){l("verify_button_blurred_rendered");return}l("verify_button_rendered")},[n,l,a]);const m=()=>{l("verify_button_clicked"),Zp({loginHint:c?.email??"",codeChallenge:"test-code-challenge",codeChallengeMethod:"S256",flow:"thank_you_page_escrow",prompt:"login",proxy:!0,responseType:"code"},{onComplete:t})};return e(Le,{target:u?"card":"plain",children:e(z,{accessibilityLabel:s,colorLayer:u&&!d?"control":void 0,children:n?e(y,{padding:u?void 0:"base none",gap:"base",children:[e(De,{blockSize:"22px",inlineSize:"120px"}),e(De,{blockSize:"16px",inlineSize:"100%"}),e(De,{blockSize:"16px",inlineSize:"100%"})]}):e(y,{padding:u?void 0:"base none",gap:"large-200",children:[e(H,{gridAutoFlow:"column",gridTemplateColumns:"minmax(auto, max-content) minmax(0, 1fr)",gridTemplateRows:"minmax(0, 1fr)",justifyContent:"end",justifyItems:"end",alignItems:"center",alignContent:"center",children:[e(R,{level:2,children:s}),e(fn,{...Xp})]}),e(w,{color:"subdued",children:r.translate("thank_you.verify_shop_account_message")}),e(_e,{id:"verify-account-button",variant:"secondary",onClick:m,children:r.translate("thank_you.verify_shop_account_cta")})]})})})};function eh({showVerifyShopAccountButton:n}){const t=fa(),a=Ae(),r=gn(),{track:o}=zn(),i=ba();return{track:()=>{if(!t||!a)return;const{buyerHasShopApp:l,buyerHasShopPay:c,shopPayOrder:u,orderUpdateOptions:d}=a,m=d.filter(p=>p!=="arrive").join(",");o("order_status_page_view/4.2",{page:"thank_you",orderId:t,isShopPayOrder:u,userHasShop:l,userHasPay:c,shippingUpdateOptions:m,experimentFlags:i,pageviewToken:r.value.defaultAttributes?.microSessionId??"",sessionToken:r.value.defaultAttributes?.visitToken??"",showVerifyShopAccountButton:n},{omit:["shopifyDomain","checkoutToken"]})}}}function nh(){const{checkout:n}=v(),t=n.configuration.isUniversalCheckoutFinalizer;U(()=>{if(!t)return;const a=r=>{r.composedPath().some(th)&&r.preventDefault()};return document.addEventListener("click",a,!0),document.addEventListener("auxclick",a,!0),()=>{document.removeEventListener("click",a,!0),document.removeEventListener("auxclick",a,!0)}},[t])}function th(n){return n instanceof HTMLAnchorElement&&n.hasAttribute("href")}const ah={id:"ebcee8be9e6c7c28fbd55d8183745df83661612f69510c509fb5bd01a8b778e2",type:"query",name:"PublisherSettings",source:""},rh=Jt(({graphql:{coreGraphql:n}},{skip:t})=>{const a=n.query(ah,{skip:()=>t.value});return{adsPublisherSettingsTypEnabled:Ke(()=>a.data.value?.shop?.adsPublisherSettingsTypEnabled??!1),draftAdsPublisherSettingsTypEnabled:Ke(()=>a.data.value?.shop?.draftAdsPublisherSettingsTypEnabled??!1),error:a.error,loading:a.loading}});function oh({inEditor:n,adsPublisherSettingsTypEnabled:t,draftAdsPublisherSettingsTypEnabled:a,isAllowedLocale:r,isAllowedCountry:o}){const i=t,s=a;return n?{preview:!0,shouldRender:s}:{preview:!1,shouldRender:i&&r&&o}}const Ot=["CA","US"],ih=["en","de","fr","es"];function sh(){const{billingAddress:n,shippingAddress:t}=D(),{i18n:a}=v(),{geolocation:r}=Wr(),o=fe(An()),i=Ot.includes(r.country.code),s=C(()=>(t.value??n.value)?.countryCode??""),l=C(()=>Ot.includes(s.value)&&i),c=C(()=>!o.value&&(!Nt(a.locale)||!l.value)),{adsPublisherSettingsTypEnabled:u,draftAdsPublisherSettingsTypEnabled:d,loading:m}=ea(rh,{skip:c});return C(()=>c.value&&!o.value||m.value?{shouldRender:!1,preview:!1}:oh({adsPublisherSettingsTypEnabled:u.value,draftAdsPublisherSettingsTypEnabled:d.value,isAllowedLocale:Nt(a.locale),isAllowedCountry:l.value,inEditor:o.value}))}function Nt(n){return ih.some(t=>n===t||n.startsWith(`${t}-`))}const lh=/Shop App\/|FBAN|FBAV|FB_IAB|Instagram|musical_ly|Bytedance|TikTok|Snapchat|Line\/|MicroMessenger|Pinterest|Twitter\/|LinkedInApp|GSA\/|;\s?wv/;function ch(n){return lh.test(n)}const uh=/Shop App\/[^/]+\/(iOS|Android)\//;function dh(n){return uh.exec(n)?.[1]??Xt(n)}function ph(n,t=!1){const{observability:a}=v(),r=G(n),o=G(t),i=G(0),s=G(),l=G(!1),c=G(0),u=G(null);r.current=n,o.current=t,i.current===0&&(i.current=Date.now());const{contactInfo:d,merchandiseLines:m}=D();s.current===void 0&&(s.current=!!(d.peek()?.email||d.peek()?.phone||m.peek()?.lines?.length));const p=he(()=>{const g=typeof navigator>"u"?"":navigator.userAgent;return{is_in_app_webview:ch(g),browser_family:Eo(g).name,os_family:dh(g)}},[]),h=K(()=>{u.current==null&&document.visibilityState==="visible"&&!o.current&&r.current!=null&&(u.current=Date.now())},[]),_=K(()=>{u.current!=null&&(c.current+=Date.now()-u.current,u.current=null)},[]),b=K(()=>c.current+(u.current==null?0:Date.now()-u.current),[]);U(()=>{h();const g=()=>{document.visibilityState==="visible"?h():_(),a.log("typ_visibility_changed","Thank You Page visibility changed",{...p,receipt_masked:o.current,visibility_state:document.visibilityState,receipt_loaded:r.current!=null,ms_since_mount:Date.now()-i.current,visible_ms_with_receipt:b()},{exportImmediately:!0})},f=S=>{_(),a.log("typ_pagehide","Thank You Page hidden",{...p,receipt_masked:o.current,persisted:S.persisted,receipt_loaded:r.current!=null,ms_since_mount:Date.now()-i.current,visible_ms_with_receipt:b()},{exportImmediately:!0})};return document.addEventListener("visibilitychange",g),window.addEventListener("pagehide",f),()=>{_(),document.removeEventListener("visibilitychange",g),window.removeEventListener("pagehide",f)}},[a,h,_,b,p]),U(()=>{l.current||n==null||(l.current=!0,h(),a.log("typ_receipt_rendered","Thank You Page rendered with order receipt",{...p,receipt_masked:o.current,order_details_at_mount:s.current,ms_to_receipt:Date.now()-i.current,visibility_state:document.visibilityState},{exportImmediately:!0,requiresKeepalive:!0}))},[a,n,h,p])}function hh(n){const{observability:t,checkout:a}=v(),r=G(!1);U(()=>{r.current||(r.current=!0,t.counter({name:"thank_you_page_rendered",value:1,attributes:{shopPay:a.identity.current.value==="shopPay",checkoutDesign:a.configuration.layout.isOnePage.value?"ONE_STEP":"THREE_STEP",typType:"c1",visibility_state:document.visibilityState,receiptLoaded:n!=null}}))},[a,a.identity,t,n])}const mh="_4Qmfj",_h={ThankYou:mh};function rm(){const{i18n:n,url:t,shop:a,source:r,checkout:o,embed:i,router:s}=v(),{contactEmail:l,hasStorefront:c,externalDomain:u,previewReturnUrl:d}=a,{handleSetIsVerifiedShopAccount:m,status:p,isVerifiedShopAccount:h,fetchAttempts:_}=ll(),b=D().buyerIdentity.value?.purchasingCompany,g=Gr().value,{track:f}=Te("follow_link"),S=r.type==="simulated",T=!!i?.isFlagshipPartner,I=Q(),P=I?.paymentDetails?.buyerActionInfo,L=Mo(),M=Ui(),N=Fi(),W=qe(),$=Qe(),{
2currentDetour:Y}=mn().value,X=Kr().value,O=Oe(),te=O&&X&&jr({embedder:i?.embedder,isThankYouDetour:Y?.type==="thankYou",normalizedPath:s.currentUrl.value.normalizedPath}),{main:{section:ae}}=En(),B=sh(),ue=o.configuration.layout.isOnePage.value,ne=o.configuration.isUniversalCheckoutFinalizer,se=a.hasFlagEnabled(ce),Ie=!se&&Ao(ae);Qr("thank-you");const{track:be}=eh({showVerifyShopAccountButton:p==="split_user"});xo({stage:I===void 0?Zn.Usable:Zn.Complete,id:"ThankYou"}),Do("ThankYou"),U(()=>{be()},[be]);const Re=ke("Checkout::ThankYou::Dynamic::Render","ORDER_STATUS1"),J=ke("Checkout::ThankYou::Dynamic::Render","ORDER_STATUS2"),Ne=ke("Checkout::ThankYou::Dynamic::Render","ORDER_STATUS3"),{header:{logo:Pe}}=En(),me=he(()=>{if(!c&&u)return`https://${u}`;if(S)return t.storefront();if(d)return d;if(Pe?.link)return Pe.link;if(r.headerLogoUrl)return r.headerLogoUrl;if(c&&t.storefront())return t.storefront()},[S,Pe?.link,r.headerLogoUrl,c,t,u,d]);Bi(me,c&&!g&&!ne),nh(),ph(I,T),hh(I);const Be=e(x,{children:[e(Ro,{children:n.translate("thank_you.title")}),e(y,{gap:"@media (inline-size >= medium) large-500, large-300",children:[!O&&e(dt,{}),e(yh,{resetSectionStyle:se,children:[e(Le,{target:"card",children:e(Oo,{grouped:!0,children:[e(
2on,{customizations:Re}),P&&e(Ys,{}),e(Le,{target:"edgeToEdgeCard",children:e(Cp,{children:O?e(dt,{}):null})}),te&&e(Wp,{}),e(Xl,{}),e(E,{when:$,children:e(ku,{})}),!ne&&B.value.shouldRender&&e(Le,{target:"edgeToEdgeCard",children:e(sc,{preview:B.value.preview})}),e(E,{when:N,children:e(Ni,{})}),!ne&&e(E,{when:M,children:e(gu,{})}),e(E,{when:L,children:e(Rl,{})}),P&&e(Vi,{}),e(on,{customizations:J}),e(E,{when:()=>W.value&&!$.value,children:e(Su,{})}),h||ne?null:e(Jp,{onSignInCompleted:m,loading:p==="fetching_status",fetchAttempts:_}),e(Pl,{}),e(on,{customizations:Ne})]})}),e(No,{children:[!b&&!g&&o.configuration.allowRedirectToStorefront&&e(Bo,{children:e(_e,{variant:"primary",size:"large",inlineSize:"fill",href:me,onClick:S?void 0:()=>f("continue_shopping"),children:n.translate("thank_you.return_to_store_link_label")})}),!ne&&e(Fo,{children:e(w,{textAlign:"center",children:e(Me,{children:n.translate("thank_you.contact_us_html",{contact_us:e(Ce,{href:S?void 0:`mailto:${l}`,onClick:S?void 0:()=>f("contact_us"),children:n.translate("thank_you.contact_us")})})})})})]})]})]})]}),Fe=ue?e(A,{className:_h.ThankYou,padding:`@media (inline-size >= extraSmall) small-300 none, (inline-size >= medium) none, ${Ie?"small-300 none":"none"}`,children:Be}):Be;return e(qp,{children:Fe})}function yh({children:n,resetSectionStyle:t}){const a=e(Uo,{children:n});return t?e(Vt,{children:a}):a}export{rm 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.