PageSourceSearch

https://www.cloudandvictory.com/cdn/shopifycloud/checkout-web/assets/c1/page-ThankYou.BcYETBHW.js

js cloudandvictory.com collected 2026-09-25 10:51:35 UTC 146,705 bytes, 2 lines download raw bytes

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