PageSourceSearch

https://munikids.com/cdn/shopifycloud/checkout-web/assets/c1/page-ThankYou.B6ERrHHV.js

js munikids.com collected 2026-09-30 14:43:44 UTC 150,408 bytes, 2 lines download raw bytes

1import{k as re,u as e,S as D,A as G,h as F,e as J,T as pe,y as In,q as K,f as C,g as N,_ as wn,ai as Za,E as Ke,j as Wn,l as he,i as E,p as ln,D as Xa,av as Ja,X as Nt,x as Bt,W as Vn,aB as er,L as nr,Y as tr,Z as ar,n as Gn,o as rr}from"./esnext-vendor.7EcvH7tF.js";import{eD as j,j as me,k as _,I as ie,l as S,cq as ir,V as or,y as U,a8 as Ft,cP as sr,P as w,m as L,$ as Y,cv as An,gP as lr,n as mn,o as Ut,ad as cr,a5 as Ee,L as ke,B as A,a6 as Rn,cX as ur,db as Ht,cy as Ye,ag as Oe,cm as Qe,W as Ln,aB as dr,bS as pr,el as zt,hQ as hr,hR as Yt,hS as mr,c2 as _r,a0 as Ze,b as yr,p as Ie,U as on,hT as Ne,fW as qt,hU as ve,aj as _n,C as xn,hV as en,hW as nn,hX as tn,hY as gr,gK as fr,hZ as br,h_ as vr,h$ as kr,i0 as Sr,i1 as Cr,J as Dn,aX as $t,bx as Tr,b1 as Pr,H as Ir,ey as Wt,i2 as wr,u as Vt,_ as En,i as Gt,a as Er,br as Mr,S as Ar,i3 as yn,cr as Kt,i4 as Rr,i5 as Lr,dH as xr,N as Dr,O as Or,az as Nr,aA as Br,i6 as Fr,eA as Ur,ck as Hr,bo as zr,i7 as Yr,i8 as qr,M as $r}from"./hydrate.DbBIWEk-.js";import{H as je,Q as v,a2 as x,af as ce,ja as Wr,jb as On,bI as jt,ek as Nn,aL as Vr,aH as Xe,c6 as gn,jc as Gr,cp as Qt,at as Zt,ax as Mn,S as Kr,aV as Xt,bF as Jt,dn as ea,cN as jr,b5 as Qr,dP as Zr,b3 as Xr,jd as Jr,c8 as na,je as ei,V as Kn,aR as ni,jf as ta,cD as ti,aG as aa,dh as ai,jg as ri,ci as ii,jh as oi,bg as Bn,ji as si,b0 as li,ew as ci,eq as ra,n as Fn,jj as ui,cz as di,ef as ia,jk as cn,bL as pi,B as hi,jl as mi,ak as _i,jm as yi,jn as gi,eN as fi,fZ as bi,jo as vi,b7 as jn,as as ki,i2 as Si,iZ as Ci,ab as Ti}from"./utilities-previous.C42MP_Mw.js";import{d as Me,c as Pi,S as fn}from"./hooks-useShowShopPayOptin.DLrhKtTG.js";import{E as oa}from"./EmailField.C14V4Fyv.js";import{u as Ii,S as Qn,f as wi,d as Ei,c as Mi,P as Ai,a as Ri,b as Li}from"./Page.Coo-tm2O.js";import{S as Ae}from"./hooks-usePickupPoints.avsHv-hM.js";import{b as sa,i as xi,s as la,c as Di,a as Oi}from"./shipping-methods-consolidated-included.DMw6JHFz.js";import{d as ca,b as Ni}from"./MerchandiseModal.22QlY5ZF.js";import{P as W}from"./PaymentIcon.B7-3_jXb.js";import{P as Bi}from"./Pressable.Dzzcqa3E.js";import{u as Fi,A as Je}from"./AddressPresenter.DCZt0CYc.js";import{C as ua}from"./Checkbox.D-f3QQ5T.js";import{P as Ui}from"./PhoneField.DwUibqcs.js";import{v as Hi,a as zi,S as un,d as Yi}from"./useShopPayButtonClassName.Dh_1kUR1.js";import{l as $e,m as qi,r as da,S as pa,M as ha,R as ma,n as $i,c as Wi,o as Vi,h as Gi,a as Ge,p as Ki,I as ji,f as Qi,g as Q,j as Zi,k as Xi,q as Ji,P as eo,s as no,C as to,t as ao}from"./useAuthorizeUrl-index.DfmMGP4X.js";import{g as ro,T as io}from"./Theme-ThemeOverride.R4Pcj3x4.js";import{P as oo,M as so,m as _a}from"./Map.D8IhjdcD.js";import{C as lo}from"./OffsitePaymentFailed.DzjWrdFl.js";import{P as co}from"./Popover.BKZ7RQbD.js";import{I as uo}from"./hooks-useStableHostMethodsReferences.Gbfqh2hO.js";import{I as ya}from"./ImpressionEventCapture.CTaz86gY.js";import{S as bn,P as po}from"./addresses-is-address-empty.c1RwzK2R.js";import{S as ho}from"./ShipmentLine.BW2f9jSW.js";import{a as mo,i as _o}from"./EstimatedDeliveryContent.B0OSfbru.js";import{D as yo,B as go}from"./BuyWithPrimeOrderTrackingButton.CPnRWHNY.js";import{S as fo,a as bo}from"./ShipmentBreakdown.CPViZu4b.js";import{a as Un,u as vo}from"./hooks-useShouldRevealCustomization.vFBBGO5a.js";import"./app.DklQzmA_.js";import{f as ko}from"./shared-permissions.DaHnWepz.js";import{T as So}from"./TransitionHeight.CWQ6RrPa.js";import{v as Co}from"./dist-v4.EwEgHOG0.js";import"./shared-negotiation-input-redeemable.Bd3YWCwY.js";import"./hooks-useShopPayExternalAppContext.CJygX3OQ.js";import"./components-RedirectionNotice.module.Bd2sET81.js";import"./amazon-pay-useAmazonPayPaymentLine.B67X6gPb.js";import"./hooks-useSuppressShopPayModalOnLoad.TozpD3Nk.js";import"./ShippingMethodRateLabel.6_DjUqL6.js";import"./shipping-methods-grouping.BpmbHANr.js";import"./amazon-constants.BnCZXorl.js";const To={id:"0c62c3aaedf84bd307e1134828e5fcc88a47d83c453c97544a6cc8711e6444af",type:"mutation",name:"SubscribeForShippingUpdates",source:""};class Zn extends Error{constructor(){super(...arguments),this.name="SubscribeForShippingUpdateError"}}function Po(){const{client:n,observability:t,graphql:{coreGraphql:a}}=v(),r=n.unstable_getSerialization("sessionToken"),[i,o]=re(),[s,l]=re("idle"),u=j()?.orderIdentity?.id;async function d(h){if(l("loading"),o(void 0),!r||!u){l("failed"),o("SUBSCRIPTION_FAILED"),t.error(new Zn("Missing sessionToken or orderId"));return}const{data:p}=await a.mutate(To,{variables:{sessionToken:r,orderId:u,email:h}});if(p){const{__typename:m}=p?.subscribeForShippingUpdates;switch(m){case"SubscribeForShippingUpdatesSuccess":l("subscribed");return;case"SubscribeForShippingUpdatesFailure":l("failed"),o(p?.subscribeForShippingUpdates.code);return;
1default:l("idle"),t.error(new Zn("Undefined subscribeForShippingUpdates type"))}}}return{submitSubscribeForShippingUpdate:d,status:s,error:i}}function Hn(){const{checkout:n}=v(),t=Me(),r=j()?.isRedacted??!1,i=!!t?.shopAppEligible,o=!!t?.shopAppQrCodeKillswitch;return!r&&i&&!o&&!n.configuration.isUniversalCheckoutFinalizer}function ga(){const n=j();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 Io({children:n,open:t,label:a,onClick:r,icon:i}){return t?e(D,{children:n}):e(_,{direction:"inline",gap:"base",children:e(me,{onClick:r,"aria-expanded":!1,children:e(_,{direction:"inline",gap:"small-200",alignItems:"center",children:[e(ie,{type:i}),e(S,{children:a})]})})})}const wo=({label:n,onInputValueChange:t,error:a,value:r})=>{const i=G();return F(()=>{i.current?.focus()},[a]),e(oa,{id:"email",name:"email",label:n,ref:i,onInput:t,required:!0,error:a,value:r})},Eo=({onHandleSubmit:n,isFormSubmitting:t,subscriptionErrorMessage:a})=>{const r=J(""),{i18n:i}=v(),o=r.value,s=pe(()=>In(void 0),[a]),l=s.value,[c,u]=re(!1),d=i.translate("thank_you.order_updates_submit_subscription"),h=pe(()=>({state:{email:r},errors:{email:s}}),[r,s]),p=()=>{if(u(!1),!/@/.test(o)){s.value=i.translate("field_errors.email_invalid");return}s.value=void 0,n(o)},m=g=>{s.value=void 0,u(!0),r.value=g};return F(()=>{c||(l||a)&&(s.value=l||a)},[c,l,a,s]),e(sr,{target:"order.deliveryUpdates",children:e(ir,{...h,children:e(or,{onSubmit:p,implicitSubmit:d,children:e(_,{gap:"small-300",children:[e(U,{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(wo,{label:i.translate("contact.email_label"),value:o,error:!!l,onInputValueChange:m}),e(me,{variant:"primary",type:"submit",loading:t,children:d})]}),l?e(Ft,{controlID:"email",children:l}):null]})})})})},Mo=()=>{const{i18n:n}=v(),{value:t}=x().contactInfo,{submitSubscribeForShippingUpdate:a,status:r,error:i}=Po(),[o,s]=re(sn.DisplayButton),[l,c]=re(!0),u=g=>{g&&a(g)},h=K(g=>{switch(g){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])(i);F(()=>{c(r!=="subscribed")},[r,i]);const p=()=>{t?.email?u(t.email):s(sn.DisplayForm)},m={subTitle:n.translate("thank_you.order_status_updates_with_email"),fieldLabel:n.translate("thank_you.order_updates_subscribe_to_email_notifications")};return e(D,{children:[e(w,{children:m.subTitle}),l&&e(_,{gap:"base",padding:"base none none none",children:e(Io,{label:m.fieldLabel,open:o===sn.DisplayForm,icon:"email",onClick:p,children:e(Eo,{onHandleSubmit:u,isFormSubmitting:r==="loading",subscriptionErrorMessage:h})})})]})},Ao=()=>{const{i18n:n,shop:t}=v(),a=t.hasFlagEnabled(ce),r=n.translate("thank_you.order_updates_title");return e(Y,{accessibilityLabel:r,colorLayer:a?void 0:"control",children:e(_,{gap:"small-200",children:[e(L,{children:r}),e(Mo,{})]})})};function Ro(n,t=!0){const{router:a}=v(),r=An();F(()=>{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 i=()=>{document.hidden||(window.location.href=n)};return window.addEventListener("popstate",i),()=>{window.removeEventListener("popstate",i)}}},[t,n,a,r])}function Lo(){const n=x(),t=n.buyerIdentity,a=Wr(),r=lr(),i=n.contactInfo,s=j()?.isRedacted??!1;return C(()=>!s&&r.value&&!i?.value?.email&&!t?.value?.purchasingCompany&&!a.value)}function xo(){const n=x().paymentLines,t=Me();return C(()=>(n.value?n.value.lines.some(({method:r})=>r.type==="wallet"&&r.name==="SHOPIFY_INSTALLMENTS"):!1)&&!!t?.installmentsHighlightEligible)}function Do(){const n=x(),t=n.deliveryNext,a=n.deliveryExpectations;return C(()=>{const r=t.value,i=a.value,o=r?.status==="filled",s=i?.status==="filled",l=o&&r.lines.some(p=>p.type==="ONE_TIME_PURCHASE"&&p.status==="available"&&p.methods.some(m=>m?.brandedPromise)),c=o?new Set(r.lines.filter(p=>p.status==="available").map(p=>p.status==="available"?p.selectedDeliveryMethodHandle:null)):null,u=s&&i.deliveryExpectationLine
1s.some(({brandedPromise:p,deliveryStrategyHandle:m})=>p&&c?.has(m)),d=l||u,h=s&&i.deliveryExpectationLines.some(({brandedPromise:p,deliveryExpectationPresentmentTitle:m})=>!p&&m?.short&&m?.long);return!!(d||h)})}function qe(){const{deliveryNext:n}=x(),t=Do(),a=mn(),r=ca(),i=On();return C(()=>{const o=jt(n.value),s=Ut(a.value.currentDetour),l=i.value.length>=Nn,{oneTimePurchaseLines:c,subscriptionLines:u}=cr(Vr(n.value).filter(Xe)),{groups:d,nonShippableCount:h}=sa(c),p=n.value?.status==="filled"&&d.length+h===1;return o&&l&&!p||p&&u.length>=2||r.value||t.value&&s})}const Oo="MultibancoBuyerActionInfo",No=(n,t)=>n.length===0?t:Object.keys(t).reduce((r,i)=>n.includes(i)?r:{...r,[i]:t[i]},{}),zn=()=>{const{userEvents:n,checkout:t,shop:{myshopifyDomain:a,id:r},source:{checkoutSessionIdentifier:i="checkout_identifier_undefined"}}=v(),o=t.configuration.layout.isOnePage.value,s=Number(je(r)),l=o?"checkout_one_redesign":"checkout_one",c=pe(()=>({checkoutToken:i,shopId:s,checkoutVersion:l,shopifyDomain:a}),[i,l,a,s]);return{track:K((d,h,p)=>{n.monorailEvent({schemaId:d,payload:No(p?.omit??[],{...c,...h})})},[c,n])}};function Bo(){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 fa(){return Bo()}function Se(n){const t=gn(),a=ga(),{track:r}=zn(),i=fa();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:i},{omit:["shopifyDomain"]})},[i,n,r,a,t])}}function Fo(){const n=x().paymentLines,t=j()?.paymentDetails,{track:a}=Se("follow_link"),{i18n:r,source:i,shop:{contactEmail:o}}=v(),s=i.type==="simulated",l=C(()=>{const d=n.value?.lines,h=(d?Gr(d):void 0)?.cost;if(h)return r.formatCurrency(h.amount,{form:"short",currency:h.currencyCode});const p=Number.parseFloat(t?.paymentAmount??""),m=t?.paymentCurrency;return Number.isFinite(p)&&m?r.formatCurrency(p,{form:"short",currency:m}):0}),c=C(()=>r.translate("payment.pending_payment.multibanco.buyer_action_info",{amount_due:l.value})),u=t?.buyerActionInfo;return e(_,{gap:"base",children:e(_,{gap:"small-200",children:[e(L,{children:c}),e(_,{direction:"inline",gap:"base",children:e(Ee,{children:r.translate("payment.pending_payment.multibanco.instruction_html",{contact_us:e(ke,{href:s?void 0:`mailto:${o}`,onClick:s?void 0:()=>a("contact_us"),children:r.translate("thank_you.contact_us")})})})}),e(U,{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(Y,{children:e(_,{gap:"base",children:[e(_,{gap:"small-200",children:e(L,{children:r.translate("payment.pending_payment.multibanco.entity")})}),e(_,{gap:"small-200",children:e(S,{children:u?.entity})})]})}),e(Y,{children:e(_,{gap:"base",children:[e(_,{gap:"small-200",children:e(L,{children:r.translate("payment.pending_payment.multibanco.reference")})}),e(_,{gap:"small-200",children:e(S,{children:u?.reference})})]})}),e(Y,{children:e(_,{gap:"base",children:[e(_,{gap:"small-200",children:e(L,{children:r.translate("payment.pending_payment.multibanco.amount")})}),e(_,{gap:"small-200",children:e(S,{children:l})})]})})]})]})})}function Uo(){const{i18n:n,shop:t}=v(),a=j()?.paymentDetails?.buyerActionInfo,r=t.hasFlagEnabled(ce);return a?.__typename!==Oo?null:e(Y,{accessibilityLabel:n.translate("thank_you.customer_information_title"),colorLayer:r?void 0:"control",children:e(Fo,{})})}function ba(n){return!!(n?.label&&n?.text)}function Ho(n){return n.details?.filter(ba)??[]}function va(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 ka(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 Sa(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 zo="TNF54",Yo="Bedu9",qo="RExUg",$o="CMO8N",Wo="Bgyek",Vo="JuwoV",Go="_8A0Cd",Ko="JIcdC",jo="Xaalv",Pe={Chains:zo,Chain:Yo,ChainOpen:qo,Steps:$o,Step:Wo,Chin:Vo,ChainBody:Go,ChainBodyInner:Ko,ChainHeader:jo},Qo={familymart:"familymart",lawson:"lawson",ministop:"ministop",seicomart:"seicomart"},Xn="Asia/Tokyo";function Ca(n){return!!(n?.label&&n?.text)}function Ta(n){return n.key??n.label??"konbini"}function Zo(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 Xo(n,t){if(!n)return;const a=new Date(n),r=t.formatDate(a,{month:"short",day:"numeric",year:"numeric",timeZone:Xn}),i=t.formatDate(a,{hour:"numeric",minute:"2-digit",hour12:!0,timeZone:Xn});return t.translate("payment.lpm.konbini.voucher.expiry_date_time",{date:r,time:i})}function Jo({detail:n,id:t}){const{i18n:a}=v(),r=J(!1),i=async()=>{try{await Ht(n.text),r.value=!0}catch{r.value=!1}},o=a.translate("payment.lpm.konbini.voucher.code_copied");return e(D,{children:[e(ur,{id:t,name:t,label:n.label,value:n.text,readOnly:!0,accessoryEnd:e(me,{variant:"tertiary",size:"small",onClick:i,accessibilityLabel:r.value?o: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:Qt({screenReaders:"only"}),children:r.value?o:""})]})}function es({instructionSet:n,open:t,onToggle:a}){const r=Ta(n),i=n.label??r,o=(n.details??[]).filter(Ca),s=(n.steps??[]).filter(Boolean),l=`konbini-chain-${r}-instructions`;return e("div",{id:`konbini-chain-${r}`,className:N(Pe.Chain,t&&Pe.ChainOpen),children:[e(Bi,{accessibilityRole:"expandableControl",accessibilityLabel:i,controlId:l,expanded:t,onPress:a,className:Pe.ChainHeader,padding:"base",children:e(U,{gridTemplateColumns:"auto minmax(0, 1fr) auto",gap:"small-300",alignItems:"center",children:[e(W,{type:Qo[r]??"konbini",active:!0,accessibilityVisibility:"hidden"}),e(S,{type:"strong",children:i}),e(ie,{type:t?"chevronUp":"chevronDown",size:"small"})]})}),e("div",{className:Pe.ChainBody,children:e(U,{id:l,gridTemplateRows:t?"minmax(0, 1fr)":"minmax(0, 0fr)",children:e("div",{className:Pe.ChainBodyInner,children:e(A,{inert:!t,padding:"base",paddingBlockStart:"none",children:e(_,{gap:"base",children:[e(U,{gridTemplateColumns:o.length>1?"minmax(0, 1fr) minmax(0, 1fr)":"1fr",gap:"small-400",children:o.map((c,u)=>e(Jo,{detail:c,id:`konbini-${r}-code-${u}`},c.label))}),s.length>0?e("ol",{className:Pe.Steps,children:s.map(c=>e("li",{className:Pe.Step,children:e(S,{color:"subdued",size:"base",children:c})},`${r}-${c}`))}):null]})})})})})]})}function ns({amount:n,expired:t}){const{i18n:a}=v();return t?e(L,{level:1,children:a.translate("payment.lpm.konbini.voucher.expired_title")}):n?e(L,{level:1,children:[e(S,{accessibilityVisibility:"exclusive",children:a.translate("payment.lpm.konbini.voucher.pay",{amount:n.accessibleAmount})}),e(S,{accessibilityVisibility:"hidden",size:"extraLarge",children:a.translate("payment.lpm.konbini.voucher.pay",{amount:n.value})})]}):null}function ts({expiryDate:n,expired:t}){const{i18n:a}=v();if(!n)return null;const r=e(S,{color:"subdued",size:"base",type:"strong",children:n});return e(S,{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 as({paymentInstructions:n}){const{i18n:t}=v(),a=(n.instructionSets??[]).filter(c=>(c.details??[]).some(Ca)),r=J(null);if(a.length===0)return null;const i=Zo(n,t),o=Sa(n),s=Xo(n.expiresAt,t),l=t.translate("payment.lpm.konbini.voucher.label");return e(Rn,{children:e(_,{gap:"none",children:[e(A,{accessibilityLabel:l,accessibilityRole:"section",background:"base",colorLayer:"control",border:"base",borderRadius:o?"large":"large large none none",padding:"large-100",inlineSize:"100%",children:e(_,{gap:"base",children:[e(_,{gap:"small-300",children:[e(U,{alignItems:"start",ga
1p:"base",gridTemplateColumns:"minmax(0, 1fr) auto",children:[e(ns,{amount:i,expired:o}),e(W,{type:"konbini",active:!0,accessibilityVisibility:"hidden"})]}),o?null:e(S,{color:"subdued",size:"base",children:t.translate("payment.lpm.konbini.voucher.choose_outlet")}),e(ts,{expiryDate:s,expired:o})]}),o?null:e("div",{className:Pe.Chains,role:"group","aria-label":l,children:a.map(c=>{const u=Ta(c);return e(es,{instructionSet:c,open:r.value===u,onToggle:()=>{r.value=r.value===u?null:u}},u)})})]})}),o?null:e(A,{className:Pe.Chin,padding:"base",paddingInline:"large-100",children:e(S,{color:"subdued",size:"base",children:t.translate("payment.lpm.konbini.voucher.keep_receipt")})})]})})}const rs="Gltpp",is={CodeValue:rs};function os({details:n}){const{i18n:t}=v();return e(_,{gap:"small-500",children:n.map(a=>e(A,{borderRadius:"base",className:is.CodeValue,inlineSize:"100%",children:e(S,{type:"small",color:"subdued",children:t.translate("payment.pending_payment.multibanco.labelled_code",{label:a.label,code:a.text})})},a.label))})}function ss({step:n,expiry:t}){const{i18n:a}=v();return n?e(_,{gap:"none",children:[e(S,{color:"subdued",size:"base",children:n}),t?e(S,{color:"subdued",size:"base",children:a.translate("payment.pending_payment.multibanco.expires_at",{date:e(S,{color:"subdued",size:"base",type:"strong",children:t})})}):null]}):null}function ls({expiry:n}){const{i18n:t}=v();return n?e(S,{color:"subdued",size:"base",children:t.translate("payment.pending_payment.multibanco.expired",{date:e(S,{color:"subdued",size:"base",type:"strong",children:n})})}):null}function cs({amount:n,expired:t}){const{i18n:a}=v();return t?e(L,{level:1,children:a.translate("payment.pending_payment.multibanco.expired_title")}):n?e(L,{level:1,children:[e(S,{accessibilityVisibility:"exclusive",children:a.translate("payment.pending_payment.multibanco.pay",{amount:n.accessibleAmount})}),e(S,{accessibilityVisibility:"hidden",size:"extraLarge",children:a.translate("payment.pending_payment.multibanco.pay",{amount:n.value})})]}):null}function us({paymentInstructions:n}){const{i18n:t}=v(),a=n.instructionSets?.find(({key:u})=>u==="multibanco");if(!a)return null;const r=Ho(a);if(r.length===0)return null;const i=va(n,t),o=Sa(n),s=ka(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(_,{gap:"small-200",children:[e(U,{alignItems:"start",gap:"base",gridTemplateColumns:"minmax(0, 1fr) auto",children:[e(cs,{amount:i,expired:o}),e(W,{type:"multibanco",active:!0,accessibilityVisibility:"hidden"})]}),o?e(ls,{expiry:l}):e(ss,{step:a.steps?.[0],expiry:l}),e(os,{details:r})]})})})}const ds="/cdn/shopifycloud/checkout-web/assets/c1/assets/add-to-apple-wallet.c2C6mOjH.svg",ps="_8CGB7",hs="chT5l",Jn={AppleWalletBadge:ps,AppleWalletAction:hs},ms=/Shop App\/[^/]+\/iOS\//;function _s(n){const t=Zt(n);return t==="iOS"||t==="Mac OS"||ms.test(n)}function ys({passUrl:n}){const{client:t,i18n:a}=v();return!n||!_s(t.userAgent)?null:e(A,{className:Jn.AppleWalletAction,paddingBlockStart:"large-100",children:e(U,{justifyItems:"center",children:e(ke,{href:n,children:e(Ye,{src:ds,alt:a.translate("payment.pending_payment.apple_wallet.badge_alt"),className:Jn.AppleWalletBadge,inlineSize:"auto"})})})})}const gs=200,fs=8,et=8;function Pa(n){return Math.round(n/et)*et}function Ia(n,t){try{const a=new URL(n);return a.searchParams.set("width",t.toString()),a.toString()}catch{return n}}function bs(n){try{const t=Number(new URL(n).searchParams.get("width"));return Number.isFinite(t)&&t>0?Pa(t):void 0}catch{return}}function vs(n,t){const a=bs(n);return a!=null&&Math.abs(a-t)<fs}function ks(n){const t=G(null),a=G(n),r=G(null),i=G(0),o=J(n),s=J(!1);return wn(()=>{i.current+=1,a.current=n,r.current=null,o.value=n,s.value=!1},[n,s,o]),wn(()=>{const l=t.current;if(!n||!l)return;const c=typeof ResizeObserver<"u";let u,d=!1;const h=()=>{i.current+=1,r.current=null,s.value=!1,u&&(clearTimeout(u),u=void 0)},p=(y,f)=>{const k=Ia(n,y),T=new window.Image;T.onload=()=>{!d&&f===i.current&&(a.current=k,r.current=null,o.value=k,s.value=!1)},T.onerror=()=>{!d&&f===i.current&&(r.current=null,s.value=!1)},T.src=k},m=y=>{const f=Pa(y);if(f<=0)return;const k=a.current;if(k&&vs(k,f)){h();return}if(r.current===f){s.value=!0;return}r.current=f;const T=i.current+1;i.current=T,s.value=!0,u&&clearTimeout(u),u=setTimeout(()=>p(f,T),gs)},g=()=>{m(l.getBoundingClientRect().width)};if(g(),!c)return window.addEventListener("resize",g),()=>{d=!0,u&&clearTimeout(u),window.removeEventListener("resize",g)};const b=new ResizeObserver(([y])=>{y&&m(y.contentRect.width)});return b.observe(l),()=>{d=!0,u&&clearTimeout(u),b.disconnect()}}
1,[n,s,o]),{containerRef:t,imageUrl:o,isLoading:s}}const Ss="TBsba",Cs="PITIE",Ts="Fmqjk",kn={BarcodePicture:Ss,BarcodeImage:Cs,LoadingOverlay:Ts},Ps=510;function Is({imageUrl:n,altText:t,height:a,printWidth:r=Ps}){const{containerRef:i,imageUrl:o,isLoading:s}=ks(n),l=o.value||n,c=Ia(n,r);return e(A,{ref:i,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(Oe,{contentDisplay:"block",inlineSize:"100%",blockSize:"100%",delay:!1})}):null]})})}const ws="OVcKI",Es={ReferenceValue:ws},Ms="67.5px",As="510px";function Rs({barcode:n,detail:t}){if(!n?.imageUrl)return null;const a=t?`${t.label}: ${t.text}`:"";return e(A,{inlineSize:"100%",maxInlineSize:As,children:e(Is,{imageUrl:n.imageUrl,altText:n.altText||a,height:Ms})})}function Ls({step:n,expiry:t}){const{i18n:a}=v();return n?e(_,{gap:"none",children:[e(S,{color:"subdued",size:"base",children:n}),t?e(S,{color:"subdued",size:"base",children:a.translate("payment.pending_payment.oxxo.expires_at",{date:e(S,{color:"subdued",size:"base",type:"strong",children:t})})}):null]}):null}function xs({detail:n}){const{i18n:t}=v(),a=t.translate("payment.pending_payment.oxxo.reference_number");return e(A,{borderRadius:"base",className:Es.ReferenceValue,inlineSize:"100%",children:e(S,{type:"small",color:"subdued",children:[a," ",n.text]})})}function Ds({paymentInstructions:n}){const{i18n:t}=v(),a=n.instructionSets?.find(({key:u})=>u==="oxxo");if(!a)return null;const r=va(n,t),i=a.details?.find(ba),o=a.steps?.[0],s=ka(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(_,{gap:"small-200",children:[e(U,{alignItems:"start",gap:"base",gridTemplateColumns:"minmax(0, 1fr) auto",children:[r?e(L,{level:1,children:[e(S,{accessibilityVisibility:"exclusive",children:t.translate("payment.pending_payment.oxxo.pay",{amount:r.accessibleAmount})}),e(S,{accessibilityVisibility:"hidden",size:"extraLarge",children:t.translate("payment.pending_payment.oxxo.pay",{amount:r.value})})]}):null,e(W,{type:"oxxo",active:!0,accessibilityVisibility:"hidden"})]}),e(Ls,{step:o,expiry:l}),e(_,{gap:"none",children:[e(Rs,{barcode:a.barcode,detail:i}),i?e(xs,{detail:i}):null,e(ys,{passUrl:a.appleWalletPassUrl})]})]})})})}function Os({paymentInstructions:n}){switch(n.method?.toLowerCase()){case"multibanco":return e(us,{paymentInstructions:n});case"oxxo":return e(Ds,{paymentInstructions:n});case"konbini":return e(as,{paymentInstructions:n});default:return null}}function Ns(){const t=j()?.paymentDetails?.buyerActionInfo?.paymentInstructions;return t?e(Os,{paymentInstructions:t}):null}function Bs(){const{i18n:n}=v();return e(S,{size:"small",color:"subdued",children:e(Ee,{children:n.translate("shop_pay_remember_me.terms_and_privacy_html",{privacy_href:e(Us,{}),terms_href:e(Fs,{})})})})}function Fs(){const{i18n:n}=v();return e(D,{children:e(ke,{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 Us(){const{i18n:n}=v();return e(D,{children:e(ke,{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 Hs({field:n="phone",link:t}){const{i18n:a}=v();return e(D,{children:[e(S,{color:"subdued",children:e(Ee,{children:[n==="phone"?a.translate("shop_pay_remember_me.description_html"):a.translate("shop_pay_remember_me.email_description_html")," ",t]})}),e(Bs,{})]})}function wa(){const{shopPayArtifact:n}=x();return C(()=>!!n.value?.optIn)}
1class zs extends Error{constructor(){super(...arguments),this.name="OptInFetchError"}}function Ys(){const{userEvents:n,source:t,checkout:a,shop:r,i18n:i,url:o,shop:{checkoutPublicAccessToken:s},source:{checkoutSessionIdentifier:l}}=v(),c=wa(),u=x(),{value:d}=u.shippingAddress,{value:h}=u.contactInfo,[p,m]=re(c.peek()),[g,b]=re(!1),[y,f]=re(d?.phone||h?.phone||""),[k,T]=re(h?.email??""),[P,I]=re(),[M,R]=re(),B=!h?.phone,{validatePhoneNumber:V}=Fi(),$=K(O=>{const ee=Hi(O,i.translate("field_errors.email_blank")),oe=zi(O,i.translate("field_errors.email_invalid"));return ee||oe},[i]),H=K(()=>{P&&I(void 0)},[P]),Z=K(async()=>{if(R(void 0),B){const O=!y.includes("+");if(!V(y,O?d?.countryCode:void 0)){I(i.translate("field_errors.thank_you_remember_me_phone_invalid"));return}}else{const O=$(k);if(O){I(O);return}}n.monorailEvent({schemaId:"shopify_pay_user_optin_ui_interaction/3.2",payload:{...Mn(t,a,r),action:B?"update_phone_input":"update_email_input",phoneNumber:y,email:k,source:"thank_you_page",trigger:"manual"}});try{b(!0);const O=await fetch(o.shopPayOptin(l),{method:"POST",body:JSON.stringify({checkout:{vault_phone:y,vault_email:k,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:ee}=await O.json();ee?m(!0):R(i.translate("shop_pay_remember_me.errors.optin_retry"));return}throw new zs("Opt in request didn't succeed")}catch{I(i.translate("shop_pay_remember_me.errors.optin"))}finally{b(!1)}},[n,t,a,r,o,l,s,y,k,B,d?.countryCode,V,$,i]);return{hasOptedIn:p,loading:g,errorBannerContent:M,handleSave:Z,showPhoneField:B,phoneNumber:y,setPhoneNumber:f,email:k,setEmail:T,inputError:P,handleInput:H,countryCode:d?.countryCode||""}}function qs(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 $s(){const{track:n}=Se("follow_link"),{i18n:t,userEvents:a,source:r,checkout:i,shop:o}=v(),{hasOptedIn:s,loading:l,errorBannerContent:c,handleSave:u,showPhoneField:d,phoneNumber:h,setPhoneNumber:p,email:m,setEmail:g,inputError:b,handleInput:y,countryCode:f}=Ys(),k=J(s),{value:T}=x().deliveryNext,{value:P}=Qe(),I=jt(T),M=qs(!I||P),R=Kr().shippingAddress,B=C(()=>R.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"})})),V=C(()=>R.value.oneTimeUse?t.translate("shop_pay_remember_me.payment_information_only_label"):t.translate("shop_pay_remember_me.label")),$=e(D,{children:V});F(()=>{a.monorailEvent({schemaId:"shopify_pay_user_optin_ui_impression/1.0",payload:{...Mn(r,i,o),source:"thank_you_page",elementType:"remember_me_box"}})},[a,r,i,o]);const H=()=>{const ee=!k.value;a.monorailEvent({schemaId:"shopify_pay_user_optin_ui_interaction/3.2",payload:{...Mn(r,i,o),action:ee?"click_remember_me_box":"unclick_remember_me_box",phoneNumber:h,email:m,source:"thank_you_page",trigger:"manual"}}),k.value=ee},Z=e(ke,{target:"_blank",href:"https://shop.app/pay",onClick:()=>{n("learn_more_pay")},children:t.translate("shop_pay_remember_me.learn_more")});return e(A,{...M,children:s?e(U,{gridAutoFlow:"column",gridTemplateColumns:"minmax(0, 1fr) minmax(auto, max-content)",gridTemplateRows:"minmax(0, 1fr)",gap:"base",alignItems:"end",alignContent:"end",children:[e(Ee,{children:B}),Z]}):e(_,{gap:"base",children:[c?e(Ln,{tone:"critical",children:c}):null,e(_,{direction:"inline",gap:"base",children:e(ua,{checked:k.value,onChange:H,label:$})}),e(dr,{open:k.value,id:"thankYouRememberMe",children:e(_,{gap:"base",children:[e(A,{padding:"small-200 none none none",children:e(_,{gap:"small-300",children:[e(U,{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(Ui,{id:"phone",disabled:l,countryCode:f,label:t.translate("shop_pay_remember_me.mobile_phone_number"),icon:"mobile",value:h,error:!!b,onChange:p,onInput:y}):e(oa,{disabled:l,id:"email",name:"email",label:t.translate("shop_pay_remember_me.email_label"),value:m,error:!!b,onChange:g,onInput:y,required:!1}),e(me,{variant:"primary",onClick:u,loading:l,children:t.translate("shop_pay_remember_me.save")})]}),b?e(Ft,{controlID:d?"phone":"email",children:b}):null]})}),e(Hs,{field:d?"phone":"email",link:Z})]})})]})})}const Ws=300,Vs=5e3,Gs=n=>{const{duration:t=Vs,onClose:a,text:r,subText:i,actionText:o,handleAction:s,id:l,variant:c="default"}=n,[u,d]=re(!1);F(()=>{d(!0);const p=setTimeout(()=>{if(t!==0){d(!1);const m=setTimeout(()=>{a(l)},Ws);return()=>clearTimeout(m)}},t);return()=>clearTimeout(p)},[t,l,a]);const h=$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(qi,{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",h),children:r}),i&&e("div",{className:$e("truncate font-sans text-caption",h),children:i})]}),o&&s&&e("button",{type:"button","aria-label":o,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:o})]})},Ks=()=>{const{instanceId:n}=$i(),{trackPageImpression:t}=Wi(),[a,r]=re([]),{recordCounter:i}=Vi(),o=K(c=>{r(u=>u.filter(d=>d.id!==c))},[]),s=K(c=>{r(u=>[...u,c])},[]),l=pe(()=>({renderToast:({detail:u})=>{u.flow&&i("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,i,t]);return Gi(l),Za(e(Ki,{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(Gs,{...c,onClose:o},c.id))})}),Ge.body)},js=()=>da(({element:n,...t})=>e(ma,{element:n,featureName:"ShopToastManager",children:e(pa,{children:e(ha,{children:e(Ks,{...t})})})}),{methods:["renderToast"],name:"shop-toast-manager",props:{},shadow:"open"}),Qs={id:"520f926255e48c24cf1b0e497a7dfa36db1b5b10f628941f45c629153aa67e5f",type:"query",name:"PendingPayEscrowReceipt",source:""},Zs=1e3,Xs=Xt(({graphql:{coreGraphql:n}},{receiptId:t,retries:a,sessionToken:r,skip:i}
1)=>{const o=In(1),s=In(!i.peek()),l=n.query(Qs,{variables:()=>({receiptId:t.value,sessionToken:r.value}),skip:()=>i.value}),c=Ke(()=>Js(l.data.value,l.error.value));let u=!0;function d(){!u||o.peek()>=a||(u=!1,setTimeout(()=>{l.loading.peek()||l.refetch(),o.value++,u=!0,o.peek()<a?d():s.value=!1},Zs))}return Wn(function(){c.value&&(s.value=!1,u=!1)}),Wn(function(){l.loading.value||s.value&&d()}),{attempts:Ke(()=>o.value),error:l.error,loading:Ke(()=>s.value),pendingPayEscrow:c}});function Js(n,t){return!!(n?.receipt?.__typename==="ProcessedReceipt"&&n?.receipt?.shopAppLinksAndResources?.hasPendingPayEscrow)&&!t}const el=5;function Ea(){return!!Me()?.payEscrowMayExist}function nl(){const{client:n}=v(),t=n.unstable_getSerialization("sessionToken"),a=j()?.id,r=Ea(),[i,o]=re(!r),{attempts:s,loading:l,pendingPayEscrow:c}=Jt(Xs,{receiptId:he(a),retries:el,sessionToken:he(t),skip:he(!r||!a||!t)}),u={status:"verified_user",isVerifiedShopAccount:i,setIsVerifiedShopAccount:o,loading:l.value,fetchAttempts:s.peek()};return r?l.value?{...u,status:"fetching_status"}:{...u,status:c.value?"split_user":"verified_user"}:u}function tl(){const{i18n:n}=v(),{track:t}=Se("pay_escrow"),{isVerifiedShopAccount:a,setIsVerifiedShopAccount:r,loading:i,status:o,fetchAttempts:s}=nl();F(()=>{!a&&o==="verified_user"&&!i&&(t("verify_button_removed"),r(!0))},[a,o,i,t,r]);const l=K(c=>{const{email:u}=c;u&&(t("verify_action_completed"),al({email:u,text:n.translate("thank_you.verify_shop_account_confirmation")})),r(!0)},[t,r,n]);return{status:o,isVerifiedShopAccount:a,loading:i,handleSetIsVerifiedShopAccount:l,fetchAttempts:s}}const al=({email:n,text:t})=>{customElements.get("shop-toast-manager")||js();const a=document.createElement("shop-toast-manager");document.body.appendChild(a),a.renderToast({flow:"thank_you_page_escrow",text:t,subText:n})};function rl(){const n=he(Pi()),t=wa(),a=he(Ea());return C(()=>!!((n.value||t.value)&&!a.value))}function il(){const{i18n:n}=v(),t=x().buyerIdentity.value?.purchasingCompany;return t?e(_,{gap:"small-200",children:[e(L,{children:n.translate("thank_you.company_location_section_title")}),e(_,{children:[e(w,{children:t.company.name}),e(w,{children:t.location.name})]})]}):null}function ol({lines:n}){return n.length>0?e(_,{children:n.map(t=>e(w,{children:t},t))}):null}function sl(){const{i18n:n}=v(),t=x().deliveryNext,a=C(()=>ea(t.value).find(({method:r})=>r.methodType==="PICK_UP")?.method.pickupLocation);return e(E,{when:a,children:r=>e(_,{gap:"small-200",children:[e(L,{children:n.translate("thank_you.pick_up_in_store_marker.shipping")}),e(Je,{address:r.address,multiline:!0})]})})}function ll(){const{checkout:n}=v(),{billingAddress:t,buyerIdentity:a,deliveryNext:r,paymentLines:i}=x(),o=jr(),s=qe(),l=Qe(),c=pr(),u=C(()=>i.value?.lines??[]),d=C(()=>{const M=n.latestReceipt.value;return M?.status==="processed"?M:void 0}),h=C(()=>!!d.value?.completedRemoteCheckouts?.length),p=C(()=>a.value?.purchasingCompany),m=C(()=>t.value??p.value?.location.billingAddress),g=C(()=>Qr(r.value)),b=C(()=>Zr(r.value)),y=C(()=>!b.value&&!g.value),f=C(()=>!s.value),k=C(()=>!!c.value.shippableDeliveryLines?.length),T=C(()=>!s.value||l.value),P=C(()=>{const M=u.value;return!!(!o.value&&M.length||h.value||Xr({checkout:n})&&M.length)}),I=C(()=>!h.value&&u.value.length>0);return{customerBillingAddress:m,hasOnlyLocalPaymentLines:I,hasRemoteMerchandise:h,isForLocalPickup:g,isPickupPoint:b,isSplitShipAndPickup:l,paymentLines:u,processedReceipt:d,purchasingCompany:p,renderAsCard:T,shippingRequired:k,showPaymentMethod:P,showShippingMethods:f,showShippingSummary:y}}class nt extends Error{constructor(){super(...arguments),this.name="PaymentMethodError"}}const tt=" · ";function ze({children:n}){return e("bdi",{children:n})}function dn({label:n,fallback:t}){return n?e(ze,{children:n}):e(D,{children:t})}function Ma({cost:n,method:t}){const{shop:a,i18n:r,observability:i}=v(),o=x(),{value:s}=o.paymentMethods,{value:l}=o.paymentFlexibilityPaymentTermsTemplate,c=zt(),u=j(),d=u?.paymentDetails,h=u?.paymentExtensionBrand,p=Aa({paymentDetails:d}),m=a.hasFlagEnabled(Jr),g=!!na().value?.amount,b=l&&!g,y=!n||b?null:e(S,{children:[tt,r.formatCurrency(n.amount,{currency:n.currencyCode,form:"explicit"})]});switch(t.type){case"direct":case Kn.CreditCard:return e(cl,{method:t,payment:y,installmentInfo:n&&d?.installmentDetails?{cost:n,installmentDetails:d.installmentDetails}:null});case Kn.PayPal:return e(at,{payment:y});case"wallet":{if(t.name==="PAYPAL_EXPRESS")return e(at,{payment:y});if(t.name==="SHOPIFY_INSTALLMENTS")return e(ul,{walletContent:t.walletContent});if(t.name==="SHOP_PAY")return e(rt,{payment:y,paymentDetails:d,walletContent:t.walletContent,paymentExtensionBrand:h,installmentInfo:n&&d?.installmentDetails?{cost:n,installmentDetails:d.installmentDetails}:null});const f=T=>{switch(T){case"APPLE_PAY":return e(W,{type:"apple-pay"});case"GOOGLE_PAY":return e(W,{type:"google-pay"});default:return i.error(new nt(`Unknown wallet payment method for icon: ${T}`)),null}},k=T=>{switch(T){case"APPLE_PAY":return r.translate("brand.apple_pay");case"GOOGLE_PAY":return r.translate("brand.google_pay");default:return i.error(new nt(`Unknown wallet payment method for label: ${T}`)),null}};return e(_,{direction:"inline",alignItems:"center",gap:"small-200",children:[f(t.name),e(w,{children:[e(dn,{label:p({displayBrandLabel:!0}),fallback:k(t.name)}),y]})]})}case"shopWallet":return e(rt,{payment:y,paymentDetails:d});case"walletsPlatformPaymentMethod":return e(U,{gridAutoFlow:"column",gridTemplateColumns:"minmax(auto, max-content) minmax(0, 1fr)",gridTemplateRows:"minmax(0, 1fr)",alignItems:"center",alignContent:"center",gap:"small-300",children:[e(W,{type:t.name}),e(w,{children:[e(dn,{label:d?.paymentDescriptor??p({displayBrandLabel:!0})}),y]})]});case"local":{const k=s?.find(T=>T.type==="local"&&T.name===t.name)?.displayName||t.name;return e(_,{direction:"inline",alignItems:"center",gap:"small-200",children:[e(W,{type:t.name}),e(w,{children:[k,y]})]})}case"paymentOnDelivery":return e(_,{direction:"inline",alignItems:"center",gap:"small-200",children:[e(W,{type:"cash"}),e(w,{children:[r.translate("payment_gateway.cash_on_delivery_label"),y]})]});case"manualPayment":case"customManualPayment":return e(_,{direction:"inline",alignItems:"center",gap:"small-200",children:[e(W,{type:"cash"}),e(w,{children:[t.name,y]})]});case"deferred":return c.value?null:e(_,{children:l&&l.type!=="FIXED"?e(D,{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"),y]})});
1case"giftCard":{if(m)return null;const f=t.code.slice(-4).toUpperCase();return e(_,{direction:"inline",alignItems:"center",gap:"small-200",children:[e(W,{type:"gift-card"}),e(w,{children:[e(ze,{children:r.translate("payment.masked_digits_label",{last_digits:f})}),y]})]})}case"redeemable":{if(t.redemptionSource==="STORE_CREDIT")return e(_,{direction:"inline",alignItems:"center",gap:"small-200",children:[e(W,{type:"store-credit"}),e(w,{children:[r.translate("payment.store_credit.label"),y]})]});if(t.redemptionSource==="SHOP_CASH"){const f=t.redemptionContent;return f?.redemptionPaymentOptionKind==="ZERO_BALANCE_OFFER"?null:f?.details?.length?f.details.map(k=>{if(!ei.includes(k.redemptionType))return null;const T=k.destinationAmount&&!b?e(S,{children:[tt,r.formatCurrency(parseFloat(k.destinationAmount.amount),{currency:k.destinationAmount.currencyCode,form:"short"})]}):null;return k.redemptionType==="SHOP_CASH_BALANCE"?e(_,{direction:"inline",alignItems:"center",gap:"small-200",children:[e(W,{type:"shop-cash"}),e(w,{children:[r.translate("order_summary.shop_cash_title"),T]})]},k.redemptionType):null}):e(_,{direction:"inline",alignItems:"center",gap:"small-200",children:[e(W,{type:"shop-cash"}),e(w,{children:[r.translate("order_summary.shop_cash_title"),y]})]})}if(t.redemptionSource==="CUSTOM"){const f=t.redemptionContent,k=f?hr(f)?.toUpperCase():"";return e(_,{direction:"inline",alignItems:"center",gap:"small-200",children:[e(W,{type:"gift-card"}),e(w,{children:[e(ze,{children:r.translate("payment.ends_with_label",{last_digits:k||""})}),y]})]})}return null}case"offsite":case"customOnsite":{const f=d?.paymentIcon,T=!!h||!f||["generic","usdc"].includes(f)?Ra(h,r):t.name;return e(_,{direction:"inline",alignItems:"center",gap:"small-200",children:[e(W,{type:h||f||"generic"}),e(w,{children:[T,y]})]})}case"bank":return e(_,{gap:"small-400",children:[e(S,{children:t.bankName}),e(_,{direction:"inline",alignItems:"center",gap:"small-200",children:[e(W,{type:ro(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 cl({method:n,payment:t,installmentInfo:a}){const{i18n:r}=v(),i=x().buyerIdentity.value?.purchasingCompany,o=x().paymentFlexibilityPaymentTermsTemplate,s=zt(),l=C(()=>o.value&&!s.value?o.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"),h=u?e(ze,{children:r.translate("payment.masked_digits_label",{last_digits:u})}):d,p=(()=>{const m=a?.installmentDetails?.count,g=a?.cost;if(!m||!g)return null;const b=Yt(g.amount,m);return r.translate("payment.msi_installment_plan",{amount:r.formatCurrency(b,{currency:g.currencyCode,form:"explicit"}),num_payments:m})})();return e(_,{gap:"small-400",children:[e(E,{when:l,children:m=>e(w,{children:m})}),e(_,{direction:"inline",alignItems:"center",gap:"small-200",children:[e(W,{type:c}),e(w,{children:[h,t]})]}),p?e(S,{color:"subdued",children:p}):null,n.type==="direct"&&n.vaultingAgreement?e(_,{direction:"inline",alignItems:"center",gap:"small-400",children:[e(ie,{size:"small",type:"check"}),e(S,{color:"subdued",children:i?r.translate("payment.card_vaulted_company_location"):r.translate("payment.payment_method_saved")})]}):null]})}function at({payment:n}){const{i18n:t}=v();return e(_,{direction:"inline",alignItems:"center",gap:"small-200",children:[e(W,{type:"paypal"}),e(w,{children:[t.translate("brand.paypal"),n]})]})}function ul({walletContent:n}){const{i18n:t}=v(),a=Me(),r=()=>n?.creditCardBrand?e(W,{type:n.creditCardBrand}):e(un,{color:"branded",size:"xsmall"}),i=()=>n?.creditCardLastFourDigits&&t.translate("payment.masked_digits_label",{last_digits:n.creditCardLastFourDigits}),o=()=>a?e(w,{children:e(ke,{target:"_blank",href:a.shopInstallmentsViewSchedules,children:t.translate("shop_pay_remember_me.installments.view_schedule")})}):null;return e(_,{gap:"small-300",children:[e(_,{direction:"inline",alignItems:"center",gap:"small-200",children:[r(),e(w,{children:e(ze,{children:i()})})]}),e(w,{children:t.translate("shop_pay_remember_me.installments.paid_in_installments")}),o()]})}function rt({payment:n,paymentDetails:t,walletContent:a,paymentExtensionBrand:r,installmentInfo:i}){const o=Aa({paymentDetails:t}),{i18n:s}=v(),{value:l}=x().managedByMarketsPro,c=ni({managedByMarketsPro:l}),u=(()=>{const d=i?.installmentDetails?.count,h=i?.cost;
1if(!d||!h)return null;const p=Yt(h.amount,d);return s.translate("payment.msi_installment_plan",{amount:s.formatCurrency(p,{currency:h.currencyCode,form:"explicit"}),num_payments:d})})();return r?e(_,{direction:"inline",alignItems:"center",gap:"small-200",children:[e(W,{type:r}),e(w,{children:[Ra(r,s),n]})]}):t?.paymentCardBrand?e(_,{gap:"small-400",children:[e(_,{direction:"inline",alignItems:"center",gap:"small-200",children:[e(W,{type:t.paymentCardBrand}),e(w,{children:[e(dn,{label:o({displayBrandLabel:!1})}),n]})]}),u?e(S,{color:"subdued",children:u}):null]}):c&&a?.paymentMethod==="IDEAL"?e(_,{direction:"inline",alignItems:"center",gap:"small-200",children:[e(W,{type:"ideal"}),e(w,{children:[s.translate("payment.ideal_label"),n]})]}):e(_,{gap:"small-400",children:[e(_,{direction:"inline",alignItems:"center",gap:"small-200",children:[e(W,{type:"shop-pay"}),e(w,{children:[e(dn,{label:o({displayBrandLabel:!0}),fallback:s.translate("payment_gateway.shop_pay.name")}),n]})]}),u?e(S,{color:"subdued",children:u}):null]})}function Aa({paymentDetails:n}){const{i18n:t}=v();return K(({displayBrandLabel:a})=>{if(!n||!n.creditCardLastFourDigits)return null;const r=pl(n),i=t.translate("payment.masked_digits_label",{last_digits:n.creditCardLastFourDigits});return r&&a?`${r} ${i}`:i},[n,t])}const dl=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 pl(n){return n?.paymentCardBrand?dl.get(n.paymentCardBrand):void 0}function Ra(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 hl(){const{i18n:n}=v(),t=x(),a=t.shippingAddress,r=t.deliveryNext,i=C(()=>ea(r.value).find(({method:l})=>l.methodType==="PICKUP_POINT")?.method.pickupLocation),o=C(()=>{const l=i.value,c=a.value??l?.address;if(c)return l?.name?{...c,lastName:l.name}:c}),s=C(()=>{const l=i.value;return l?.type==="PickupPointLocation"&&l.carrierCode?l:void 0});return e(E,{when:o,children:l=>e(_,{gap:"small-200",children:[e(L,{children:n.translate("pickup_point.title")}),e(Je,{address:l,multiline:!0,hiddenFields:["firstName"]}),e(E,{when:s,children:c=>e(oo,{pickupLocation:c})})]})})}function Re(){return j()?.completedRemoteCheckouts}const it=" · ",Sn="unknown";function ml(){const{i18n:n,shop:{name:t,remoteShopsConfigMap:a}}=v(),r=x().paymentLines,i=he(Re()),o=C(()=>{if(!i.value?.length)return;const c=[],u=new Map([[Sn,{method:null,items:[]}]]);return r.value?.lines.forEach(d=>{const h=ot(d.method);u.set(h,{method:d.method,items:[{shopName:t,cost:d.cost,textKey:`local-${h}`}]})}),i.value.forEach(d=>{const{status:h,shopId:p}=d,m=a?.get(p)?.name||n.translate("thank_you.thank_you_from_other_store");if(h==="failed"){c.push({textKey:`failed-${p}`,remoteShopName:m});return}d.remotePurchaseOrder.paymentLines?.forEach(g=>{const{cost:b,method:y}=g;if(y){const f=ot(y);u.has(f)||u.set(f,{method:y,items:[]}),u.get(f)?.items.push({shopName:m,cost:b,textKey:`${f}-${d.checkoutSessionToken}`})}else u.get(Sn)?.items.push({shopName:m,cost:b,textKey:`${Sn}-${d.checkoutSessionToken}`})})}),{failedCheckouts:c,groupedPayments:Array.from(u.entries()).map(([d,{method:h,items:p}])=>({key:d,method:h,items:p}))}}),s=C(()=>o.value?.groupedPayments??[]),l=C(()=>o.value?.failedCheckouts??[]);return e(E,{when:o,children:e(_,{gap:"small-400",children:[e(ln,{each:s,getKey:c=>c.key,children:({method:c,items:u})=>c?e(_,{gap:"small-400",children:[e(Ma,{cost:void 0,method:c}),e(_,{gap:"small-400",children:u.map(({cost:d,shopName:h,textKey:p})=>e(S,{children:[h,d&&e(D,{children:[it,n.formatCurrency(d.amount,{currency:d.currencyCode,form:"explicit"})]})]},p))})]}):u.map(({shopName:d,textKey:h})=>e(S,{children:d},h))}),e(ln,{each:l,getKey:c=>c.textKey,children:({remoteShopName:c})=>e(S,{children:[c,it,n.translate("thank_you.payment_method_not_charged")]})})]})})}function ot(n){const t=[ta(n)];return"brand"in n&&n.brand&&t.push(n.brand),"creditCardLastFourDigits"in n&&n.creditCardLastFourDigits&&t.push(n.creditCardLastFourDigits),"displayLastDigits"in n&&t.pu
1sh(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 st=" · ";function _l({completedRemoteCheckouts:n}){const t=qe().value,{i18n:a,shop:{name:r,remoteShopsConfigMap:i}}=v(),o=mr(n);if(!o.length)return null;const s=o.map(l=>{const c=`${i?.get(l.shopId)?.name||a.translate("thank_you.thank_you_from_other_store")}${st}`;return e(w,{children:[c,l.title]},l.handle)});if(t){const l=`${r}${st}${a.translate("shipping.split_shipping_multiple_shipment_label")}`;return e(_,{gap:"small-200",children:[e(S,{color:"subdued",children:a.translate("thank_you.shipping_method_title")}),l,s]})}return e(_,{gap:"small-200",children:[e(L,{children:a.translate("thank_you.shipping_method_title")}),s]})}function lt({shippingRequired:n=!0}={}){const{i18n:t}=v(),a=x().shippingAddress,r=qe();return n?e(E,{when:a,children:i=>e(_,{gap:"small-200",children:[e(E,{when:r,fallback:e(L,{children:t.translate("thank_you.shipping_address_title")}),children:e(S,{color:"subdued",children:t.translate("thank_you.shipping_address_title")})}),e(Je,{address:i,multiline:!0})]})}):null}function yl(){const{deliveryNext:n,remoteMerchandiseDetails:t}=x(),{i18n:a,shop:r}=v(),i=r.hasFlagEnabled(ti),o=he(Re()),s=C(()=>!!o.value?.some(p=>p.status==="submitted")),l=C(()=>{const p=n.value;return!!(p&&p.status!=="unavailable")}),c=C(()=>{const p=n.value;if(!p||p.status==="unavailable")return[];const m=i&&p.lines.some(g=>g.targetMerchandiseLines?.some(b=>b.properties.some(y=>y.name==="_shopify_non_subscription_item")));return p.lines.filter(g=>!m||g.type!=="SUBSCRIPTION")}),u=C(()=>{const p=new Set(c.value.map(({type:m})=>m));return p.size>1&&p.has("SUBSCRIPTION")}),d=C(()=>{const p=new Set;return aa(c.value).flatMap((m,g)=>{const b=ai(m);if(!b)return[];if(m.type==="ONE_TIME_PURCHASE"&&m.status==="available"&&xi({line:m,method:b})){const y=la(b,m.id??`index-${g}`);if(p.has(y))return[];p.add(y)}return[{deliveryLine:m,selectedDeliveryMethod:b}]})}),h=C(()=>{const p=u.value,m=s.value,g=t.value,b=y=>y.type!=="ONE_TIME_PURCHASE"?a.translate("shipping.shipping_method_recurring_shipments_group_title.other"):p?a.translate("shipping.shipping_method_first_shipment_group_title",{count:1}):void 0;return d.value.map(({deliveryLine:y,selectedDeliveryMethod:f})=>{const k=m?ri({deliveryLine:y,remoteMerchandiseDetails:g,remoteShopsConfigMap:r.remoteShopsConfigMap,localShopId:r.id,localShopName:r.name}).shopName:b(y);return{selectedDeliveryMethod:f,title:k===void 0?f.title:`${k} · ${f.title}`}})});return{hasAvailableDelivery:l,lines:h}}function gl(){const{i18n:n}=v(),{hasAvailableDelivery:t,lines:a}=yl();return e(E,{when:t,children:e(_,{gap:"small-200",children:[e(L,{children:n.translate("thank_you.shipping_method_title")}),e(ln,{each:a,getKey:({selectedDeliveryMethod:r})=>r.handle,children:({title:r})=>e(w,{children:r})})]})})}function fl({shippingRequired:n,showMethods:t}){const a=Re();return!n&&!a?.length?null:t?e(D,{children:[e(lt,{shippingRequired:n}),e(gl,{})]}):e(D,{children:[e(lt,{shippingRequired:n}),a?.length?e(_l,{completedRemoteCheckouts:a}):null]})}function bl(){const{i18n:n}=v(),{track:t}=Se("follow_link");return e(D,{children:e(U,{gridAutoFlow:"column",gridTemplateColumns:"minmax(0, 1fr) minmax(auto, max-content)",gridTemplateRows:"minmax(0, 1fr)",gap:"base",alignItems:"end",alignContent:"end",children:[e(S,{children:n.translate("completed_with_shop_pay.text",{shopPay:e(un,{inline:!0,color:"branded",size:"xsmall"})})}),e(ke,{target:"_blank",href:"https://shop.app/pay",onClick:()=>t("learn_more_pay"),children:n.translate("completed_with_shop_pay.learn_more")})]})})}function vl({message:n,loading:t}){return t?e(Oe,{children:e(_r,{lines:1,size:"base"})}):n?e(S,{children:n}):null}function kl({message:n,loading:t,completedWithShopPay:a}){return e(_,{gap:"small-300",children:[e(Ze,{}),e(yr,{blockSize:"small-500"}),n||t?e(vl,{message:n,loading:t}
1):null,a?e(bl,{}):null]})}function Sl(){const{checkout:n,i18n:t,shop:a,url:r,mobileCheckoutSdk:i,source:o,embed:s}=v(),{buyerIdentity:l,contactInfo:c}=x(),{customerBillingAddress:u,hasOnlyLocalPaymentLines:d,hasRemoteMerchandise:h,isForLocalPickup:p,isPickupPoint:m,isSplitShipAndPickup:g,paymentLines:b,processedReceipt:y,purchasingCompany:f,renderAsCard:k,shippingRequired:T,showPaymentMethod:P,showShippingMethods:I,showShippingSummary:M}=ll(),R=rl(),B=mn(),V=C(()=>B.value.currentDetour?.type==="thankYou"?"Checkout::ThankYou::CustomerInformation::RenderAfter":"Checkout::CustomerInformation::RenderAfter"),$=he(Ie(V.value)),H=t.translate("thank_you.customer_information_title"),Z=t.translate("thank_you.contact_information_title"),O=t.translate("thank_you.payment_method_title"),ee=t.translate("thank_you.billing_address_title"),oe=t.translate("thank_you.view_business_customer_account"),z=o.type==="draftOrder",_e=i.variant.isStandard()||s?.isCheckoutKit(),ne=!a.hasFlagEnabled(ii),se=C(()=>{const te=y.value?.shopAppLinksAndResources;return te?{...te}:void 0}),ye=C(()=>y.value?.isRedacted??!1),Ce=C(()=>!!l.value?.customerProfile),Le=C(()=>{const te=l.value,ge=c.value;return[te?.purchasingCompany?te.customerProfile?.fullName:void 0,ge?.email??ge?.phone].filter(He=>!!He)}),X=C(()=>!_e&&!z&&a.hasStorefront&&Ce.value),Be=C(()=>!n.configuration.isUniversalCheckoutFinalizer&&!!a.loginLinkVisible&&(X.value||!!f.value)),Te=C(()=>!g.value),xe=C(()=>!g.value&&P.value||!!u.value),Fe=C(()=>!ye.value),Ue=C(()=>{const te=n.rememberMe.response.value,ge=n.rememberMe.status.value,He=!!te?.data,Ka=b.value.some(({method:$n,cost:Qa})=>Qa?.amount&&$n.type==="wallet"&&["SHOP_PAY","SHOPIFY_INSTALLMENTS"].includes($n.name)),qn=!!((ne?se.value?.shopPayOrder:!!Ka)||He),ja=He||ge==="loading";if(!(ye.value||n.configuration.isUniversalCheckoutFinalizer||!qn&&!ja))return{completedWithShopPay:qn,loading:ge==="loading",message:te?.data}}),fe=C(()=>!ye.value&&!n.configuration.isUniversalCheckoutFinalizer&&R.value),De=()=>e(E,{when:P,children:e(_,{gap:"small-200",children:[e(E,{when:k,fallback:e(S,{color:"subdued",children:O}),children:e(L,{children:O})}),e(E,{when:d,children:e(_,{gap:"small-200",children:e(ln,{each:b,getKey:({method:te,cost:ge})=>`${ta(te)}-${ge?.amount}`,children:({method:te,cost:ge})=>e(Ma,{cost:ge,method:te})})})}),e(E,{when:h,children:e(ml,{})})]})});return e(Cl,{sectionTitle:H,renderAsCard:k,afterStack:e(E,{when:fe,children:e($s,{})}),children:[e(U,{gridAutoFlow:"column",gridTemplateColumns:"minmax(auto, max-content) minmax(0, 1fr)",gridTemplateRows:"minmax(0, 1fr)",justifyContent:"end",justifyItems:"end",children:[e(L,{children:H}),e(E,{when:Be,children:e(ke,{href:r.account(),children:oe})})]}),e(U,{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(Y,{children:e(ct,{renderAsCard:k,children:[e(E,{when:Fe,children:e(Tl,{contactInformationLines:Le,renderAsCard:k,title:Z})}),e(E,{when:f,children:e(il,{})}),e(E,{when:g,fallback:e(D,{children:[e(E,{when:p,children:e(sl,{})}),e(E,{when:m,children:e(hl,{})}),e(E,{when:M,children:e(Pl,{shippingRequired:T,showMethods:I})})]}),children:De()})]})}),e(E,{when:xe,children:e(Y,{children:e(ct,{renderAsCard:k,children:[e(E,{when:Te,children:De()}),e(E,{when:u,children:te=>e(_,{gap:"small-200",children:[e(E,{when:k,fallback:e(S,{color:"subdued",children:ee}),children:e(L,{children:ee})}),e(Je,{address:te,multiline:!0})]})})]})})})]}),e(E,{when:Ue,children:({completedWithShopPay:te,loading:ge,message:He})=>e(kl,{message:He,loading:ge,completedWithShopPay:te})}),e(Il,{customizations:$})]})}function Cl({afterStack:n,children:t,renderAsCard:a,sectionTitle:r}){const{shop:i}=v(),o=i.hasFlagEnabled(ce),s=a.value;return e(Ae,{target:s?"edgeToEdgeCard":"plain",children:e(Y,{accessibilityLabel:r,colorLayer:s&&!o?"control":void 0,children:[e(_,{gap:"base",padding:s?"base":"base none",children:t}),n]})})}function ct({children:n,renderAsCard:t}){return e(_,{gap:t.value?"base":"large-100",children:n})}
1function Tl({contactInformationLines:n,renderAsCard:t,title:a}){return e(_,{gap:"small-200",children:[e(E,{when:t,fallback:e(S,{color:"subdued",children:a}),children:e(L,{children:a})}),e(ol,{lines:n.value})]})}function Pl({shippingRequired:n,showMethods:t}){return e(fl,{shippingRequired:n.value,showMethods:t.value})}function Il({customizations:n}){return e(on,{customizations:n.value})}function wl(){const{i18n:n,shop:t}=v(),a=t.hasFlagEnabled(ce),r=x().contactInfo,i=oi(),o=C(()=>r.value?.email?n.translate("thank_you.gift_card_email_title",{count:i.value}):n.translate("thank_you.gift_card_text_title",{count:i.value})),s=C(()=>r.value?.email?n.translate("thank_you.gift_card_confirmation_by_email_typ",{count:i.value}):n.translate("thank_you.gift_card_confirmation_by_text_typ",{count:i.value}));return e(Y,{accessibilityLabel:o.value,colorLayer:a?void 0:"control",children:e(_,{gap:"base",children:[e(L,{children:o}),e(w,{children:e(Ee,{children:s})})]})})}const El=(...n)=>{const t=n.find(a=>a?.firstName&&a?.lastName)||n.find(a=>a?.lastName);return t?{firstName:t.firstName,lastName:t.lastName}:{}},Ml=" • ";function ut(){const{i18n:n,checkout:t}=v(),a=he(j()),{buyerIdentity:r,shippingAddress:i,billingAddress:o}=x(),s=Bn(),c=Re()?.some(f=>f.status==="failed"),u=Ne(),d=qt(),h=C(()=>!d||t.thankYouEntrance.phase.value==="settled"),p=C(()=>{const f=r.value?.purchasingCompany,k=r.value?.customerProfile,{firstName:T,lastName:P}=f&&k?{firstName:k.firstName??void 0,lastName:k.lastName??void 0}:El(o.value,i.value),I=a.value?.isRedacted?null:n.formatName(T,P);return I?n.translate("thank_you.page_title",{display_name:I}):n.translate("thank_you.page_title_no_name")}),m=C(()=>{const f=a.value?.orderIdentity.buyerIdentifier||null,k=!!a.value?.completedRemoteCheckouts?.length;return!s.value&&f&&!k?n.translate("order_summary.confirmation_number_label",{confirmation_number:`${f}`}):null}),g=C(()=>{const f=a.value?.purchaseOrderNumber;return f?n.translate("thank_you.purchase_order_number_title",{purchase_order_number:f}):null}),b=C(()=>!!m.value||!!g.value);if(c)return null;const y=e(D,{children:[e(E,{when:b,children:()=>e(w,{color:"subdued",textAlign:u?"center":void 0,children:[e(E,{when:m,children:f=>e(D,{children:[f,e(E,{when:g,children:Ml})]})}),g]})}),e(L,{level:1,autoFocus:h.value,textAlign:u?"center":void 0,children:p})]});return u?e(Ae,{target:"card",children:e(Y,{accessibilityRole:"presentation",className:ve.ThankYouEntranceHeading,colorLayer:"control",children:e(_,{gap:"small-300",children:y})})}):e(lo,{status:"success",children:y})}const dt=n=>n.reduce((t,a)=>t+(a.quantity??0),0);function Al({confirmedShops:n,failedShops:t}){const{i18n:a}=v(),r=pe(()=>dt(n),[n]),i=pe(()=>dt(t),[t]),o=r+i;return e(L,{children:a.translate("thank_you.confirmed_items_count",{confirmed_count:r,total_count:o})})}function Rl({thumbnailUrl:n,thumbnailAlt:t,primaryText:a,secondaryText:r,orderAmount:i,checkoutUrl:o,buttonText:s}){const{i18n:l}=v(),c=i?l.formatCurrency(i.amount,{currency:i.currencyCode,form:"short"}):void 0;return e(U,{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(_,{gap:"base",children:[e(U,{gridAutoFlow:"column",gridTemplateColumns:"minmax(0, 1fr) minmax(auto, max-content)",gridTemplateRows:"minmax(0, 1fr)",gap:"base",children:[e(_,{children:[a,r&&e(S,{color:"subdued",children:r})]}),c?e(S,{type:"strong",children:c}):null]}),o&&s&&e(A,{inlineSize:"@media (inline-size >= extraSmall) fit-content, 100%",children:e(me,{variant:"secondary",size:"small",onClick:()=>window.open(o,"_blank"),inlineSize:"fill",children:e(U,{gridAutoFlow:"column",gridTemplateColumns:"minmax(0, 1fr) minmax(auto, max-content)",gridTemplateRows:"minmax(0, 1fr)",gap:"small-400",alignItems:"center",alignContent:"center",children:[e(S,{children:s}),e(ie,{type:"external",size:"small"})]})})})]})]})}function pt({image:n,quantity:t,title:a,subtitle:r,totalPrice:i}){const{i18n:o}=v();return e(U,{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(_,{children:[e(S,{children:a}),r&&e(S,{color:"subdued",children:r})]})}),i?e(A,{blockAlignment:"center",children:e(S,{children:o.formatCurrency(i.amount,{currency:i.currencyCode,form:"short"})})}):null]})}const Ll="·";function xl({deliveryLines:n,merchandiseItems:t}){const{i18n:a}=v(),r=!!(n&&n.length>=Nn);if(!r&&(!t||!t.length))return null;if(r){const i=[];return n?.forEach(o=>{if(!Xe(o))return;const s=o.methods.find(l=>l.handle===o.selectedDeliveryMethodHandle);s&&i.push({line:o,selectedMethod:s})}),i.length?e(_,{gap:"large-200",children:i.map(({line:o,selectedMethod:s},l)=>e(_,{gap:"base",children:[e(_,{children:[e(_,{direction:"inline",gap:"small-400",children:[e(S,{type:"strong",children:a.translate("shipping.split_shipping_shipment_number",{number:l+1})}),e(S,{children:Ll}),e(S,{children:s.title})]}),e(S,{color:"subdued",children:s.deliveryPromisePresentmentTitle?.long})]}),o.targetMerchandiseLines?.map(c=>{const u=t?.find(d=>d.id===c.stableId);return u?e(pt,{image:u.image,quantity:u.quantity,title:u.title,subtitle:u.subtitle,totalPrice:u.totalPrice},c.id):null})]},o.id||l))}):null}return e(_,{gap:"base",children:t?.map(i=>e(pt,{image:i.image,quantity:i.quantity,title:i.title,subtitle:i.subtitle,totalPrice:i.totalPrice},i.id))})}const ht="·",Dl=Dn("ShopOrderSummaryTooltip");function Ol({details:n}){const{i18n:t,shop:a}=v(),r=n.shopId===a.id,i=xn(void 0,Dl),o=!!("deliveryLines"in n&&n.deliveryLines&&n.deliveryLines.length>=Nn);return e(Cr,{title:t.translate("order_summary.cost_table_title"),children:[n.subtotal&&e(en,{children:[e(nn,{children:e(_,{direction:"inline",gap:"small-400",children:[e(S,{children:t.translate("order_summary.subtotal_label")}),n.quantity&&e(D,{children:[e(S,{children:ht}),e(S,{children:t.translate("thank_you.thank_you_item_label",{count:n.quantity})})]})]})}),e(tn,{children:e(S,{children:t.formatCurrency(n.subtotal.amount,{currency:n.subtotal.currencyCode,form:"short"})})})]}),r&&e(gr,{disableTooltip:!0}),"shippingTotal"in n&&n.shippingTotal&&e(en,{children:[e(nn,{children:e(_,{direction:"inline",gap:"small-400",children:[e(S,{children:t.translate("order_summary.shipping_label")}),n.deliveryMethodHandle&&!o&&e(D,{children:[e(S,{children:ht}),e(S,{children:n.deliveryMethodHandle})]})]})}),e(tn,{children:e(S,{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(_,{direction:"inline",gap:"small-300",alignItems:"center",children:[e(S,{children:t.translate("order_summary.estimated_taxes_label")}),e(ie,{type:"question-circle",size:"small",interestFor:i,accessibilityLabel:t.translate("tooltip.accessibility_label_context",{context:t.translate("order_summary.estimated_taxes_label")})}),e(fr,{id:i,children:t.translate("order_summary.estimated_taxes_finalization_tooltip_content")})]})}),e(tn,{children:e(S,{children:t.formatCurrency(n.estimatedTaxes.amount,{currency:n.estimatedTaxes.currencyCode,form:"short"})})})]}),r&&e(br,{}),r&&e(vr,{}),r&&e(kr,{disableTooltip:!0}),"checkoutTotal"in n&&n.checkoutTotal&&e(en,{children:[e(nn,{children:e(L,{level:1,children:t.translate("order_summary.total_label")})}),e(tn,{children:e(L,{level:1,children:t.formatCurrency(n.checkoutTotal.amount,{currency:n.checkoutTotal.currencyCode,form:"short"})})})]}),r&&e(Sr,{})]})}function Nl({details:n,open:t,onClose:a,onAfterHide:r}){const{i18n:i}=v();return e(Tr,{id:`order-modal-${n.shopId}`,open:t,onHide:a,onAfterHide:r,heading:n.shopName?i.translate("thank_you.thank_you_from_shop",{shop_name:n.shopName}):i.translate("thank_you.thank_you_from_other_store"),size:"base",children:e($t,{children:e(_,{gap:"base",children:[e(Y,{children:e(xl,{deliveryLines:"deliveryLines"in n?n.deliveryLines:void 0,merchandiseItems:n.merchandiseItems})}),e(Ze,{}),e(Y,{children:e(Ol,{details:n})}),"orderConfirmationNumber"in n&&n.orderConfirmationNumber&&e(S,{color:"subdued",children:i.translate("order_summary.confirmation_number_label",{confirmation_number:n.orderConfirmationNumber})}),"trackingUrl"in n&&n.trackingUrl&&e(me,{variant:"primary",size:"base",inlineSize:"fill",onClick:n.trackingUrl?()=>window.open(n.trackingUrl,"_blank"):void 0,children:e(_,{direction:"inline",gap:"small-200",alignItems:"center",children:[e(S,{children:i.translate("thank_you.track_your_order_link_text")}),e(ie,{type:"external",size:"small"})]})})]})})})}function vn(){const n=x().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 Bl({itemCount:n}){const{i18n:t}=v(),{confirmWithEmail:a,confirmWithPhone:r}=vn().value,i=n>1,o=(()=>
1{if(a)return i?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 i?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:o})})}function Fl({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 mt({status:n,detailsList:t}){const a=J(null),r=J(!1),{shop:i,i18n:o}=v(),s=i.hasFlagEnabled(ce),l=!!Re()?.some(p=>p.status==="failed"),c=i.hasFlagEnabled(si);if(!t.length)return null;const u=n==="confirmed",d=t[0].status==="failed"?t[0].recoveryUrl:void 0,h=t.find(p=>p.shopId===a.value);return e(D,{children:[e(Y,{overflow:"hidden",colorLayer:s?void 0:"control",children:e(_,{gap:"base",children:[e(Ul,{isConfirmed:u,hasFailedRemoteCheckouts:l,detailsList:t}),t.map((p,m)=>{const g=m===t.length-1;return e(_,{gap:"base",children:[e(Rl,{primaryText:e(_,{direction:"inline",gap:"small-400",children:[e(ke,{textDecoration:"none",onClick:()=>{a.value=p.shopId,r.value=!0},children:o.translate("thank_you.thank_you_item_label",{count:p.quantity??0})}),e(S,{children:Pr}),e(S,{children:p.shopName||o.translate("thank_you.thank_you_from_other_store")})]}),secondaryText:Hl({details:p,i18n:o}),orderAmount:p.checkoutTotal,thumbnailUrl:p.merchandiseItems?.[0]?.image?.url,thumbnailAlt:p.merchandiseItems?.[0]?.image?.altText,...p.status==="failed"?Yl({details:p,i18n:o,isSingleCheckoutButtonEnabled:c}):zl({details:p,i18n:o})}),!g&&e(Ir,{below:"small",children:e(Ze,{direction:"inline",borderWidth:"base"})})]},p.shopId)}),!u&&c&&d&&e(me,{onClick:()=>window.open(d,"_blank"),inlineSize:"fill",variant:"primary",children:e(U,{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(S,{children:o.translate("thank_you.checkout_again")}),e(ie,{type:"external",size:"small"})]})})]})}),h&&e(Nl,{open:r.value,onClose:()=>r.value=!1,onAfterHide:()=>a.value=null,details:h})]})}function Ul({isConfirmed:n,hasFailedRemoteCheckouts:t,detailsList:a}){if(n)return t?e(Bl,{itemCount:a.length}):null;const r=a.filter(i=>i.status==="failed").reduce((i,o)=>i+(o.quantity||0),0);return e(Fl,{itemCount:r})}function Hl({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 zl({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 Yl({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 ql(){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((i,o)=>{const s=o.methods?.find(({handle:l})=>l===o.selectedDeliveryMethodHandle);return s?i+(s.costAfterDiscounts.amount??0):i},0),currencyCode:a}})}function $l(){const n=j(),t=li(),a=na();return C(()=>{const r=n?.purchaseOrder.paymentDue,i=n?.checkoutTotal;return ci({paymentDue:r,checkoutTotal:i,orderDeposit:a.value,hasFixedSellingPlan:t.value})})}function _t(n){return n?.length?n.reduce((t,a)=>t+a.quantity,0):0}function Wl(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 Vl(n){return n.map(({stableId:a,title:r,subtitle:i,image:o,quantity:s,totalPrice:l})=>a?{id:a,title:r,subtitle:i||void 0,image:o?.url?{url:o.url,altText:o.altText||void 0}:void 0,quantity:s,totalPrice:l}:null).filter(a=>a!==null)}function yt(n){return n.map(({stableId:a,title:r,productTitle:i,image:o,quantity:s,price:l})=>({id:a,title:i,subtitle:r||void 0,image:o?{url:o.url,altText:o.altText||void 0}:void 0,quantity:s,totalPrice:l})).filter(a=>a!==null)}function Gl(){const n=Re(),{shop:{name:t,id:a,brandSettings:r,remoteShopsConfigMap:i}}=v(),{totalLineQuantities:o}=Wt(),s=$l(),l=j(),c=wr(),d=x().taxes.value,{value:h}=ra("ONE_TIME_PURCHASE"),p=Fn(h),m=On(),g=ql();return pe(()=>{const b=[],y=[];if(!n?.length)return{confirmedShops:[],failedShops:[]};if(o&&o>0){const f=Vl(c)||[],k=d&&d.status==="available_total"?d.totalTax:void 0,T={shopId:a,shopName:t,shopLogo:r?.squareLogo?.url,quantity:o,checkoutTotal:s.value,merchandiseItems:f,subtotal:l?.subtotal,estimatedTaxes:k,shippingTotal:g.value,deliveryMethodHandle:p?.title,orderConfirmationNumber:l?.orderIdentity?.buyerIdentifier||void 0,trackingUrl:l?.orderStatusPageUrl||void 0,deliveryLines:m.value,status:"confirmed"};b.push(T)}
1return n?.length&&n.forEach(f=>{if(f.status==="submitted"){const{orderIdentity:{buyerIdentifier:k},orderStatusPageUrl:T,remotePurchaseOrder:{merchandiseLines:P,deliveryLines:I,checkoutTotal:M,subtotalBeforeTaxesAndShipping:R,tax:B}}=f,V={shopId:f.shopId,shopName:i?.get(f.shopId)?.name,shopLogo:i?.get(f.shopId)?.brandSettings?.squareLogo?.url,quantity:_t(P),checkoutTotal:M,subtotal:R,estimatedTaxes:B,shippingTotal:Wl(I),merchandiseItems:yt(P)||[],deliveryMethodHandle:I?.[0]?.title,orderConfirmationNumber:k||void 0,trackingUrl:T||void 0,status:"confirmed"};b.push(V)}if(f.status==="failed"){const{recoveryUrl:k,merchandiseLines:T,checkoutTotal:P,subtotalBeforeTaxesAndShipping:I,tax:M}=f,R={shopId:f.shopId,shopName:i?.get(f.shopId)?.name,shopLogo:i?.get(f.shopId)?.brandSettings?.squareLogo?.url,quantity:_t(T),checkoutTotal:P,subtotal:I,estimatedTaxes:M,merchandiseItems:yt(T)||[],recoveryUrl:k,status:"failed"};y.push(R)}}),{confirmedShops:b,failedShops:y}},[n,a,t,o,s.value,l,r?.squareLogo?.url,i,c,d,p,m.value,g.value])}function Kl(){const{confirmedShops:n,failedShops:t}=Gl(),a=!!t?.length,r=!!n?.length;return!r&&!a?null:e(_,{gap:"base",children:[a?e(Al,{confirmedShops:n,failedShops:t}):null,r?e(mt,{status:"confirmed",detailsList:n}):null,a?e(mt,{status:"failed",detailsList:t}):null]})}const jl=()=>{const{i18n:n}=v();return e(_,{padding:"base",children:e(L,{children:n.translate("thank_you.offers.title")})})},gt=(n,t=Q)=>{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)},Ql=({shopId:n,personalizeAds:t,placement:a,checkoutToken:r,orderId:i,hideButtons:o,hideHeader:s,accentColor:l,darkMode:c})=>{const u=G(null);F(()=>{const h=m=>{m.origin==="https://shop.app"&&clearTimeout(p)},p=setTimeout(()=>{u.current?.iframeRef?.current&&(u.current.iframeRef.current.style.height="0px")},2e3);return Q.addEventListener("message",gt),Q.addEventListener("message",h),()=>{Q.removeEventListener("message",gt),clearTimeout(p)}},[]);const{authorizeUrl:d}=Zi({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:i,hideButtons:o,hideHeader:s,accentColor:l,darkMode:c});return e(Xi,{proxy:!0,insideModal:!1,ref:u,src:d,scrolling:"no",variant:"default"})},Zl=()=>da(({element:n,...t})=>e(ma,{element:n,featureName:"ShopCashOffers",children:e(pa,{children:e(ha,{children:e(ji,{children:e(Qi,{children:e(Ql,{...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 Xl(){const{shop:n}=v(),t=n.hasFlagEnabled(ui),{colors:{global:a,schemes:r={}}}=Vt(),{main:i}=En(),o=r[i.colorScheme??"scheme1"],s=i.section?.colorScheme?r[i.section.colorScheme]:void 0,l=t?an(s,a?.control)??an(o,a?.control)??an(r.scheme1,a?.control):an(o),c=l===void 0?t:ft(l),u=a?.accent,d=u!==void 0&&c!==ft(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||di(a)?n.base?.background:a}function ft(n){return typeof n>"u"?!1:n.getYiqPerceivedBrightness()>=.65}const bt=new URL("https://shop.app"),vt=String(!0),kt="thank_you",Jl="https://shop.app/offers-compact",ec="211px",St="100%";function nc(n,t){const a=new URL(n).toString(),r=new URLSearchParams(t).toString();return`${a}?${r}`.toString()}const tc=Xa(({shopId:n,personalizeAds:t,preview:a,orderId:r,checkoutSessionIdentifier:i,setHeight:o},s)=>{const l=String(t),c=Xl(),{i18n:u,observability:d,url:h}=v(),p=G(null),m=G(null),g=()=>p.current?.shadowRoot?.querySelector("iframe")??m.current,b=!!r||a;if(F(()=>{const y={type:b?"iframe":"shop-js-iframe"};d.counter({name:"shop_ads_2p_rail_render_started",value:1,attributes:y}),d.log("shop_ads_2p_rail_render_started","shop_ads_2p_rail_render_started",{...y})},[b,d]),F(()=>{const y=f=>{if(f.origin!==bt.origin)return;const k=f?.data?.type,T=f?.data?.redirect_to;
1if(k==="resize_iframe"){let P=f?.data?.height;const I=f?.data?.width;if(typeof P=="number"&&typeof I=="number"){P=P>0?P:0,o(P);const M={type:P>0?"with_content":"without_content"};d.counter({name:"shop_ads_2p_rail_resize",value:1,attributes:M}),d.log("shop_ads_2p_rail_resize","shop_ads_2p_rail_resize",{height:P,width:I,...M});const R=g();R&&(R.style.height=`${P}px`,R.style.width=St)}}else if(b&&k==="redirect"&&T!==void 0){const P=new URL(T);(P.origin===bt.origin||P.origin===new URL(h.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",y),()=>{window.removeEventListener("message",y)}},[b,o,d,h]),Ja(s,()=>({iframeElement:g}),[]),b){const y=nc(Jl,{shop_id:String(n),placement:kt,hide_header:vt,personalize_ads:l,merchant_url:h.storefront(),...a?{preview:String(a)}:null,...r?{order_id:String(r)}:null,...i?{checkout_token:i}:null,...c});return e("iframe",{ref:m,id:"offers",title:u.translate("thank_you.offers.title"),src:y,width:St,height:ec,scrolling:"no"})}else return typeof window<"u"&&typeof customElements<"u"&&!customElements.get("shop-cash-offers")&&Zl(),e("shop-cash-offers",{"shop-id":n,"personalize-ads":l,"hide-header":vt,"dark-mode":c.dark_mode,"accent-color":c.accent_color,placement:kt,"order-id":r,"checkout-token":i,ref:p})});function ac({preview:n}){const{shop:t,source:{checkoutSessionIdentifier:a},consentManager:r}=v(),{id:i}=t,o=parseInt(je(i),10),s=r.saleOfDataAllowed.value&&r.marketingAllowed.value,[l,c]=re(),u=t.hasFlagEnabled(ce),d=j(),h=d?.orderIdentity.id?ia(d.orderIdentity.id):void 0,p=G(null);return e(Y,{colorLayer:u?void 0:"control",display:l===0?"none":"block",children:[e(jl,{}),e(tc,{checkoutSessionIdentifier:a,orderId:h,personalizeAds:s,shopId:o,ref:p,setHeight:c,preview:n})]})}const pn=(n,t)=>{try{const a=new URL(n.replace(/\/$/,""));return Object.entries(t).forEach(([r,i])=>{a.searchParams.append(r,i)}),a.toString()}catch{return n}},rn=102,rc=32,ic=20,oc=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"})}),sc="gTxFI",lc="kfcrU",Ct={Container:sc,overlay:lc},cc="white";function La({color:n="branded",containerSize:t=rc,iconSize:a=ic,backgroundColor:r=cc,overlay:i=!1}){const o=n==="branded"?bn.toRgb():n;return e("div",{className:N(Ct.Container,i?Ct.overlay:""),style:{backgroundColor:r,height:t,width:t,borderRadius:"10px"},children:e(oc,{"aria-hidden":"true",style:{fill:o},height:a,width:a})})}const uc="_3nOgQ",dc="NmBBp",pc="_0wOrq",hc="I6KnV",mc="e1FkT",_c="Ww91E",yc="sCXu3",gc="iIHiG",fc="oacnN",bc="_8Slfk",vc="_2i0qK",kc="xjUvL",Sc="Iiyyo",ae={Root:uc,Ready:dc,Track:pc,Fill:hc,FillDelivered:mc,Rail:_c,Marker:yc,StageIcon:gc,Confirmed:fc,Delivered:bc,InTransit:vc,OutForDelivery:kc,CheckPath:Sc},Cc=Dn("tracking-delivered-gradient-");function Tc(){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:ae.CheckPath,d:"m12.25 20.5 5 5 10.5-12",fill:"none",stroke:"white",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"3.25"})]})}function Pc(){const n=xn(void 0,Cc);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 Ic({animate:n=!0}={}){return e("div",{"aria-hidden":"true",className:N(ae.Root,{[ae.Ready]:n}),children:e("div",{className:ae.Track,children:[e("span",{className:ae.Fill}),e("span",{className:ae.FillDelivered}),e("span",{className:ae.Rail}),e("span",{className:ae.Marker,children:[e("span",{className:N(ae.StageIcon,ae.Confirmed),children:e(Tc,{})}),e("span",{className:N(ae.StageIcon,ae.InTransit)}),e("span",{className:N(ae.StageIcon,ae.OutForDelivery)}),e("span",{className:N(ae.StageIcon,ae.Delivered),children:e(Pc,{})})]})]})})}const wc=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"})]}),Ec="RqWCL",Mc="vcF4y",Ac="Z7YHY",Rc="U17Bl",Lc="XiB25",xc="rRjrG",Dc="nm5oZ",Oc="pXsW1",Nc="XAh5C",Bc="rjvR4",be={Phone:Ec,PhoneReady:Mc,Screen:Ac,StatusBar:Rc,Clock:Lc,Island:xc,Banner:Dc,AppIcon:Oc,Copy:Nc,Time:Bc},Fc=28,Uc=17;function Tt(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 Hc(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 zc({animate:n=!0,title:t,body:a,time:r,now:i}={}){const{i18n:o}=v(),s=i?Tt(i,o.locale):"",l=i?Hc(i):void 0,c=l?Tt(l.time,o.locale):"";let u="";return l?.day==="today"?u=o.translate("thank_you.qr_code.phone_banner.body_today",{time:c}):l&&(u=o.translate("thank_you.qr_code.phone_banner.body_tomorrow",{time:c})),e("div",{"aria-hidden":"true",className:N(be.Phone,{[be.PhoneReady]:n}),children:e("div",{className:be.Screen,children:[e("div",{className:be.StatusBar,children:[e(wc,{"aria-hidden":"true"}),e("span",{className:be.Clock,dir:"auto",children:s}),e("span",{className:be.Island})]}),e("div",{className:be.Banner,children:[e("span",{className:be.AppIcon,children:e(La,{backgroundColor:bn.toRgb(),color:"white",containerSize:Fc,iconSize:Uc})}),e("span",{className:be.Copy,children:[e("strong",{dir:"auto",children:t??o.translate("thank_you.qr_code.phone_banner.title")}),e("span",{dir:"auto",children:a??u})]}),e("span",{className:be.Time,dir:"auto",children:r??o.translate("thank_you.qr_code.phone_banner.time")})]})]})})}const Yc="HLHdp",qc="E1A3F",$c="_2gHo1",Cn={PhoneReveal:Yc,PhoneRevealReady:qc,BarReveal:$c};function Wc({treatment:n,isReady:t=!0,now:a}){return n==="phone"?e("div",{"aria-hidden":"true",className:N(Cn.PhoneReveal,{[Cn.PhoneRevealReady]:t}),children:e(zc,{animate:t,now:a})}):e("div",{"aria-hidden":"true",className:Cn.BarReveal,children:e(U,{accessibilityVisibility:"hidden",gridTemplateRows:t?"1fr":"0fr",overflow:"hidden",children:e(Ic,{animate:t})})})}const Vc="eB1Wk",Gc="Ipunz",Kc="F0OjS",jc="_3ne1k",Qc="_5eMgt",Zc="WYqsK",Xc="smgwg",Jc="v7JCj",eu="cnARA",nu="UIp5B",tu="IATLg",au="JN61f",ru="JwOzi",ue={QrCodeSkeleton:Vc,QrCode:Gc,QrCodeLoaded:Kc,Popover:jc,Styled
1QrPopover:Qc,TrackingPopover:Zc,PopoverContent:Xc,PhonePopoverContent:Jc,PopoverContentStack:eu,TrackingPopoverContent:nu,PopoverCopy:tu,QrCodeCopy:au,TrackingHeadline:ru},iu=[cn.Bar,cn.Phone];function ou(n){return iu.includes(n??"")}function su(n){const t=J(void 0);return F(()=>{if(!n)return;let a;const r=()=>{t.value=new Date},i=6e4-Date.now()%6e4;r();const o=window.setTimeout(()=>{r(),a=window.setInterval(r,6e4)},i);return()=>{window.clearTimeout(o),a!==void 0&&window.clearInterval(a)}},[n,t]),t.value}function lu({link:n,label:t,message:a,installCampaign:r,styledQrCode:i,onQrCodeInteraction:o}){const{i18n:s,observability:l}=v(),c=Ne(),u=J(!1),d=G(null),h=G(0),p=J(!1),m=J(!1),g=Gt(),b=!u.value,y=m.value,f=u.value&&y,k=r?.variant,T=ou(k),P=T?a?.subtitle:a?.title,I=T?void 0:a?.subtitle,M=K(()=>{o?.()},[o]),R=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]),B=k===cn.Phone,V=su(B),$=K(()=>{m.value=!0,h.current+=1,!u.value&&d.current===null&&(d.current=performance.now())},[m,u]),H=K(()=>{m.value=!1,p.value=!1},[p,m]);F(()=>{if(!(!y||!P))return Er({content:P})},[y,P]),F(()=>{g&&f&&(p.value=!0)},[p,g,f]);const Z=O=>{y&&!p.value&&O.propertyName==="filter"&&(p.value=!0)};return e(A,{children:e(ya,{impressionType:"download_shop_button",impressionFeatures:["desktop","qr_code"],children:e(me,{inlineSize:c?"fill":void 0,onClick:M,overlay:e(io,{theme:{popover:{cornerRadius:20}},children:e(co,{keepMounted:!0,padding:"none",positionArea:"inline-end",onHide:H,onShow:$,children:e(A,{className:N(ue.Popover,{[ue.TrackingPopover]:T,[ue.StyledQrPopover]:i}),children:e(A,{padding:"none",className:N(ue.PopoverContent,{[ue.TrackingPopoverContent]:T,[ue.PhonePopoverContent]:B}),children:e(_,{gap:"none",className:ue.PopoverContentStack,children:[e(U,{gridTemplateColumns:"auto minmax(0, 1fr)",columnGap:"none",children:[e(U,{gridTemplateColumns:"1fr",children:[b?e(A,{className:ue.QrCodeSkeleton,children:e(Oe,{contentDisplay:"block",inlineSize:"100%",blockSize:"100%"})}):null,e(A,{className:N(ue.QrCode,{[ue.QrCodeLoaded]:f}),padding:"none",onTransitionEnd:Z,children:[i?e("img",{src:n,height:rn,width:rn,alt:s.translate("thank_you.qr_code.iframe_title"),"aria-hidden":b,onLoad:R}):e(uo,{src:n,height:rn,width:rn,title:s.translate("thank_you.qr_code.iframe_title"),"aria-hidden":b,onLoad:R}),i?null:e(La,{overlay:!0})]})]}),e(A,{children:e(U,{gridTemplateColumns:"1fr",blockSize:"100%",children:e(A,{className:ue.QrCodeCopy,children:e(_,{gap:"none",className:ue.PopoverCopy,children:[e(A,{className:N({[ue.TrackingHeadline]:T}),children:P?e(L,{level:3,children:P}):null}),I?e(w,{children:e(Ee,{children:I})}):null]})})})})]}),T?e(Wc,{isReady:p.value,treatment:k,now:V},h.current):null]})})})})}),children:t})})})}const Pt="order_status_page";class cu extends Error{constructor(){super(...arguments),this.name="ShopMobileClipboardInteractionError"}}function uu({label:n,link:t,onClipboardInteraction:a}){const r=Me(),i=gn(),{observability:o,mobileCheckoutSdk:s,embed:l}=v(),c=Ne(),u=s.variant.isStandard()||l?.isCheckoutKit();if(!r)return null;const d=r?.mobileUrlAttributionPayload,h=i.value.defaultAttributes?.visitToken;return e(A,{children:e(ya,{impressionType:"download_shop_button",impressionFeatures:["mobile"],children:e(me,{inlineSize:c?"@media (inline-size >= medium) auto, fill":void 0,onClick:async()=>{try{const b=g(d,h);await Ht(b)}catch(b){b instanceof Error&&o.error(new cu(b.message,{cause:b}))}finally{a?.();const b=m(t,h);window.location.href=b}},children:n})})});function m(b,y){const f=new URL(b);return y&&f.searchParams.set("sid",y),u&&f.searchParams.set("open_externally","true"),f.toString()}function g(b,y){return y?`${b},${y},${Pt}`:`${b},,${Pt}`}}function xa({label:n,message:t,mobileLinkToShop:a,desktopLinkToShop:r,styledQrCode:i,installCampaign:o,onClipboardInteraction:s,onQrCodeInteraction:l}){return pi()?e(uu,{label:n,link:a,onClipboardInteraction:s}):e(lu,{label:n,link:r,message:t,styledQrCode:i,installCampaign:o,onQrCodeInteraction:l})}const It="installments_order",du="open.shop.app";function pu(){const{i18n:n}=v(),t=Me(),{track:a}=Se("shop_pay_installments_highlight_button");if(F(()=>{t&&a("shop_button_rendered")},[t,a]),!t)return null;const{shopInstallmentsMobileUrl:r,qrCodeUrl:i}=t,o={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:It}),l=pn(i,{link_provider:du,utm_content:It});return e(xa,{label:n.translate("installments.installments_highlight_shop_button_get_reminders"),message:o,desktopLinkToShop:l,mobileLinkToShop:s,onClipboardInteraction:()=>{a("arrive")},onQrCodeInteraction:()=>{a("arrive_show_qr_code")}})}function hu(){const{i18n:n,shop:t}=v(),a=t.hasFlagEnabled(ce),r=n.translate("installments.installments_highlight_headline");return e(Y,{accessibilityLabel:r,colorLayer:a?void 0:"control",children:e(_,{gap:"large-200",children:[e(L,{children:r}),e(_,{gap:"base",children:[e(w,{children:e(Ee,{children:n.translate("installments.installments_highlight_copy")})}),e(pu,{})]})]})})}function wt({shipmentGroups:n,title:t,subtitle:a,subtitleIcon:r,address:i,addressHeading:o,modalHeader:s}){const{shop:l}=v(),c=l.hasFlagEnabled(ce);return e(Y,{overflow:"hidden",colorLayer:c?void 0:"control",children:e(_,{gap:"base",children:[e(_,{gap:"small-200",children:[e(L,{level:2,children:t}),a&&e(_,{direction:"inline",gap:"small-400",alignItems:"center",children:[r&&e(ie,{type:r}),e(S,{color:"subdued",children:a})]})]}),n.map((u,d)=>e(ho,{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)),i&&e(_,{gap:"small-200",children:[e(L,{level:3,children:o}),e(Je,{address:i,multiline:!0})]})]})})}function mu(n,{i18n:t}){const a=n.filter(({selectedMethod:i})=>i.methodType==="PICK_UP");if(a.length===0)return;const[r]=a;return{shipmentGroups:a.map(({id:i,line:o,selectedMethod:s})=>({id:i,deliveryMethod:s,merchandiseLines:(o.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 _u(n,{checkout:t,i18n:a,shop:r}){const{shippingAddress:i}=t.latestReceipt.value?.status==="processed"?t.latestReceipt.value.purchaseOrder:{},o=n.filter(({selectedMethod:h})=>h.methodType==="SHIPPING");if(o.length===0)return;const s=o.map(({line:h,selectedMethod:p})=>({line:h,method:p})),l=r.marketDrivenShippingEnabled?mo(o.map(({line:h})=>h),s):new Set,c=new Map;o.forEach((h,p)=>{const m=la(h.selectedMethod,h.line.id??`index-${p}`);c.has(m)||c.set(m,h)});const u=Di(s).flatMap(({key:h,methods:p,merchandiseLines:m})=>{const g=c.get(h),b=p[0];if(!g||!b)return[];const f=p.find(k=>!l.has(k))??Oi(b);return[{id:g.id,deliveryMethod:f,merchandiseLines:m.filter(k=>k.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:i,addressHeading:a.translate("thank_you.shipping_address_title"),modalHeader:h=>d===1?a.translate("order_summary.shipping_label"):a.translate("shipping.split_shipping_merchandise_shipment_number",{number:h+1,total:d})}}function yu(n){return n.status!=="filled"?[]:n.lines.filter(Xe).flatMap(t=>{const a=Fn(t);return a?[{id:t.id??hi(),line:t,selectedMethod:a}]:[]})}function gu(){const n=v(),{deliveryNext:t}=n.checkout.latestReceipt.value?.status==="processed"?n.checkout.latestReceipt.value.purchaseOrder??{}:{};if(!t)return null;const a=yu(t).filter(({line:o})=>o.type==="ONE_TIME_PURCHASE"),r=mu(a,n),i=_u(a,n);return e(_,{gap:"base",children:[r&&e(wt,{...r}),i&&e(wt,{...i})]})}function fu(){const{i18n:n,shop:t}=v(),a=t.hasFlagEnabled(ce),r=n.translate("shipping.shipping_method_title"),i=x().deliveryNext,o=Ni(),s=ca(),l=mn(),c=C(()=>{const T=i.value;if(T?.status!=="filled")return[];const P=mi(T.lines).filter(Xe);return aa(P)}),u=C(()=>c.value.filter(({type:T})=>T==="ONE_TIME_PURCHASE")),d=C(()=>sa(u.value).groups),h=C(()=>d.value.length),p=C(()=>c.value.filter(({type:T})=>T==="SUBSCRIPTION")),m=C(()=>p.value.length>0),g=C(()=>c.value.map(({methods:T})=>T[0]?.handle)),b=C(()=>n.translate("shipping.shipping_method_first_shipment_group_title",{count:h.value})),y=C(()=>m.value&&!o.value.showShipmentBreakdown&&!Ut(l.value.currentDetour)),f=C(()=>
1{if(m.value||s.value)return n.translate("shipping.split_shipping_multiple_shipment_notice");if(h.value>1)return n.translate("shipping.split_shipping_multiple_shipment_notice_one_time_purchase",{quantity:h.value})}),k=t.marketDrivenShippingEnabled&&_o(u.value);return e(E,{when:()=>i.value?.status==="filled",children:()=>e(Ae,{target:"plain",children:e(Y,{accessibilityLabel:r,children:e(_,{gap:"base",padding:"small-300 none none none",children:[e(_,{gap:"small-400",children:[e(L,{level:2,children:r}),e(E,{when:()=>o.value.showShipmentBreakdown,fallback:e(bu,{multipleShipmentsHeading:f}),children:e(fo,{})})]}),e(_,{gap:"large-200",children:[e(_,{gap:"small-200",children:[e(E,{when:y,children:()=>e(L,{level:3,children:b.value})}),e(Ae,{target:"edgeToEdgeCard",children:e(Y,{accessibilityRole:"presentation",colorLayer:a?void 0:"control",children:e(yo,{deliveryLines:c.value,selectedDeliveryMethodHandles:g.value,choiceListContext:!1,showGroupPrices:!k,shipmentGroups:d.value})})})]}),e(bo,{subscriptionLines:p.value})]})]})})})})}function bu({multipleShipmentsHeading:n}){return e(E,{when:n,children:t=>e(_,{direction:"inline",gap:"small-400",alignItems:"center",children:[e(ie,{type:"truck"}),e(S,{color:"subdued",children:t})]})})}function vu(n){return n.some(t=>t.key==="_shopify_buyer_membership_key"&&t.value==="buy_with_prime")}const Et="/cdn/shopifycloud/checkout-web/assets/c1/assets/envelope.C3KgH2Yk.svg",ku="sv7SI",Su="fF5mZ",Cu="k3nMX",Tu="oMEEK",Pu="p3BjS",We={Backdrop:ku,BackdropFill:Su,BackgroundImage:Cu,Content:Tu,Envelope:Pu};function Iu({active:n,children:t,products:a,colorLayer:r}){const i=J(new Set),[o]=a.filter(({src:l})=>l&&!i.value.has(l));function s(l){if(!(l.target instanceof HTMLImageElement))return;const c=l.target.getAttribute("src");c&&(i.value=new Set([...i.value,c]))}return e("div",{onErrorCapture:s,children:e(U,{children:[n?e(Y,{accessibilityRole:"presentation",className:N(We.Backdrop,ve.ThankYouEntranceStatus),colorLayer:r,overflow:"hidden",children:e(A,{background:"subdued",className:We.BackdropFill,overflow:"hidden",position:"absolute",children:o?e(Ye,{alt:"",className:We.BackgroundImage,inlineSize:"auto",objectFit:"cover",src:o.src}):null})}):null,e(_,{alignItems:n?"center":void 0,className:We.Content,padding:n?"base":void 0,paddingBlockStart:n?"large-300":void 0,children:[n?e(_,{alignItems:"center",className:ve.ThankYouEntranceStatus,children:[o?e(_n,{src:o.src}):null,i.value.has(Et)?null:e(A,{className:We.Envelope,inlineSize:"95px",children:e(Ye,{alt:"",aspectRatio:"95/102",src:Et})})]}):null,e(A,{inlineSize:"100%",children:t})]})]})})}const Da=Nt(void 0);function Oa(){return Bt(Da)}const wu="Q3L2z",Eu="wpbKf",Mu="_1H07Y",Tn={StaticMapContainer:wu,StaticMapContainerWithOverlay:Eu,StaticMapOverlay:Mu};function Au({src:n,title:t,overlayTitle:a,overlayLabel:r,overlay:i,onError:o}){const s=_i();return e(E,{when:s,fallback:e(Oe,{contentDisplay:"block",aspectRatio:"2 / 1"}),children:e("div",{className:N(Tn.StaticMapContainer,{[Tn.StaticMapContainerWithOverlay]:!!i}),children:[e(Ye,{src:n,alt:t??"Map",loading:"lazy",objectFit:"cover",aspectRatio:"2/1",onError:o?()=>o():void 0}),r?e("div",{"aria-hidden":"true",className:Tn.StaticMapOverlay,children:e(_,{gap:"small-500",alignItems:"center",children:[a?e(S,{color:"subdued",type:"small",children:a}):null,e(S,{type:"strong",children:r})]})}):null,i]})})}function Ru(n,t){return n?t?n.dark:n.light:null}function Lu(){v();const n=Un(),t=j();return Ru(t?.mapUrl,n)}const xu="_1hWL4",Du="l8QVy",Ou="pJQCE",Nu="_35R1C",Bu="_9uLa0",Fu="_1w8la",Uu="xQXew",Hu="gj4N0",zu="VImf6",Yu="_9CuNx",qu="O8Seo",$u="_01CKh",Wu="KQs71",Vu="Ic4fS",Gu="IMQvT",Ku="_7hUKC",ju="QZR8x",le={ProductMapMarker:xu,"ProductMapMarker-borderColorBase":"Kv2J9","ProductMapMarker-borderColorCustom":"Wv7wJ","ProductMapMarker-badgeToneBase":"WtS0D","ProductMapMarker-badgeToneAccent":"GgkBH",ProductMapMarkerCards:Du,ProductMapMarkerPin:Ou,ProductMapMarkerPinBody:Nu,ProductMapMarkerPinGlyph:Bu,ProductMapMarkerLabel:Fu,ProductMapMarkerLabelEnter:Uu,ProductMapMarkerCard:Hu,ProductMapMarkerCardEnter:zu,ProductMapMarkerCardPrimary:Yu,ProductMapMarkerCardShadowReveal:qu,ProductMapMarkerCheckmark:$u,ProductMapMarkerCheckmarkEnter:Wu,ProductMapMarkerCheckmarkSvg:Vu,ProductMapMarkerCheckmarkPath:Gu,ProductMapMarkerCheckmarkPathDraw:Ku,ProductMapMarkerCards2:ju},Na=5;function Ba({children:n,products:t}){const a=t.slice(0,Na),{merchandiseThumbnail:{borderColor:r="base",badge:{background:i}={}}={}}=Vt(),o=!i||i==="base"?"base":"accent";return e("div",{className:N(le.ProductMapMarker,le[Vn("ProductMapMarker-borderColor",r)],le[Vn("ProductMapMarker-badgeTone",o)]),children:[a.length>0?e("div",{"aria-hidden":"true",className:N(le.ProductMapMarkerCards,a.length===2&&le.ProductMapMarkerCards2),children:a.map((s,l)=>e("div",{className:N(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,focu
1sable:"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(Qu,{}),e(A,{background:"base",borderRadius:"fullyRounded",boxShadow:"base",className:le.ProductMapMarkerLabel,minBlockSize:"26px",overflow:"hidden",paddingBlock:"small-400",paddingInline:"small-200",children:e(U,{alignItems:"center",columnGap:"small-400",gridAutoFlow:"column",children:n})})]})}function Qu(){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 Zu="QiTzJ",Xu="BsmDF",Mt={MapFallback:Zu,BackgroundImage:Xu};function Ju({children:n,products:t,background:a="subdued"}){const r=J(new Set),i=t.filter(({src:l})=>l&&!r.value.has(l)),o=a==="product"?i[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:Mt.MapFallback,inlineSize:"100%",onErrorCapture:s,overflow:"hidden",position:"relative",children:[o?e(Ye,{alt:"",className:Mt.BackgroundImage,inlineSize:"auto",objectFit:"cover",src:o}):null,e(Ba,{products:i,children:n})]})}function Fa({title:n,markerTitle:t,markerLabel:a,fallbackTitle:r=t,products:i,failedSources:o,...s}){const l=Lu(),c=l?o.value.has(l):o.value.size>0;function u(){o.value=new Set([...o.value,l])}const d=e(D,{children:[e(S,{color:"subdued",children:r}),e(Mr,{children:e(S,{type:"strong",children:e("bdi",{children:a})})})]});return c?e(Ju,{products:i??[],background:i?"product":"subdued",children:d}):l?e(Au,{src:l,title:n,overlayTitle:i?void 0:t,overlayLabel:i?void 0:a,overlay:i?e(Ba,{products:i,children:d}):void 0,onError:u},l):e(so,{...s,title:n,onLoadFailure:u})}function Ua(){const{checkout:n,shop:t}=v(),{acceptEmailMarketing:a,buyerIdentity:r,contactInfo:i}=x();return C(()=>!r.value?.purchasingCompany&&i.value?.email!==void 0&&t.emailMarketing!=="OFF"&&!a.value&&n.latestReceipt.value?.status==="processed"&&n.latestReceipt.value.eligibleForMarketingOptIn)}const ed=/^(e_[0-9a-f]{32})_(.+?)(?:_osp)?$/;function nd(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=ed.exec(t);return a?{clientHandle:a[1],variant:a[2]}:{clientHandle:null,variant:null}}function td(n){return nd(n)}const ad="CGD68",rd="MPVYO",id="_3MQvk",od="_8PSDP",sd="fWnnD",ld="_1IOC2",cd="bDnw9",ud="lK5x7",dd="c0CTL",pd="_4davv",hd="_38oLJ",md="oXdcI",_d="hOZAu",yd="_2Vr9X",gd="ogNqn",fd="aAfSd",bd="kujmI",vd="q19KC",kd="_6rZN2",Sd="E1DyI",Cd="gRzAZ",Td="EHhRv",Pd="KaI2p",Id="taDzR",wd="gvU7N",Ed="w7U7g",Md="Cl5Kz",Ad="Dh152",Rd="TjYGl",Ld="EzlVD",xd="JcEQU",Dd="HEqog",Od="OaqG3",Nd="xHfD9",Bd="Qhbfd",Fd="_1C9SL",Ud="jvrs3",Hd="ayiZt",zd="JVpja",Yd="y2YPD",qd="t0uAF",$d="rLm9q",Wd="PXe2R",Vd="_63ITw",q={Root:ad,VisualLabel:rd,Layer:id,Phrase:o
1d,Token:sd,IntroToken:ld,ShopButtonAnimationCharOut:cd,FinalToken:ud,ShopButtonAnimationCharIn:dd,IconSpacer:pd,ShopLogoSpacer:hd,Icon:md,BellIcon:_d,ShopButtonAnimationBellRing:yd,ShopLogoToken:gd,ShopLogo:fd,StaticLabel:bd,StaticShopLogoWrapper:vd,AccessibleLabel:kd,Delay0:Sd,Delay1:Cd,Delay2:Td,Delay3:Pd,Delay4:Id,Delay5:wd,Delay6:Ed,Delay7:Md,Delay8:Ad,Delay9:Rd,Delay10:Ld,Delay11:xd,Delay12:Dd,Delay13:Od,Delay14:Nd,Delay15:Bd,Delay16:Fd,Delay17:Ud,Delay18:Hd,Delay19:zd,Delay20:Yd,Delay21:qd,Delay22:$d,Delay23:Wd,Delay24:Vd};function Gd({icon:n,introText:t,finalPrefix:a,accessibleLabel:r,staticLabel:i}){const{i18n:o}=v(),{locale:s,localeDirection:l}=o,c=p=>l==="rtl"&&er(p)?"rtl":"ltr",[u,d]=re(!1);F(()=>{d(!0)},[]);const h=Ha(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:N(q.Token,q.IntroToken,q.IconToken,q.Delay0),children:n}),e("span",{className:q.IconSpacer}),At({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:[At({text:a,tokenClassName:q.FinalToken,locale:s,graphemesEnabled:u}),e("span",{className:q.ShopLogoSpacer}),e("span",{className:N(q.Token,q.FinalToken,q.ShopLogoToken,q[za(h)]),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:i}),e("span",{className:q.AccessibleLabel,children:r})]})}const Kd=/^(ar|fa|ur|he|iw|hi|th)\b/i;function Ha(n,t,a){const r=n.match(/\s+|\S+/gu)??[];if(!a||Kd.test(t)||typeof Intl.Segmenter!="function")return r;let o;try{o=new Intl.Segmenter(t,{granularity:"grapheme"})}catch{return r}return r.flatMap(s=>/^\s+$/u.test(s)?[s]:Array.from(o.segment(s),l=>l.segment))}function At({text:n,tokenClassName:t,locale:a,graphemesEnabled:r,delayOffset:i=0}){return Ha(n,a,r).map((o,s)=>{const l=s+i;return e("span",{className:N(q.Token,t,q[za(l)]),children:o.replaceAll(" "," ")},`${l}-${o}`)})}function za(n){return`Delay${Math.min(n,24)}`}function jd(){return e(_,{direction:"inline",alignItems:"center",className:q.StaticShopLogoWrapper,children:e(fn,{className:q.ShopLogo,"aria-hidden":"true"})})}function Qd(){return e("svg",{className:N(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 Zd="mnuHb",Xd="ZHLC1",Jd="ggkpn",ep="jNjME",Ve={ShopOrderUpdates:Zd,"ShopOrderUpdates-redesign":"LOmaT",ManageOrderButton:Xd,ShopLogoWrapper:Jd,ShopLogo:ep},Rt={delivery:"delivery_order",pickup:"pickup_order"},np="/qr/u/download.svg";function tp(n){const t=new URL(n);return t.pathname=np,t.toString()}class ap extends Error{constructor(){super(...arguments),this.name="PickupInstallCampaignAssignmentError"}}function Ya({className:n,variant:t="delivery"}={}){const{i18n:a,observability:r,shop:i}=v(),o=Ne(),s=j(),l=Me(),c=td(l?.mobileUrl),u=a.translate("app_promotions.animated_shop_button.final_prefix"),d={icon:e(Qd,{}),introText:a.translate("app_promotions.animated_shop_button.intro.value_props"),finalPrefix:u,accessibleLabel:`${u}Shop`,staticLabel:e(D,{children:[u,e(jd,{})]})},{track:h}=Se("order_updates"),p=Yi();F(()=>{l&&h("shop_button_rendered")},[l,h]);const m=t==="pickup"&&c.clientHandle!==null&&c.variant!==null;if(F(()=>{m&&r.error(new ap("Pickup order received an install campaign assignment"),{severity:"warning",metadata:{installCampaign:{clientHandle:c.clientHandle,variant:c.variant}}})},[m,c.clientHandle,c.variant,r]),!l)return null;const{mobileUrl:g,orderTrackingMobileUrl:b,qrCodeUrl:y,buyerHasOrderTrackingPush:f,orderTrackingPushCtaVariant:k}=l,T=t!=="pickup"&&f!==!0&&k==="treatment",P={shop:e("span",{className:Ve.ShopLogoWrapper,children:e(fn,{className:Ve.ShopLogo,"aria-label":"Shop"})})};let I,M;
1t==="pickup"?(I=a.translate("app_promotions.track_pickup_with_shop_logo",P),M={title:a.translate("thank_you.qr_code.pickup_title"),subtitle:a.translate("thank_you.qr_code.pickup_description")}):(f===!0?I=a.translate("app_promotions.order_updates_track_order_logo",P):T?I=a.translate("app_promotions.get_notified_with_shop_logo",P):I=e(Gd,{...d}),M=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 R=pn(T&&b?b:g,{utm_content:Rt[t]}),B=i.hasFlagEnabled(yi),V=pn(B?tp(y):y,{link_provider:"open.shop.app",utm_content:Rt[t],...B?{qr_secure_deferred:"true",qr_style:"rounded",qr_error_correction_level:"m",qr_branded_center:"true","qr_branded_center_options[padding]":"0.08"}:{}}),$=e(xa,{label:I,message:M,mobileLinkToShop:R,desktopLinkToShop:V,styledQrCode:B,installCampaign:t==="pickup"?void 0:c,onClipboardInteraction:()=>{h("arrive")},onQrCodeInteraction:()=>{h("arrive_show_qr_code")}}),H=o?s?.orderStatusPageUrl:void 0;return e("div",{className:N(Ve.ShopOrderUpdates,H?void 0:p,n,{[Ve["ShopOrderUpdates-redesign"]]:o}),children:H?e(U,{gridTemplateColumns:"@media (inline-size >= medium) 'repeat(2, minmax(0, 1fr))', 'minmax(0, 1fr)'",gap:"base",children:[e("div",{className:p,children:$}),e(me,{className:Ve.ManageOrderButton,inlineSize:"fill",variant:"secondary",href:H,children:a.translate("thank_you.manage_order_label")})]}):$})}function qa(){const t=j()?.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=he(qa()),i=he(n),o=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:m,confirmWithPhone:g}=a.value,b=r.value;return{pendingOrderConfirmationTitle:l(b),pendingOrderConfirmationMessage:c({confirmWithEmail:m,confirmWithPhone:g,isPickup:i.value,financialPendingReason:b}),isOrderPendingStatus:!!b.financialPendingReason}});function l(m){return m.isBuyerActionRequired?o:s}function c({confirmWithEmail:m,confirmWithPhone:g,isPickup:b,financialPendingReason:y}){return y.isBuyerActionRequired?d({confirmWithEmail:m,confirmWithPhone:g,isPickup:b}):y.isProviderActionRequired?t.translate("thank_you.thank_you_payments_app_pending_payment_description_provider_action_required_default"):p({confirmWithEmail:m,confirmWithPhone:g,isPickup:b})}function u({confirmWithEmail:m,confirmWithPhone:g}){return m&&g?t.translate("thank_you.thank_you_payments_app_pending_payment_description_buyer_action_required_with_email_and_phone_pick_up"):m?t.translate("thank_you.thank_you_payments_app_pending_payment_description_buyer_action_required_with_email_pick_up"):g?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:m,confirmWithPhone:g,isPickup:b}){return b?u({confirmWithEmail:m,confirmWithPhone:g}):m&&g?t.translate("thank_you.thank_you_payments_app_pending_payment_description_buyer_action_required_with_email_and_phone"):m?t.translate("thank_you.thank_you_payments_app_pending_payment_description_buyer_action_required_with_email"):g?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 h({confirmWithEmail:m,confirmWithPhone:g}){return m&&g?t.translate("thank_you.thank_you_payments_app_pending_payment_description_default_with_email_and_phone_pick_up"):m?t.translate("thank_you.thank_you_payments_app_pending_payment_description_default_with_email_pick_up"):g?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:m,confirmWithPhone:g,isPickup:b}){return b?h({confirmWithEmail:m,confirmWithPhone:g}):m&&g?t.translate("thank_you.thank_you_payments_app_pending_payment_description_default_with_email_and_phone"):m?t.translate("thank_you.thank_you_payments_app_pending_payment_description_default_with_email"):g?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 $a(n,{legacyRepresentProductsAsFees:t=!1,remoteMerchandiseDetails:a}={}){return(n?.length?n.map(i=>({giftCard:i.giftCard,key:i.stableId,legacyFee:i.legacyFee,quantity:i.quantity,requiresShipping:i.requiresShipping,src:i.image?.two}
1)):ip(a)).filter(({quantity:i,legacyFee:o})=>i>0&&!(t&&o)).map(({giftCard:i,key:o,requiresShipping:s,src:l})=>({giftCard:i,key:o,requiresShipping:s,src:l}))}function rp(n,{legacyRepresentProductsAsFees:t=!1,remoteMerchandiseDetails:a}={}){const r=$a(n,{legacyRepresentProductsAsFees:t,remoteMerchandiseDetails:a}),i=[];for(const o of r)if(!(!o.requiresShipping||o.giftCard||!o.src)&&(i.push({key:o.key,src:o.src}),i.length===Na))break;return i}function ip(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 op={id:"766f1a73f6f5729d8de999514e11f6d1a0015979328b3a23a3ffe084b071b5ed",type:"mutation",name:"EmailMarketingOptIn",source:""};function sp({optInState:n}){const{i18n:t}=v();let a,r;return n.value==="loading"?(a=e(Ar,{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(_,{direction:"inline",gap:"base",alignItems:"center",children:[a,r]})}function Wa({colorLayer:n}){const{track:t}=zn(),{client:a,i18n:r,observability:i,userEvents:o,shop:{id:s,myshopifyDomain:l},source:c,checkout:u,graphql:{coreGraphql:d}}=v(),h=J("not_opted_in"),p=gn(),m=x().buyerIdentity.value?.customerProfile,g=j(),b=a.unstable_getSerialization("sessionToken"),y=c.type==="simulated",f=u.configuration.layout.isOnePage.value;F(()=>{t("thank_you_page_email_consent_page_view/4.0",{page:"thank_you",customerId:m?.id?Number(je(m.id)):void 0,orderId:ia(g?.orderIdentity.id),sessionToken:p?.value?.defaultAttributes?.visitToken,uniqueToken:p?.value?.defaultAttributes?.uniqToken})},[m?.id,g,t,p?.value?.defaultAttributes?.uniqToken,p?.value?.defaultAttributes?.visitToken]);async function k(T){if(y){h.value="opted_in";return}if(!T)return;const P=Number(je(s));o.monorailEvent({schemaId:"checkout_email_marketing_optin_ui_interaction/1.0",payload:{checkoutToken:c.checkoutSessionIdentifier||c.sourceId,shopId:Number.isNaN(P)?0:P,shopifyDomain:l,action:"click_email_opt_in",origin:"thank_you_page",checkoutVersion:f?"checkout_one_redesign":"checkout_one"}}),h.value="loading";const{data:I,error:M}=await d.mutate(op,{variables:{orderId:g.orderIdentity.id,sessionInput:{sessionToken:b}}});if(M){h.value="not_opted_in",M instanceof nr||i.error(M);return}const R=I?.subscribeToMarketing.__typename;R==="MarketingOptInFailure"&&I?.subscribeToMarketing.code!=="ALREADY_SUBSCRIBED"?h.value="not_opted_in":R==="MarketingOptInFailure"&&I?.subscribeToMarketing.code==="ALREADY_SUBSCRIBED"?h.value="opted_in":R==="MarketingOptInSuccess"&&(h.value=I?.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:()=>h.value==="not_opted_in",fallback:e(sp,{optInState:h}),children:e(ua,{id:"marketing_opt_in",name:"marketing_opt_in",onChange:k,label:r.translate("marketing.accept_marketing_checkbox_label")})})})}function Va({children:n}){return typeof n!="string"?null:e(D,{children:n.split(`
2`).filter(Boolean).map(t=>e(w,{children:t},t))})}const lp=({deliveryInformation:n,paymentInstructions:t,color:a,textAlign:r})=>{const{i18n:i}=v(),{confirmWithEmail:o,confirmWithPhone:s}=vn().value,{isOrderPendingStatus:l,pendingOrderConfirmationMessage:c}=Yn().value,u=yn().value,d=Hn(),h=Me()?.buyerHasOrderTrackingPush,p=()=>{if(l)return c;if(o&&s)return u?i.translate("thank_you.thank_you_confirmed_with_email_and_phone_description.multi_store"):i.translate("thank_you.thank_you_confirmed_with_email_and_phone_description.single_store");if(o)return u?i.translate("thank_you.thank_you_confirmed_with_email_description.multi_store"):d&&h===!0?i.translate("thank_you.thank_you_confirmed_with_
2shop_updates_description"):i.translate("thank_you.thank_you_confirmed_with_email_description.single_store");if(s)return u?i.translate("thank_you.thank_you_confirmed_with_phone_description.multi_store"):i.translate("thank_you.thank_you_confirmed_with_phone_description.single_store")},m=()=>p()||i.translate("thank_you.thank_you_confirmed_order_with_missing"),g=()=>n?e(D,{children:[e(S,{type:"strong",children:i.translate("thank_you.delivery_information_label")})," ",e(Ee,{children:n})]}):null,b=t&&t.length>0;return e(_,{gap:"small-300",children:[b?null:e(w,{color:a,textAlign:r,children:m()}),n?e(w,{color:a,textAlign:r,children:g()}):null,b?e(_,{gap:"base",children:t.map(y=>e(Va,{children:y},y))}):null]})};function cp({children:n,shippingAddress:t,deliveryInformation:a,deliveryMethodType:r,paymentInstructions:i,isBuyWithPrime:o,legacyRepresentProductsAsFees:s,merchandiseLines:l,remoteMerchandiseDetails:c}){const{shop:u,i18n:d,checkout:h}=v(),p=Oa(),m=u.hasFlagEnabled(ce),g=Ne(),{track:b}=Se("map"),y=Un(),f=qe().value,{pendingOrderConfirmationTitle:k,isOrderPendingStatus:T}=Yn().value,P=Ua(),I=yn().value,M=Hn()&&!I,R=T?k:I?d.translate("thank_you.confirmed_orders_title"):d.translate("thank_you.thank_you_title"),B=Kt(t,{countryFormat:"explicit",hiddenFields:["address1","address2","company","firstName","lastName","phone","postalCode","countryCode"]}),V=g&&u.hasFlagEnabled(gi)&&r==="SHIPPING",$=j(),H=$?.completedRemoteCheckouts?.some(fe=>fe.status==="submitted"&&(fe.remotePurchaseOrder.deliveryLines?.length??0)>1)??!1,Z=$?.isRedacted??!1,O=C(()=>!Z&&P.value),ee=J(new Set),oe=$?.mapVisibility==="VISIBLE",z=pe(()=>oe&&t?.coordinates&&B?{label:B,position:{lat:t.coordinates.latitude,lng:t.coordinates.longitude}}:null,[t,B,oe]),_e=pe(()=>V?rp(l,{legacyRepresentProductsAsFees:s,remoteMerchandiseDetails:c}):[],[V,s,l,c]),ne=!f&&!I&&!H,se=V&&ne,ye=$a(l,{legacyRepresentProductsAsFees:s,remoteMerchandiseDetails:c}),Ce=g&&ne&&!Z&&!h.isShippingRequired.value&&ye.length>0&&ye.every(({requiresShipping:fe})=>!fe),Le=pe(()=>z?[{type:"destination",title:d.translate("thank_you.marker.shipping"),headerDisabled:!0,...z}]:[],[z,d]);let X=null;if(z&&!Ce){const fe=d.translate("thank_you.marker.shipping"),De=`${d.translate("thank_you.shipping_address_map_title",{address:z.label})}`;X=e(Fa,{failedSources:ee,title:De,markerTitle:fe,markerLabel:z.label,fallbackTitle:d.translate("shipping.shipping_address_title"),products:se?_e:void 0,options:{mapOptions:{center:z.position,styles:y?_a:[]}},markers:Le,handleClick:()=>b("click"),handleDoubleClick:()=>b("dblclick"),handleDragEnd:()=>b("dragend"),handleZoomChanged:()=>b("zoom_changed")})}const Be=X===null?"none":"base",Te=X&&p?e(A,{ref:p,children:X}):X,xe=e(D,{children:[e(L,{textAlign:g?"center":void 0,children:R}),e(lp,{color:g?"subdued":void 0,deliveryInformation:a,paymentInstructions:i,textAlign:g?"center":void 0})]}),Fe=M?e(Ya,{variant:"delivery"}):null,Ue=e(D,{children:[e(_,{gap:"base",borderWidth:g?void 0:`${Be} none none none`,padding:"base",children:[g?e(_,{gap:"small-300",children:xe}):xe,Fe]}),o&&!f&&e(_,{gap:"base",borderWidth:g?void 0:`${Be} none none none`,padding:"base",children:e(go,{})}),e(E,{when:O,children:e(Wa,{colorLayer:m?void 0:"control"})})]});return g?e(D,{children:[Te?e(Y,{accessibilityRole:"presentation",colorLayer:m?void 0:"control",overflow:"hidden",className:ve.ThankYouEntranceStatus,children:Te}):null,e(Iu,{active:Ce,colorLayer:m?void 0:"control",products:ye.flatMap(({key:fe,src:De})=>De?[{key:fe,src:De}]:[]),children:n}),e(Y,{accessibilityLabel:R,colorLayer:m?void 0:"control",overflow:"hidden",children:Ue})]}):e(Y,{accessibilityLabel:R,colorLayer:m?void 0:"control",overflow:"hidden",className:ve.ThankYouEntranceStatus,children:[Te,Ue]})}const Ga=Nt(null);var up={ProgressTracker:"_1ojciyd1 _1ojciyd0 _1fragemqt _1fragemsm _1fragemp0 _1fragemuf _1fragem11h _1fragemzk"};function dp({activeStep:n,children:t}){const a=tr.toArray(t).map(o=>ar(o)?o.props.id:void 0),r=a.join("|"),i=pe(()=>({steps:a.reduce((o,s,l)=>(o[s]={active:n?n===s:l===0,completed:a.indexOf(n)>a.indexOf(s)},o),{})}),[n,r]);return e(Ga.Provider,{value:i,children:e("ol",{className:up.ProgressTracker,role:"list",children:t})})}
2function pp(){const n=Bt(Ga);if(n===null)throw new fi("<Step />  must be used inside of an <ProgressTracker />");return n}var we={Step:"_4xihkw1 _4xihkw0 _1fragem64",Icon:"_4xihkw4",Label:"_4xihkw5",Connector:"_4xihkw6",completed:"_4xihkw2",active:"_4xihkw3"};function hp({children:n,description:t,icon:a,iconTone:r,id:i,label:o,state:s,stateHidden:l=!0}){const{steps:c}=pp(),u=Object.keys(c).indexOf(i)===0,{[i]:{active:d,completed:h}}=c,p=N(we.Step,h&&we.completed);return e(D,{children:[!u&&e(yp,{active:d,completed:h}),e("li",{className:p,"aria-current":d,children:[e(mp,{active:d,completed:h,type:a,tone:r}),e(_p,{active:d,completed:h,description:t,label:o,state:s,stateHidden:l}),n]})]})}function mp({active:n,tone:t="accent",type:a,completed:r}){const i=N(we.Icon,n&&we.active,r&&we.completed);return e("div",{className:i,children:e(ie,{type:a,tone:n||r?t:void 0})})}function _p({active:n,completed:t,description:a,label:r,state:i,stateHidden:o}){const s=N(we.Label,(n||t)&&we.completed);return e(D,{children:[e("div",{className:s,children:[o?e(S,{accessibilityVisibility:"exclusive",children:i}):e(w,{children:i}),e(w,{children:e(S,{type:n||t?"strong":"generic",children:r})})]}),(n||t)&&a&&e(w,{type:"small",color:"subdued",children:a})]})}function yp({active:n,completed:t}){const a=N(we.Connector,(n||t)&&we.completed);return e("li",{className:a,"aria-hidden":!0})}function gp({activeStep:n="inReview"}){const{i18n:t,shop:a}=v(),r=a.hasFlagEnabled(ce),i=t.formatDate(new Date,{month:"long",day:"2-digit",timeZone:a.timeZone}),o=[{id:"submitted",date:i,label:t.translate("thank_you.breadcrumbs_submitted"),state:t.translate("thank_you.breadcrumbs_submitted"),icon:"arrow-right"},{id:"inReview",date:i,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(Y,{colorLayer:r?void 0:"control",children:[e(_,{gap:"base",padding:"base",children:e(dp,{activeStep:n,children:o.map(s=>e(hp,{description:s.date,icon:s.icon,id:s.id,label:s.label,state:s.state},s.id))})}),e(Ze,{}),e(_,{gap:"base",padding:"base",children:[e(L,{children:t.translate("thank_you.thank_you_title_review")}),e(w,{children:t.translate("thank_you.thank_you_confirmed_order_with_draft")})]})]})}function fp({children:n,paymentInstructions:t}){const{value:a}=Qe(),{shop:r,i18n:i}=v(),o=Oa(),s=r.hasFlagEnabled(ce),l=Ne(),c=x().deliveryNext,u=bi(c.value,"ONE_TIME_PURCHASE",!0),d=u?.status==="available"?u.methods.find(X=>X.methodType==="PICK_UP")?.pickupLocation:void 0,{confirmWithEmail:h,confirmWithPhone:p}=vn().value,{isOrderPendingStatus:m,pendingOrderConfirmationTitle:g,pendingOrderConfirmationMessage:b}=Yn({isPickup:!0}).value,y=Un(),{track:f}
2=Se("map"),k=j(),T=J(new Set),P=yn().value,I=Hn()&&!P,M=Kt(d?.address,{hiddenFields:["address1","address2","company","firstName","lastName","phone","postalCode","countryCode"]}),R=ye(),B=k?.isRedacted??!1,V=Ua(),$=C(()=>!B&&V.value),H=i.translate("thank_you.pick_up_in_store_marker.shipping"),Z=d?.name||M,O=d?.address?.coordinates,ee=l?k?.mapVisibility==="VISIBLE"&&O?.accuracy==="PRECISE":!r.hasFlagEnabled(vi)&&!!O;let oe=null;if(ee&&O){const X=`${i.translate("thank_you.shipping_address_map_title",{address:Z??M})}`;oe=e(Fa,{failedSources:T,title:X,markerTitle:H,markerLabel:Z,options:{mapOptions:{styles:y?_a:[]}},markers:Le(),handleDragEnd:()=>f("dragend")})}const z=oe?e(A,{borderWidth:l?void 0:"none none base none",ref:o,children:oe}):null,_e=e(D,{children:[e(L,{textAlign:l?"center":void 0,children:R}),e(w,{color:l?"subdued":void 0,textAlign:l?"center":void 0,children:Ce()})]}),ne=I?e(Ya,{variant:a?"delivery":"pickup"}):null,se=e(D,{children:[e(_,{gap:"base",padding:"base",children:[l?e(_,{gap:"small-300",children:_e}):_e,t&&t.length>0&&e(_,{gap:"base",children:[e(Ze,{direction:"inline"}),t.map(X=>e(Va,{children:X},X))]}),ne]}),e(E,{when:$,children:e(Wa,{colorLayer:s?void 0:"control"})})]});if(!l)return e(Y,{accessibilityLabel:R,colorLayer:s?void 0:"control",className:ve.ThankYouEntranceStatus,children:[z,se]});return e(D,{children:[oe?e(Y,{accessibilityRole:"presentation",colorLayer:s?void 0:"control",overflow:"hidden",className:ve.ThankYouEntranceStatus,children:z}):null,n,e(Y,{accessibilityLabel:R,colorLayer:s?void 0:"control",overflow:"hidden",children:se})]});function ye(){return m?g:i.translate("thank_you.thank_you_title")}function Ce(){return m?b:a?h&&p?i.translate("thank_you.thank_you_confirmed_with_email_and_phone_description.single_store"):h?i.translate("thank_you.thank_you_confirmed_with_email_description.single_store"):p?i.translate("thank_you.thank_you_confirmed_with_phone_description.single_store"):i.translate("thank_you.thank_you_confirmed_order_with_missing"):h&&p?i.translate("thank_you.thank_you_confirmed_order_with_email_and_phone_pick_up"):h?i.translate("thank_you.thank_you_confirmed_order_with_email_pick_up"):p?i.translate("thank_you.thank_you_confirmed_order_with_phone_pick_up"):i.translate("thank_you.thank_you_confirmed_order_with_missing")}function Le(){const X=d?.address?.coordinates;return X?[{type:"destination",title:H,position:{lat:X.latitude,lng:X.longitude},label:Z,headerDisabled:!0}]:[]}}function bp({children:n}){const t=x(),{value:a}=t.paymentLines,{value:r}=t.shippingAddress,{value:i}=ra("ONE_TIME_PURCHASE"),{value:o}=t.customAttributes,{value:s}=t.legacyRepresentProductsAsFees,{value:l}=t.remoteMerchandiseDetails,c=Fn(i),u=Bn(),{value:d}=Qe();if(Re()?.some(g=>g.status==="failed"))return null;if(u.value)return e(D,{children:[n,e(gp,{})]});const p=a?.lines.map(({method:g,specialInstructions:b})=>g.type==="paymentOnDelivery"||g.type==="customManualPayment"||g.type==="manualPayment"?b??g.paymentInstructions:null).filter(Boolean),m=c?.methodType==="LOCAL"?c.description:void 0;return d||c?.methodType==="PICK_UP"?e(fp,{paymentInstructions:p,children:n}):e(cp,{shippingAddress:r,legacyRepresentProductsAsFees:s,merchandiseLines:t.merchandiseLines.value?.lines,remoteMerchandiseDetails:l,paymentInstructions:p,deliveryInformation:m,deliveryMethodType:c?.methodType,isBuyWithPrime:vu(o??[]),children:n})}function vp(){const n=Bn(),{financialPendingReason:t}=qa(),a=Re()?.some(r=>r.status==="failed");return!n.value&&!t&&!a}const kp=3e3,Sp=2e3,Cp="(max-width: 749px)";function Tp(){const{checkout:n,client:t,router:a}=v(),r=n.thankYouEntrance,i=qt(),o=An(),s=vp(),l=yn().value,c=Gt(),u=s&&!l,d=a.currentUrl.value.normalizedPath,h=ko(t.initialRequest.url.pathname).endsWith(d),p=G(i&&u&&!o&&!h).current,m=r.progress?.phase.value,g=m==="loading"||m==="completing",y=J(p?g?"waiting-for-progress":"waiting-for-hydration":"complete"),f=y.value,k=J("centered"),T=r.isRevealing.value,P=J(null),I=G(null),M=G(null),{lock:R,unlock:B}=Rr(),V=c||!u,$=K(()=>{Gn(()=>{y.value="complete",r.skip()})},[r,y]),H=K(()=>{Gn(()=>{r.settle(),$()})},[r,$]),Z=K(()=>{y.value==="running"&&r.reveal()},[r,y]);wn(()=>{r.progress?.complete()},[r]),F(()=>
2{if(!p){r.skip();return}if(V){H();return}(y.value==="waiting-for-hydration"||y.value==="waiting-for-progress"&&!g)&&(y.value="running")},[r,g,H,p,V,y]),F(()=>{if(!p||f!=="running")return;const z=window.setTimeout(H,kp);return()=>window.clearTimeout(z)},[f,H,p]),F(()=>{if(!T)return;const z=window.setTimeout(H,Sp);return()=>{window.clearTimeout(z),H()}},[T,H]),F(()=>{if(!(!p||f!=="running"))return window.scrollTo(0,0),R(),B},[f,R,p,B]);const O=K(()=>{const z=I.current,_e=M.current;if(!z||!_e)return;const ne=z.getBoundingClientRect(),se=_e.getBoundingClientRect();P.value={x:ne.left+ne.width/2-(se.left+se.width/2),y:ne.top+ne.height/2-(se.top+se.height/2)}},[P]),ee=K(z=>{I.current=z,(y.value==="waiting-for-progress"||y.value==="waiting-for-hydration")&&(k.value=z&&window.matchMedia(Cp).matches?"traveling":"centered"),O()},[O,k,y]),oe=K(z=>{M.current=z,O()},[O]);return{isAfterProgress:m==="complete",isContentHidden:r.phase.value==="pending"&&p,isEntranceRevealing:T,mode:k.value,morphOffset:P.value,onDrawn:O,onEntranceSettled:H,onRevealed:Z,onSettled:$,registerMapTarget:ee,registerMark:oe,shouldAnimate:p,status:y.value}}const Pp="_1BgJP",Ip="coXlQ",wp="Ea8kH",Ep="HDNQw",Mp="JnQXy",Ap="BoaBN",Rp="_98hLo",de={ThankYouInterstitial:Pp,"ThankYouInterstitial-afterProgress":"MXKBd","ThankYouInterstitial-running":"In8pu",ThankYouInterstitialBackdrop:Ip,"ThankYouInterstitial-scrollContained":"_8DY5a",ThankYouInterstitialGraphic:wp,ThankYouInterstitialDisc:Ep,ThankYouInterstitialStroke:Mp,ThankYouInterstitialCircle:Ap,ThankYouInterstitialCheckmark:Rp,"ThankYouInterstitialGraphic-running":"NiSUe","ThankYouInterstitial-traveling":"t5tTv"},hn=56,Lt=hn/2,Lp=26.5,xp=75,Dp=hn/xp,Op="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 Np({afterProgress:n=!1,appearance:t,centerOnScreen:a=!1,confirmation:r,mode:i,morphOffset:o,onDrawn:s,onRevealed:l,onSettled:c,registerMark:u,status:d}){const h=o??{x:0,y:0},p=Bp(a),m=d==="running",g=i==="traveling",b=f=>{f.target===f.currentTarget&&c()},y=f=>{f.target===f.currentTarget&&s()};return e("div",{ref:p,className:N(de.ThankYouInterstitial,ve.ThankYouInterstitialOverlay,{[de["ThankYouInterstitial-afterProgress"]]:n,[de["ThankYouInterstitial-running"]]:m,[de["ThankYouInterstitial-traveling"]]:g}),role:"status","aria-hidden":d==="waiting-for-progress"?!0:void 0,"aria-label":r,children:[e(S,{accessibilityVisibility:"exclusive",children:r}),e("div",{className:de.ThankYouInterstitialBackdrop,"aria-hidden":"true",onAnimationStart:m?l:void 0,onAnimationEnd:m&&g?c:void 0}),e("div",{className:N(de.ThankYouInterstitialGraphic,{[de["ThankYouInterstitialGraphic-running"]]:m}),ref:u,onAnimationEnd:m&&!g?b:void 0,style:{"--morph-x":`${h.x}px`,"--morph-y":`${h.y}px`,"--thank-you-interstitial-disc-color":t==="shopPay"?bn.toRgb():void 0,"--thank-you-interstitial-stroke-color":t==="shopPay"?po.Grayscale.White.toRgb():void 0},"aria-hidden":"true",children:e("div",{className:de.ThankYouInterstitialDisc,children:e("svg",{className:de.ThankYouInterstitialStroke,viewBox:`0 0 ${hn} ${hn}`,focusable:"false","aria-hidden":"true",onAnimationStart:m&&g?y:void 0,children:[e("circle",{className:de.ThankYouInterstitialCircle,cx:Lt,cy:Lt,r:Lp,pathLength:"1"}),e("g",{transform:`scale(${Dp})`,children:e("path",{className:de.ThankYouInterstitialCheckmark,d:Op})})]})})})]})}function Bp(n){const t=G(null);return F(()=>{const a=t.current;if(!n||!a||typeof IntersectionObserver>"u")return;const r=[document.documentElement,document.body];for(const o of r)o.classList.add(de["ThankYouInterstitial-scrollContained"]);const i=new IntersectionObserver(([o])=>{if(!o?.isIntersecting)return;const s=o.boundingClientRect.bottom-o.intersectionRect.bottom;a.style.setProperty("--offscreen-block-end",`${s}px`)},{threshold:Array.from({length:101},(o,s)=>s/100)});return i.observe(a),()=>{i.disconnect();for(const o of r)o.classList.remove(de["ThankYouInterstitial-scrollContained"])}},[n]),t}const Fp={"ThankYouContent-hidden":"_3UsL1"};function Up({children:n}){const{i18n:t,checkout:a}=v(),r=Tp(),i=Hp(j());if(!r.shouldAnimate)return e(D,{children:n});const o=r.status==="complete"?null:e(Np,{afterProgress:r.isAfterProgress,appearance:i,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(Da.Provider,{value:r.registerMapTarget,children:[r.status==="running"?e(Lr,{children:e("div",{children:o})}):o,e(A,{className:N({[Fp["ThankYouContent-hidden"]]:r.isContentHidden,[ve.ThankYouEntrance]:r.isEntranceRevealing}),inert:r.isContentHidden,children:n}),r.isEntranceRevealing?e("span",{className:ve.ThankYouEntranceBeat,"aria-hidden":"true",onAnimationEnd:r.onEntranceSettled}):null]})}function Hp(n){return n?.shopAppLinksAndResources.shopPayOrder?"shopPay":"merchant"}const zp=Dn("ThankYouOrderSummaryContent");function Yp(){const{checkout:n,i18n:t,source:a}=v(),{value:r}=x().merchandiseLines,{open:i,setOpen:o}=xr(),s=xn(void 0,zp),l=`${s}-heading`,c=t.translate("order_summary.title"),u=Ie("Checkout::ThankYou::Dynamic::Render","ORDER_SUMMARY1"),d=Ie("Checkout::ThankYou::CartLineDetails::RenderAfter"),h=Ie("Checkout::ThankYou::CartLines::RenderAfter"),p=Ie("Checkout::ThankYou::Dynamic::Render","ORDER_SUMMARY2"),m=Ie("Checkout::ThankYou::Dynamic::Render","ORDER_SUMMARY3"),g=vo([...u,...d,...h,...p,...m]);rr(()=>{o(g.value)});const b=n.proposal.facts.merchandiseLines??[],y=jn(a)?b:r?.lines||[],{totalLineQuantities:f=0,totalLineQuantitiesFact:k=0}=Wt(),T=t.translate("order_summary.number_items",{count:jn(a)?k:f}),P=i.value,I=()=>{o(!i.peek())},M=n.configuration.visibility.showAside;return e(A,{display:M?"@media (inline-size >= medium) none, auto":"auto",children:e(Y,{accessibilityLabelledBy:l,colorLayer:"control",padding:"base",children:[e(L,{id:l,level:2,visibility:"hidden",children:c}),e(Dr,{section:"top_summary",children:e(Or,{section:"top_summary",children:e(So,{children:[e(Nr,{"aria-controls":s,"aria-expanded":P,"data-event-name":P?"order_summary_hide":"order_summary_show",inlineSize:"100%",onClick:I,children:e(U,{alignItems:"center",gap:"small-200",gridTemplateColumns:"minmax(0, 1fr) minmax(auto, max-content) minmax(auto, max-content)",children:[P?e(S,{size:"large",type:"strong",children:c}):e(S,{children:[e("span",{className:Qt({screenReaders:"only"}),children:c})," ",T]}),!P&&e(_,{direction:"inline",alignItems:"center",gap:"small-200",children:[e(Br,{variant:"fan-legacy",size:"small",merchandise:y,useImageAltTexts:!1,sortByPrice:!0}),e(Fr,{})]}),e(ie,{type:P?"chevron-up":"chevron-down",size:"small-200"})]})}),P?e("div",{id:s,children:e(A,{paddingBlockStart:"large-200",children:e(Ur,{skipWrappingSection:!0,hideAccessibilityTitle:!0})})},"thank-you-order-summary-open"):e("div",{id:s},"thank-you-order-summary-closed")]})})})]})})}const xt={},qp=(n,t)=>{const a=Q.screenLeft===void 0?Q.screenX:Q.screenLeft,r=Q.screenTop===void 0?Q.screenY:Q.screenTop;let i;Q.innerWidth?i=Q.innerWidth:Ge.documentElement.clientWidth?i=Ge.documentElement.clientWidth:i=screen.width;let o;Q.innerHeight?o=Q.innerHeight:Ge.documentElement.clientHeight?o=Ge.documentElement.clientHeight:o=screen.height;
2const s=Math.max(1,i/Q.screen.availWidth),l=(i-n)/2/s+a,c=(o-t)/2/s+r;return{height:t/s,left:l,top:c,width:n/s}},$p=n=>{n?.close()},Wp=(n,t,a="SignInWithShop")=>{const r=qp(365,554);xt[a]?.();const i=Q.open(n,"SignInWithShop",`popup,width=${r.width},height=${r.height},top=${r.top},left=${r.left}`),o=c=>{Ji({allowedOrigins:[eo,no,to,Q.location.origin],event:c,source:i})&&t(c)},s=()=>$p(i);t(new MessageEvent("message",{data:{type:"windoidopened"}}));const l=setInterval(()=>{i?.closed&&(t(new MessageEvent("message",{data:{type:"windoidclosed"}})),clearInterval(l))},200);return["beforeunload","unload","pagehide"].forEach(c=>{Q.addEventListener(c,s,{once:!0})}),Q.addEventListener("message",o),xt[a]=()=>{["beforeunload","unload","pagehide"].forEach(c=>{Q.removeEventListener(c,s)}),Q.removeEventListener("message",o),clearInterval(l)},i};let Pn=null;function Vp(){return Pn||(Pn=Co()),Pn}const Gp=(n,t)=>{const a=ao({...n,analyticsTraceId:Vp(),uxMode:"windoid"});if(!a){console.warn?.("Failed to build authorize URL due to incorrect parameters",n);return}let r=null;r=Wp(a,o=>{switch(o.data.type){case"completed":t.onComplete?.(o.data),r?.close();break;case"error":t.onError?.(o.data),r?.close();break;case"windoidopened":t.onWindoidOpen?.();break}})},Kp={"aria-label":"Shop",style:{fill:bn.toRgb(),width:44,height:17}},jp=({loading:n,onSignInCompleted:t,fetchAttempts:a=1})=>{const{i18n:r,shop:i}=v(),o=qe().value,s=r.translate("thank_you.verify_shop_account_title"),{track:l}=Se("pay_escrow"),{value:c}=x().contactInfo,u=!o,d=i.hasFlagEnabled(ce);F(()=>{if(n&&a>=1){l("verify_button_blurred_rendered");return}l("verify_button_rendered")},[n,l,a]);const h=()=>{l("verify_button_clicked"),Gp({loginHint:c?.email??"",codeChallenge:"test-code-challenge",codeChallengeMethod:"S256",flow:"thank_you_page_escrow",prompt:"login",proxy:!0,responseType:"code"},{onComplete:t})};return e(Ae,{target:u?"card":"plain",children:e(Y,{accessibilityLabel:s,colorLayer:u&&!d?"control":void 0,children:n?e(_,{padding:u?void 0:"base none",gap:"base",children:[e(Oe,{blockSize:"22px",inlineSize:"120px"}),e(Oe,{blockSize:"16px",inlineSize:"100%"}),e(Oe,{blockSize:"16px",inlineSize:"100%"})]}):e(_,{padding:u?void 0:"base none",gap:"large-200",children:[e(U,{gridAutoFlow:"column",gridTemplateColumns:"minmax(auto, max-content) minmax(0, 1fr)",gridTemplateRows:"minmax(0, 1fr)",justifyContent:"end",justifyItems:"end",alignItems:"center",alignContent:"center",children:[e(L,{level:2,children:s}),e(fn,{...Kp})]}),e(w,{color:"subdued",children:r.translate("thank_you.verify_shop_account_message")}),e(me,{id:"verify-account-button",variant:"secondary",onClick:h,children:r.translate("thank_you.verify_shop_account_cta")})]})})})};function Qp({showVerifyShopAccountButton:n}){const t=ga(),a=Me(),r=gn(),{track:i}=zn(),o=fa();return{track:()=>{if(!t||!a)return;const{buyerHasShopApp:l,buyerHasShopPay:c,shopPayOrder:u,orderUpdateOptions:d}=a,h=d.filter(p=>p!=="arrive").join(",");i("order_status_page_view/4.2",{page:"thank_you",orderId:t,isShopPayOrder:u,userHasShop:l,userHasPay:c,shippingUpdateOptions:h,experimentFlags:o,pageviewToken:r.value.defaultAttributes?.microSessionId??"",sessionToken:r.value.defaultAttributes?.visitToken??"",showVerifyShopAccountButton:n},{omit:["shopifyDomain","checkoutToken"]})}}}function Zp(){const{checkout:n}=v(),t=n.configuration.isUniversalCheckoutFinalizer;F(()=>
2{if(!t)return;const a=r=>{r.composedPath().some(Xp)&&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 Xp(n){return n instanceof HTMLAnchorElement&&n.hasAttribute("href")}const Jp={id:"ebcee8be9e6c7c28fbd55d8183745df83661612f69510c509fb5bd01a8b778e2",type:"query",name:"PublisherSettings",source:""},eh=Xt(({graphql:{coreGraphql:n}},{skip:t})=>{const a=n.query(Jp,{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 nh({inEditor:n,adsPublisherSettingsTypEnabled:t,draftAdsPublisherSettingsTypEnabled:a,isAllowedLocale:r,isAllowedCountry:i}){const o=t,s=a;return n?{preview:!0,shouldRender:s}:{preview:!1,shouldRender:o&&r&&i}}const Dt=["CA","US"],th=["en","de","fr","es"];function ah(){const{billingAddress:n,shippingAddress:t}=x(),{i18n:a}=v(),{geolocation:r}=Hr(),i=he(An()),o=Dt.includes(r.country.code),s=C(()=>(t.value??n.value)?.countryCode??""),l=C(()=>Dt.includes(s.value)&&o),c=C(()=>!i.value&&(!Ot(a.locale)||!l.value)),{adsPublisherSettingsTypEnabled:u,draftAdsPublisherSettingsTypEnabled:d,loading:h}=Jt(eh,{skip:c});return C(()=>c.value&&!i.value||h.value?{shouldRender:!1,preview:!1}:nh({adsPublisherSettingsTypEnabled:u.value,draftAdsPublisherSettingsTypEnabled:d.value,isAllowedLocale:Ot(a.locale),isAllowedCountry:l.value,inEditor:i.value}))}function Ot(n){return th.some(t=>n===t||n.startsWith(`${t}-`))}const rh=/Shop App\/|FBAN|FBAV|FB_IAB|Instagram|musical_ly|Bytedance|TikTok|Snapchat|Line\/|MicroMessenger|Pinterest|Twitter\/|LinkedInApp|GSA\/|;\s?wv/;function ih(n){return rh.test(n)}const oh=/Shop App\/[^/]+\/(iOS|Android)\//;function sh(n){return oh.exec(n)?.[1]??Zt(n)}function lh(n,t=!1){const{observability:a}=v(),r=G(n),i=G(t),o=G(0),s=G(),l=G(!1),c=G(0),u=G(null);r.current=n,i.current=t,o.current===0&&(o.current=Date.now());const{contactInfo:d,merchandiseLines:h}=x();s.current===void 0&&(s.current=!!(d.peek()?.email||d.peek()?.phone||h.peek()?.lines?.length));const p=pe(()=>{const y=typeof navigator>"u"?"":navigator.userAgent;return{is_in_app_webview:ih(y),browser_family:ki(y).name,os_family:sh(y)}},[]),m=K(()=>{u.current==null&&document.visibilityState==="visible"&&!i.current&&r.current!=null&&(u.current=Date.now())},[]),g=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),[]);F(()=>{m();const y=()=>{document.visibilityState==="visible"?m():g(),a.log("typ_visibility_changed","Thank You Page visibility changed",{...p,receipt_masked:i.current,visibility_state:document.visibilityState,receipt_loaded:r.current!=null,ms_since_mount:Date.now()-o.current,visible_ms_with_receipt:b()},{exportImmediately:!0})},f=k=>{g(),a.log("typ_pagehide","Thank You Page hidden",{...p,receipt_masked:i.current,persisted:k.persisted,receipt_loaded:r.current!=null,ms_since_mount:Date.now()-o.current,visible_ms_with_receipt:b()},{exportImmediately:!0})};return document.addEventListener("visibilitychange",y),window.addEventListener("pagehide",f),()=>{g(),document.removeEventListener("visibilitychange",y),window.removeEventListener("pagehide",f)}},[a,m,g,b,p]),F(()=>{l.current||n==null||(l.current=!0,m(),a.log("typ_receipt_rendered","Thank You Page rendered with order receipt",{...p,receipt_masked:i.current,order_details_at_mount:s.current,ms_to_receipt:Date.now()-o.current,visibility_state:document.visibilityState},{exportImmediately:!0,requiresKeepalive:!0}))},[a,n,m,p])}function ch(n){const{observability:t,checkout:a}=v(),r=G(!1);F(()=>{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 uh="_4Qmfj",dh={ThankYou:uh};function em(){const{i18n:n,url:t,shop:a,source:r,checkout:i,embed:o,router:s}=v(),{contactEmail:l,hasStorefront:c,externalDomain:u,previewReturnUrl:d}=a,{handleSetIsVerifiedShopAccount:h,status:p,isVerifiedShopAccount:m,fetchAttempts:g}=tl(),b=x().buyerIdentity.value?.purchasingCompany,y=zr().value,{track:f}=Se("follow_link"),k=r.type==="simulated",T=!!o?.isFlagshipPartner,P=j(),I=P?.paymentDetails?.buyerActionInfo,M=Si(),R=xo(),B=Lo(),V=qe(),$=Qe(),{
2currentDetour:H}=mn().value,Z=Yr().value,O=Ne(),ee=O&&Z&&qr({embedder:o?.embedder,isThankYouDetour:H?.type==="thankYou",normalizedPath:s.currentUrl.value.normalizedPath}),{main:{section:oe}}=En(),z=ah(),_e=i.configuration.layout.isOnePage.value,ne=i.configuration.isUniversalCheckoutFinalizer,se=a.hasFlagEnabled(ce),ye=!se&&Ci(oe);$r("thank-you");const{track:Ce}=Qp({showVerifyShopAccountButton:p==="split_user"});Ii({stage:P===void 0?Qn.Usable:Qn.Complete,id:"ThankYou"}),wi("ThankYou"),F(()=>{Ce()},[Ce]);const Le=Ie("Checkout::ThankYou::Dynamic::Render","ORDER_STATUS1"),X=Ie("Checkout::ThankYou::Dynamic::Render","ORDER_STATUS2"),Be=Ie("Checkout::ThankYou::Dynamic::Render","ORDER_STATUS3"),{header:{logo:Te}}=En(),xe=pe(()=>{if(!c&&u)return`https://${u}`;if(k)return t.storefront();if(d)return d;if(Te?.link)return Te.link;if(r.headerLogoUrl)return r.headerLogoUrl;if(c&&t.storefront())return t.storefront()},[k,Te?.link,r.headerLogoUrl,c,t,u,d]);Ro(xe,c&&!y&&!ne),Zp(),lh(P,T),ch(P);const Fe=e(D,{children:[e(Ti,{children:n.translate("thank_you.title")}),e(_,{gap:"@media (inline-size >= medium) large-500, large-300",children:[!O&&e(ut,{}),e(ph,{resetSectionStyle:se,children:[e(Ae,{target:"card",children:e(Ei,{grouped:!0,children:[e(
2on,{customizations:Le}),I&&e(Ns,{}),e(Ae,{target:"edgeToEdgeCard",children:e(bp,{children:O?e(ut,{}):null})}),ee&&e(Yp,{}),e(Kl,{}),e(E,{when:$,children:e(gu,{})}),!ne&&z.value.shouldRender&&e(Ae,{target:"edgeToEdgeCard",children:e(ac,{preview:z.value.preview})}),e(E,{when:B,children:e(Ao,{})}),!ne&&e(E,{when:R,children:e(hu,{})}),e(E,{when:M,children:e(wl,{})}),I&&e(Uo,{}),e(on,{customizations:X}),e(E,{when:()=>V.value&&!$.value,children:e(fu,{})}),m||ne?null:e(jp,{onSignInCompleted:h,loading:p==="fetching_status",fetchAttempts:g}),e(Sl,{}),e(on,{customizations:Be})]})}),e(Mi,{children:[!b&&!y&&i.configuration.allowRedirectToStorefront&&e(Ai,{children:e(me,{variant:"primary",size:"large",inlineSize:"fill",href:xe,onClick:k?void 0:()=>f("continue_shopping"),children:n.translate("thank_you.return_to_store_link_label")})}),!ne&&e(Ri,{children:e(w,{textAlign:"center",children:e(Ee,{children:n.translate("thank_you.contact_us_html",{contact_us:e(ke,{href:k?void 0:`mailto:${l}`,onClick:k?void 0:()=>f("contact_us"),children:n.translate("thank_you.contact_us")})})})})})]})]})]})]}),Ue=_e?e(A,{className:dh.ThankYou,padding:`@media (inline-size >= extraSmall) small-300 none, (inline-size >= medium) none, ${ye?"small-300 none":"none"}`,children:Fe}):Fe;return e(Up,{children:Ue})}function ph({children:n,resetSectionStyle:t}){const a=e(Li,{children:n});return t?e($t,{children:a}):a}export{em 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.