1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["b887ec56.B_GyG9Me.js","4b4bc88f.C26USmk8.js","2c1ab0fe.Bywc2Brn.js","app.DRs7v1W8.js","assets/app.CcGlIMpn.css","assets/wallet-prefilled-guest-return.BJvF0-q4.css","fe885b80.4u7Ja5rL.js","d0bb51ec.-Od_3rgw.js","f67abd2c.vvptRNe9.js","60a453ce.Bo_pHupz.js","e12db40c.J_ouQ898.js","9dba8418.BzGnZlrB.js","a6e11e56.CcNVFj1l.js","assets/AdminPreviewBar.BpHI7Zwr.css","33682ee7.6ZE8nEnS.js","e77d135d.Dz0RetrO.js","c610ba76.CwUP6dUn.js","66338e00.O0nSLoeq.js","28ac86c0.GUoE5iXU.js","3e6029dd.DMH-fNdg.js","assets/QRCode.BZ_m5G5a.css","30074413.SYbkF87L.js","assets/Pressable.D9SfDfsb.css","efa0389a.D_AJL692.js","22345fd4.9vcjBj8J.js","assets/Choice.CrYuHUmO.css","9f57d2aa.fH1n74wr.js","8574876b.DO_JQrVo.js","064f6ac1.Bjr6-mBf.js","assets/Popover.Bi1nHaU-.css","assets/DateField.CFFsBmUK.css","598fef4e.0s9DNJyq.js","assets/PaymentIcon.gzvCNwz_.css","33d2e4fc.-hSjVkOC.js","assets/NumberField.CRpcZnVJ.css","39921a74.DYnLAd5t.js","assets/Switch.BS8yVgoP.css","27f09e31.v_-URP-u.js","137622f3.DEZACuQZ.js","54bf0ebb.DWgJ3Tuj.js","assets/Sheet.CpR5hiDV.css","1ed8f5e3.CzhdrJHY.js","assets/floating-layer.DfWUBaTh.css","2fdb3dd3.BBVlyDMF.js","47b970b2.DjolDw47.js","a9fa9fda.DRbzGEJQ.js","ca3e798e.Dc9DtEXz.js","assets/PhoneField.uZEuHncj.css","1444e6bd.nTYcj6dN.js","29034f35.r-uti2un.js","assets/AnnouncementRuntimeExtensions.DbBB6lBJ.css","21cc90a2.DHzOO82q.js","413b21e2.Ck_yq-xt.js","2210eadb.DF0gIp_2.js","0fb2c600.CzoUzb6z.js","7ee73f43.D11Matm5.js","2a0f03e4.CCYvFzZ9.js","5ef0d995.DN3Z-63j.js","dd9b68fc.DSjJnvwG.js","adeb5fdb.DtgMdVgN.js","8498e76b.BPxyPO1O.js","2255f8fa.Cehu0_gD.js","3ca8ef7e.C6ifrex0.js","2495faa4.D3uf12cS.js","d08a6c7d.BQ54SvAe.js","78ab3dd0.hruEgq0z.js","d4ea2faa.DFrX4G1p.js","13b13169.BjDsofFa.js","cdfd59e6.XnOLrtop.js","7fc410e0.BcUeSO6V.js","d02f7b10.By7ntykM.js","ed9f2238.DPytesKr.js","33464469.DVBkFnZV.js","b8733b27.BkL2Omjm.js","ec391382.Cdv-WKBN.js","24773686.CaAVXUiT.js","7724832f.QQJrsTCS.js","9655ebc9.CX4pB1Ku.js","bad03769.DoO91dLJ.js","assets/DevTools.DTK7lleS.css","abd080c1.gM4E0IWI.js","2acfb1ce.BfTfZaeq.js","9d12dea3.Djhip2gO.js","b9c0319a.CPvnjp6u.js","74835653.B5dvKhsY.js","4b1c22b7.BoKf5l9E.js","assets/BillingAddressForm.BdwN7V1K.css","910cd6e2.CdoCkmtO.js","17425706.CtaKzzog.js","347b440c.C1_1cjnS.js","9ce08e25.Olf3Esll.js","assets/EstimatedDeliveryContent.B_THySFF.css","181d38d3.CJ-3Gmk5.js","792bb671.B3OvVnSg.js","assets/Middot.D7Ujmshx.css","03fde911.BnXW4P-d.js","assets/LocalPickupReviewMethod.aM0rPpGF.css","79974aab.DaZOEwGE.js","e77f7fe0.ucQ926NO.js","assets/PaymentLine.DT05kVlY.css","60575ca1.BY04AwPR.js","assets/DeliveryReviewMethods.DezeyHQn.css","160e80e7.BpodyEzN.js","9e94a50b.BevpX_k4.js","17324a0b.BoE8MWGh.js","b3389d5c.DbStXD7Y.js","dffdfb34.DLQCxWEB.js","1f5e7811.BFK0fqzB.js","assets/ShopPayLogo.87JMHPUK.css","c6c0cbda.BKcpNz6B.js","assets/useHasViolations.BnDF3H7t.css","0e67bd3b.D7tZwHwl.js","55098bf1.DXcUuNz_.js","cb5cf153.DnU9t5IG.js","e3e348f2.D2E-Dtt_.js","71ae3d5c.CT21Fulh.js","cb38e5c2.BhWVCtRR.js","6fb6f9d8.Dzf9eTaT.js","0b8657b8.D3afZApm.js","a422df8c.1bXGQc8C.js","assets/EmptyState.BEvzDDvy.css","7b0c98ea.wJBUDVvK.js","assets/TransitionHeight.CuRoM9zv.css","d22d2b80.B6f-Nstb.js","f49d4216.CZ2qzbQ0.js","assets/VatNumberValidationField.CYhzzEkL.css","0a30a815.Bp2eKlmM.js","assets/Page.BYM12A8B.css","7e8cd205.BvrfQK2C.js","5fda1420.renPlTOa.js","9f047e05.BbmwWYgO.js","9babe369.D342A3FZ.js","4421b714.9vkMsc69.js","d6972375.BBfwaZdd.js","f36e5f3f.CS02P0pu.js","assets/CalloutIcon.BxwwfmsJ.css","assets/lazyNoAddressLocation.D14orovx.css","60d61386.BCT2Aq9I.js","656fad11.BZhaTTbL.js","890247a7.bD08Ej_2.js","assets/FullScreenBackground.B_iZlQze.css","f8706cb6.CJ1blgWt.js","0e9ee714.BN1p7a14.js","ccdf3592.DMzipudw.js","71b60e0a.DfPLdYsH.js","assets/StickyPayButton.Cv62Qqkq.css","f3fe2775.D_uXSICt.js","ac5a19ff.DOcg_gPh.js","cc6ff67d.DxXH8xOm.js","08a3b809.BkK7NqSp.js","d25d1b95.BKchO7Wj.js","bf513f9c.CCBvccYL.js","e39bc11c.BUjAFMkx.js","7a8217fd.CFcj7rrg.js","8599b02a.CvNpIvqP.js","assets/useShopPayProgressIntercepts.CIy8uDiZ.css","cf29e63b.Dir5vp_T.js","assets/hasViolationsIgnoringCodes.BcTJoNaV.css","dfca5da5.DO4nAhLG.js","dae24aab.DshQXsWO.js","assets/Section.CU18S7Ap.css","a25deb9a.G9iQXgws.js","01973ac7.BOddeAem.js","58314944.QPymRmnD.js","945a08d6.VZGO8GHT.js","7bc8057b.DOprJdrT.js","assets/constants.xO_7ctnq.css","f1968089.D7rMVkBA.js","2b89a178.DH7Z9hRP.js","b684bff6.DCTHrC-i.js","d6447d9e.ylld8O85.js","f51e663e.B3qk_wNP.js","64de7b49.B8PyHxU4.js","8e79be58.CIzdvtZ5.js","assets/ShippingMethodSelector.B0hio2RO.css","90e26f5f.DF9vA_2V.js","assets/SubscriptionPriceBreakdown.vTcdVGq4.css","31cc568e.95lmLO5k.js","assets/ShippingLines.LcqrKXE1.css","65f3d4da.Bb3QiqCm.js","ca5e9c49.sV1ZKOq5.js","f3e117aa.CUlWDYgU.js","assets/OnePage.B-NX-U9c.css","9e3968a8.T5w9c1vr.js","fc21c11a.BTdpkxz4.js","e129c76e.pkv8K8Le.js","f78726c8.BaX6C3hQ.js","assets/hooks.CKE1iCma.css","e477f96c.C6fFzpZx.js","0c0ad074.RCwQbH01.js","assets/useShopPayButtonClassName.BrcQzLuH.css","87bfafec.CxwEzGHg.js","434e3b0a.B1BBnK_d.js","assets/PayButtonSection.CZuxzxFG.css","d2e6a587.D_77Lmvs.js","assets/MobileOrderSummary.DjDhVpQB.css","74122478.BFNIO6rZ.js","73a9b0a0.CBuXJYB6.js","81e109b1.DOkM2TK2.js","86720dbb.BFQbmiIX.js","f692f62f.CtV13pmW.js","assets/RedirectionNotice.DgiInWJ-.css","assets/PaymentMethodProgressionHost.BIxPaYCu.css","e0989459.q3_RlbRd.js","assets/RememberMeSection.JBO5WNhc.css","4ea44c06.BPHE-IIT.js","0627daf2.B5HhLBMR.js","dfc03c53.Zf7Vmr3p.js","50130ded.Btr-6Woc.js","assets/KnownBuyerPaymentMethodSelector.BXqN6ZOx.css","896e8dde.DblzFGfI.js","633ac094.BI7fR20D.js","24fcbaf6.B5mI6pP8.js","assets/PostPurchase.e2mo8B8q.css","090b00f0.DBm2WxTa.js","assets/Processing.D4vG8dn7.css","b120ac11.B1-Z0bZ6.js","289b89e4.DYSJsQfT.js","9011490c.Csq9k8m4.js","8c0eaf27.CHCEPiDY.js","91319467.DmXMWlHh.js","assets/ShopPayLoginLoader.B1_neltu.css","0cd5b134.lA2V9ssX.js","5c5c2e96.IV2Qv0K0.js","f5a7bb50.Dd2Qka32.js","a9ba8e86.RXsoHgMh.js","909cc5d6.DF4VmQeL.js","c57e39e6.jz1Qo53B.js","be176b00.BTfzF82s.js","17e57de1.B_nQLFIZ.js","assets/Map.cbVP6Hp_.css","0e4087ec.BP70Rysg.js","9f3d9f8c.XS5E-Lr3.js","8d3a12c3.aZd3_TP7.js","4aab4b34.DGU0_xxO.js","assets/ThankYou.WROckxhR.css","01f1d1bd.Bfk1LtHj.js","assets/Throttle.CK6IAVuq.css","b538640d.C8kc9xCi.js","49758c58._Nvnml8Z.js","assets/RuntimeExtension.DWkDBM73.css","7fd9930c.Crg5p8hD.js","assets/PaymentChallengeModal.Cz9ZxF4h.css","39bf6084.BojYLb7V.js","ee2bb050.Ciznd7Zi.js","assets/CryptoModalManager.CqiWenQK.css","7d468a18.CIuIZYBd.js","7b11cac4.BSB2JbnE.js","ca8e826d.BNeiCQWc.js","assets/Avatar.gBkEAe_p.css","assets/AccountAvatar.CG_WOP4G.css","461aedcc.Bx_HJ6sP.js","assets/ShopPayCheckout.CDRlDVu0.css","56bd1136.Bd2fVPe_.js","cb8fcd45.zy_B2F2B.js","8536083a.D-1yAB4a.js","assets/WalletSandbox.BoV0vp4z.css","4c290a1e.DxF3iNYA.js","assets/amazonWalletLazy.D78LrA7v.css"])))=>i.map(i=>d[i]); 2import{a2 as e,k as t,q as n,T as r,h as a,g as i,L as o,z as s,_ as l,ak as c,ao as u,u as d,b7 as p,o as m,x as h,Z as g,X as f,S as y,m as v,D as _,J as b,I as k,p as P,y as S,i as w,j as C,N as E,w as x,a9 as I,n as A,s as T,G as L,U as N,r as R,ad as M,a0 as D,t as O,aa as z,a5 as B,b8 as V,b9 as F,a1 as U,ba as q,W as j,a6 as H,H as $,a7 as Y,a8 as W,bb as G,bc as J,bd as K,be as Q,az as X,bf as Z}from"./2c1ab0fe.Bywc2Brn.js";import{b_ as ee,mt as te,cM as ne,aj as re,u as ae,c as ie,n as oe,b$ as se,v as le,mu as ce,hS as ue,bn as de,L as pe,dQ as me,as as he,mv as ge,em as fe,d1 as ye,cD as ve,cX as _e,gb as be,aW as ke,aV as Pe,z as Se,cU as we,cQ as Ce,cP as Ee,cV as xe,cW as Ie,cL as Ae,mw as Te,mx as Le,my as Ne,ek as Re,mc as Me,mz as De,mA as Oe,d9 as ze,fs as Be,j4 as Ve,_ as Fe,au as Ue,ar as qe,mB as je,jD as He,mC as $e,mD as Ye,mE as We,dJ as Ge,mF as Je,mG as Ke,mH as Qe,dN as Xe,dM as Ze,dL as et,dK as tt,mI as nt,ez as rt,lR as at,fY as it,mJ as ot,mK as st,lS as lt,b8 as ct,bl as ut,lM as dt,fP as pt,j as mt,fQ as ht,dY as gt,mL as ft,mM as yt,ch as vt,mN as _t,mO as bt,aO as kt,kM as Pt,s as St,o as wt,b2 as Ct,mP as Et,d_ as xt,at as It,dT as At,ag as Tt,eM as Lt,O as Nt,aP as Rt,ai as Mt,bY as Dt,bJ as Ot,gK as zt,gI as Bt,t as Vt,q as Ft,mQ as Ut,mR as qt,ke as jt,c8 as Ht,mS as $t,mT as Yt,b5 as Wt,mU as Gt,mV as Jt,mW as Kt,mX as Qt,mY as Xt,l9 as Zt,ee as en,ed as tn,iT as nn,ea as rn,mZ as an,ec as on,m_ as sn,eb as ln,N as cn,h8 as un,h6 as dn,aR as pn,m$ as mn,cb as hn,a6 as gn,c0 as fn,lo as yn,b9 as vn,h3 as _n,n0 as bn,a as kn,lE as Pn,eT as Sn,W as wn,cy as Cn,mq as En,c1 as xn,hb as In,aF as An,hc as Tn,aM as Ln,n1 as Nn,n2 as Rn,n3 as Mn,kA as Dn,jT as On,mm as zn,n4 as Bn,c2 as Vn,l8 as Fn,iu as Un,am as qn,eZ as jn,J as Hn,ah as $n,kd as Yn,dj as Wn,e6 as Gn,h as Jn,C as Kn,n5 as Qn,bL as Xn,ie as Zn,i0 as er,iA as tr,bf as nr,bb as rr,iq as ar,it as ir,ip as or,lw as sr,fg as lr,lH as cr,lG as ur,fk as dr,fh as pr,lI as mr,l$ as hr,cY as gr,ew as fr,I as yr,bc as vr,n6 as _r,n7 as br,ky as kr,n8 as Pr,ef as Sr,gG as wr,n9 as Cr,k$ as Er,na as xr,nb as Ir,nc as Ar,nd as Tr,ne as Lr,nf as Nr,ng as Rr,dx as Mr,nh as Dr,ni as Or,nj as zr,nk as Br,nl as Vr,nm as Fr,nn as Ur,no as qr,eQ as jr,
2np as Hr,nq as $r,mr as Yr,mg as Wr,B as Gr,mf as Jr,mh as Kr,nr as Qr,b7 as Xr,ns as Zr,nt as ea,nu as ta,nv as na,aJ as ra,nw as aa,jm as ia,jn as oa,gt as sa,nx as la,ny as ca,jl as ua,gg as da,gD as pa,nz as ma,nA as ha,c7 as ga,cC as fa,ab as ya,f9 as va,fa as _a,lr as ba,jJ as ka,fb as Pa,g9 as Sa,bI as wa,gF as Ca,g6 as Ea,nB as xa,g5 as Ia,ao as Aa,e4 as Ta,nC as La,lT as Na,aQ as Ra,h4 as Ma,nD as Da,nE as Oa,X as za,nF as Ba,nG as Va,nH as Fa,nI as Ua,j1 as qa,nJ as ja,fX as Ha,fZ as $a,nK as Ya,ih as Wa,nL as Ga,nM as Ja,nN as Ka,nO as Qa,dt as Xa,gv as Za,m as ei,ks as ti,nP as ni,ej as ri,iO as ai,k1 as ii,cZ as oi,aD as si,nQ as li,nR as ci,nS as ui,cG as di,dw as pi,fq as mi,nT as hi,w as gi,iY as fi,hg as yi,nU as vi,nV as _i,j0 as bi,c6 as ki,kj as Pi,jI as Si,hJ as wi,bN as Ci,x as Ei,dA as xi,dB as Ii,c$ as Ai,nW as Ti,F as Li,nX as Ni,kX as Ri,nY as Mi,bd as Di,b4 as Oi,b6 as zi,eG as Bi,y as Vi,bv as Fi,bK as Ui,bt as qi,j8 as ji,nZ as Hi,hV as $i,n_ as Yi,hn as Wi,n$ as Gi,iZ as Ji,o0 as Ki,hR as Qi,o1 as Xi,eu as Zi,ck as eo,ev as to,kS as no,o2 as ro,o3 as ao,o4 as io,o5 as oo,dO as so,o6 as lo,dH as co,o7 as uo,d5 as po,iX as mo,o8 as ho,g1 as go,o9 as fo,oa as yo,d2 as vo,js as _o,ju as bo,gw as ko,ob as Po,dG as So,dR as wo,gl as Co,dF as Eo,dE as xo,oc as Io,ad as Ao,e3 as To,dS as Lo,od as No,gE as Ro,cF as Mo,h1 as Do,jf as Oo,kN as zo,jR as Bo,oe as Vo,of as Fo,og as Uo,S as qo,jW as jo,gA as Ho,oh as $o,jG as Yo,oi as Wo,lq as Go,lp as Jo,gB as Ko,gC as Qo,oj as Xo,ok as Zo,ol as es,om as ts,gH as ns,g7 as rs,dk as as,c4 as is,bg as os,hW as ss,l2 as ls,g4 as cs,iU as us,i_ as ds,ae as ps,gT as ms,gJ as hs,on as gs,oo as fs,op as ys,oq as vs,or as _s,os as bs,f5 as ks,ot as Ps,ou as Ss,ov as ws,eS as Cs,h5 as Es,hm as xs,ac as Is,lj as As,ow as Ts,j7 as Ls,f2 as Ns,cK as Rs,U as Ms,ox as Ds,bM as Os,dv as zs,kK as Bs,ja as Vs,jb as Fs,aS as Us,fA as qs,jV as js,oy as Hs,lP as $s,lz as Ys,eJ as Ws,oz as Gs,oA as Js,oB as Ks,oC as Qs}from"./4b4bc88f.C26USmk8.js";import{r as Xs,w as Zs,C as el,a as tl,b as nl,D as rl,s as al,f as il,c as ol,d as sl}from"./d0bb51ec.-Od_3rgw.js";import{s as ll,S as cl,_ as ul,j as dl,w as pl,i as ml,c as hl,t as gl,O as fl,u as yl,v as vl,k as _l,m as bl,r as kl,l as Pl,n as Sl,o as wl}from"./app.DRs7v1W8.js";import{a as Cl,b as El,c as xl,s as Il,h as Al,j as Tl,I as Ll,k as Nl,e as Rl}from"./f67abd2c.vvptRNe9.js";import{i as Ml,f as Dl,r as Ol,j as zl,k as Bl,h as Vl,l as Fl,m as Ul,A as ql}from"./60a453ce.Bo_pHupz.js";import{d as jl,i as Hl,c as $l,b as Yl}from"./e12db40c.J_ouQ898.js";import{i as Wl}from"./9dba8418.BzGnZlrB.js";function Gl(e,t){e.error(t instanceof Error?t:new el("Required checkout profile could not be loaded",{cause:t}))}async function Jl(e,t){const{data:n}=await e.staticQuery(ee,{variables:t,skip:!0}),r=n?.checkoutProfile;return r?.id===t.id&&r.activatedExtensions?r:void 0}function Kl(t,n){if(!t||e(ee,t)!==e(ee,n))throw new el("Required checkout profile could not be loaded")}function Ql(e){return function(e,t){if(!t)return;if(void 0!==e[t])return e[t];const n=Object.keys(ne);for(let r=n.indexOf(t);r>=0;r--){const t=n[r];if(void 0!==e[t])return e[t]}}(e,te())}function Xl(e){if("object"!=typeof e||!e)return!1;let t=!1;for(const n of Object.keys(e)){if(!(n in ne))return!1;t=!0}return t}function Zl(e){return{analyticsProcessingAllowed:e.analyticsProcessingAllowed.value,marketingAllowed:e.marketingAllowed.value}}const ec=re("JourneyContext"),tc=re("JourneyProgressionContext");function nc(){const{journeyState:e,pageBeforeDetour:n,...r}=ae(ec),{router:a}=ie();return t(()=>{const t=a.currentUrl.value.normalizedPath,{plan:i,history:o,redirectTo:s}=e.value,l=i.detours.find(e=>e.route===t),c=i.greenPath.find(e=>e.route===t),u=n.value;return{...r,plan:i,currentPage:c??u,currentDetour:l,history:o,redirectTo:s,journeyState:e}})}function rc(){const e=ae(tc),{detour:t,progress:a,progressing:i,completing:o,prefetch:s,negotiate:l}=e,c=n(e=>l({identifier:Symbol("journeyNegotiation"),...e}),[l]);return r(()=>({detour:t,progress:a,progressing:i,completing:o,prefetch:s,negotiate:c}),[t,a,i,o,s,c])}function ac(e){const{checkout:{negotiator:t}}=ie(),n=oe(e);a(()=>t.listen((...e)=>n.current(...e)),[n,t])}function ic(e){const{checkout:{negotiator:t}}=ie(),n=oe(e);a(()=>t.listenBeforeNegotiation((...e)=>n.current(...e)),[n,t])}function oc({active:e=!0}={}){const{checkout:{negotiator:t}}=ie();a(()=>
2{if(e)return t.block()},[t,e])}const sc=["information","shipping","payment","review"];function lc(){const e=ie().checkout.latestReceipt.value;return"processed"===e?.status?e:void 0}function cc(){const e=lc(),t=nc(),a=i(!1),o=n(()=>(a.current=!0,a),[a]),s=n(()=>{if(a.current)return!0;const n="postPurchase"===t.value.currentDetour?.type;return!e||Boolean(e.redirectUrl)&&!n},[e,t]);return r(()=>({shouldPrevent:s,markAsEmitted:o}),[o,s])}function uc(e){const t=e.current.fields.taxes.peek();if(t)switch(t.status){case"available_total":return{amount:t.totalTax.amount,currencyCode:t.totalTax.currencyCode};case"available_total_included":return{amount:t.totalIncludedInTarget.amount,currencyCode:t.totalIncludedInTarget.currencyCode}}}const dc={thankYou:"c1_typ",postPurchase:"post_purchase"};function pc(e){return{CREDIT_CARD_ON_FILE:"creditCard",PAYPAL_ON_FILE:"wallet",customManualPayment:"manualPayment",deferred:"deferred",direct:"creditCard",giftCard:"redeemable",local:"local",manualPayment:"manualPayment",noop:"other",offsite:"offsite",other:"other",paymentOnDelivery:"paymentOnDelivery",redeemable:"redeemable",wallet:"wallet",walletsPlatform:"wallet",walletsPlatformPaymentMethod:"wallet",customOnsite:"customOnsite"}[e]||"other"}function mc(e,t,n){const r=[e.split(/(?=[A-Z])/).join("-")];return n?r.push(n):r.push(t?t.replace("_","-"):""),r.filter(e=>Boolean(e)).join("-").toLocaleLowerCase()}function hc(e){return e.checkoutSessionIdentifier}function gc(e){return e||void 0}function fc(e){return e?le(e):void 0}function yc(e){const t=e?.customerProfile;if(!t)return;const n=le(t.id),r=t.email??null,a=t.firstName??null,i=t.lastName??null,o=t.phone??null;return{id:n,email:r,firstName:a,lastName:i,ordersCount:t.ordersCount??null,phone:o}}function vc({negotiated:e,shop:t,source:n}){const r=e.current.fields.merchandiseLines.value,a=e.current.fields.remoteMerchandiseDetails?.value,i=r?me(r.lines,a):void 0,o=function(e,t){return t?t.map(t=>{const n=de(t.variantId??void 0),r={totalAmount:Cc((a=t.lineAllocations).reduce((e,t)=>e+t.totalAmountAfterLineDiscounts.amount,0),a[0]?.totalAmountAfterLineDiscounts.currencyCode)};var a;const i=t.itemPrice?t.itemPrice:{amount:0,currencyCode:e};return{cost:r,merchandise:{id:n??null,image:{src:t.image?.url??null},price:i,product:{id:de(t.productId??void 0)??null,title:t.title,untranslatedTitle:t.untranslatedTitle??null,url:t.productUrl??null,vendor:t.vendor,type:t.productType},sku:t.sku??null,title:t.subtitle??null,untranslatedTitle:t.untranslatedSubtitle??null},quantity:t.quantity}}):[]}(t.currencyCode,i),s=e.current.fields.customAttributes.value??[],l=["cartNext","abandonedCart"].includes(n.type)?n.sourceId:null;let c=0,u=0,d=t.currencyCode;return(i?.flatMap(e=>e.lineAllocations)||[]).forEach(e=>{u+=e.totalAmountAfterDiscounts.amount,c+=e.quantity,d=e.totalAmountAfterDiscounts.currencyCode}),{id:l,cost:{totalAmount:Cc(u,d)},lines:o,totalQuantity:c,attributes:s}}function _c({shop:e}){return{name:e.name,paymentSettings:{currencyCode:e.currencyCode},myshopifyDomain:e.myshopifyDomain,countryCode:e.countryCode,storefrontUrl:e.storefrontUrl??null}}function bc(e){const t=e?.purchasingCompany;if(t)return{company:{id:t.company.id,externalId:t.company.externalId??null,name:t.company.name},location:{id:t.location.id,externalId:t.location.externalId??null,name:t.location.name}}}function kc(e){switch(e.type){case"custom":return e.discountType;case"code":return"DISCOUNT_CODE";case"automatic":return"AUTOMATIC"}}function Pc(e,t){return{allocationMethod:e.allocationMethod,targetSelection:e.targetSelection,targetType:Ic(e.targetType),title:e.title,type:kc(e),value:Ac(e,t)}}function Sc(e){const t=[];return e.forEach(e=>{e.allocations.forEach(e=>{const n=e.discountDetails.discount;El(n)&&t.push({amount:e.amount,discountApplication:Pc(n,e.amount)})})}),t}function wc(e){return Cc(e.reduce((e,t)=>e+t.totalAmountAfterLineDiscounts.amount,0),e[0]?.totalAmountAfterLineDiscounts?.currencyCode)}function Cc(e,t){return{amount:Number(e.toFixed(2)),currencyCode:t}}function Ec(e){return e.sellingPlan?{sellingPlan:{id:e.sellingPlan.id,name:e.sellingPlan.name}}:null}function xc(e){return e.map(e=>({key:e.name,value:String(e.value)}))}function Ic(e){if(!e)return"";switch(e){case"MERCHANDISELINE":return"LINE_ITEM";case"DELIVERYLINE":return"SHIPPING_LINE";default:return""}}function Ac(e,t){const n=e.value;return"FixedAmountValue"===n.typename?t:{percentage:n.percentage}}function Tc(e,t,n,r){const a=!0===r?.[e],i=n?.[e]&&!0===n[e].value,o=!0===t.current.fields[e]?.value;return a||i||o||!1}function Lc(e,t){const n=new Map;
2return Dc(e,t).forEach(e=>{Oc(n,e),e.lineComponents.forEach(e=>Oc(n,e))}),n}function Nc(e,t,n,r,a,i=!1){const o=n?.purchaseOrder?.deliveryNext||e.current.fields.deliveryNext.value;if("filled"!==o?.status)return[];const s=e.current.fields.remoteMerchandiseDetails?.value??n?.remoteMerchandiseDetails,l=ce(o.lines,s),c=(t?.deliveryLines?.value??[]).map(e=>e.fields.deliveryMethodHandle?.value).filter(Boolean),u=l.filter(e=>"available"===e.status).map(e=>e).flatMap(e=>n?e.methods.map(t=>({method:t,availableDeliveryLine:e})):c.length>0?e.methods.filter(e=>c.includes(e.handle)).map(t=>({method:t,availableDeliveryLine:e})):[]),d=i?ue(u,({method:e})=>e.cost.amount,({method:e,availableDeliveryLine:t})=>"ONE_TIME_PURCHASE"===t.type?he(e):void 0):new Set;return u.map(({method:e,availableDeliveryLine:t},n)=>function(e,t,n){let r,a=e.cost,i=n?{...e.costAfterDiscounts,amount:0}:e.costAfterDiscounts;switch(e.methodType){case"PICK_UP":r="pickup",a=null,i=null;break;case"PICKUP_POINT":r="pickupPoint";break;case"SHIPPING":r="shipping";break;case"LOCAL":r="local";break;default:return}return{cost:a,costAfterDiscounts:i,description:e.description||null,handle:e.handle,title:e.title||null,type:r,...void 0===t?{}:{targetLineItems:t}}}(e,r&&a?function(e,t,{componentStableIdsByParent:n,parentStableIdByComponent:r}){const{targetMerchandiseLines:a}=e;if(!a)return;const i=new Set(a.map(e=>e.stableId)),o=[],s=new Set;return a.forEach(e=>{const a=r.get(e.stableId);if(void 0===a){const n=t.get(e.stableId);return void(void 0!==n&&o.push(n))}const l=(n.get(a)??[]).every(e=>i.has(e)),c=t.get(a);if(l&&void 0!==c)return void(s.has(a)||(o.push(c),s.add(a)));const u=t.get(e.stableId);void 0!==u&&o.push(u)}),o}(t,r,a):void 0,d.has(n))).filter(Boolean)}function Rc({negotiated:e,source:t,orderId:n,customerId:r,isFirstOrder:a,proposedParts:i,receipt:o,locale:s,shopCurrencyCode:l,marketDrivenShippingEnabled:c=!1}){const u=e.current.fields.contactInfo.value,d=fc(hc(t))??null,p=i?i.email.value:u?.email||o?.purchaseOrder?.email||null,m=i?i.phone.value:u?.phone||o?.purchaseOrder?.phone||null,h=e.current.fields.subtotalAfterMerchandiseDiscounts.value??o?.subtotalAfterMerchandiseDiscounts??null,g=e.current.fields.runningTotal.value??o?.checkoutTotal??null,f=g?.currencyCode??l??null,y=function(e,t,n){return Dc(e,n).map(e=>{const n=fc(e.variantId),r=e.itemPrice?e.itemPrice:{amount:0,currencyCode:t};return{discountAllocations:Sc(e.lineAllocations),id:n??null,quantity:e.quantity,title:e.title,variant:{id:n??null,image:{src:e.image?.url??null},price:r,product:{id:fc(e.productId)??null,title:e.title,vendor:e.vendor,type:e.productType,untranslatedTitle:e.untranslatedTitle??null,url:e.productUrl??null},sku:gc(e.sku)??null,title:e.subtitle??null,untranslatedTitle:e.untranslatedSubtitle??null},finalLinePrice:wc(e.lineAllocations),sellingPlanAllocation:Ec(e),properties:xc(e.properties),lineComponents:e.lineComponents.map(e=>function(e,t){const n=fc(e.variantId),r=e.itemPrice?e.itemPrice:{amount:0,currencyCode:t};return{discountAllocations:Sc(e.lineAllocations),id:n??null,quantity:e.quantity,title:e.title,variant:{id:n??null,image:{src:e.image?.url??null},price:r,product:{id:fc(e.productId)??null,title:e.title,vendor:e.vendor,type:e.productType,untranslatedTitle:e.untranslatedTitle??null,url:e.productUrl??null},sku:gc(e.sku)??null,title:e.subtitle??null,untranslatedTitle:e.untranslatedSubtitle??null},finalLinePrice:wc(e.lineAllocations),sellingPlanAllocation:Ec(e),properties:xc(e.properties)}}(e,t))}})}(e,l,o),v={selectedDeliveryOptions:Nc(e,i,o,Lc(e,o),zc(e,o),c)},_=Boolean(p)&&Tc("acceptEmailMarketing",e,i,o),b=Tc("acceptSmsMarketing",e,i,o),k=o?.smsMarketingPhone||i?.smsMarketingPhone?.value||e.current.fields.smsMarketingPhone.value||null;let P=!1;P=o?Boolean(b):b&&Boolean(k);const S=P&&k||null,w=function(e,t){const n=e.current.fields.discountLines.value,r=(n?.lines?.length?n:void 0)??t?.discountLines;return r?.lines?.length?r.lines.reduce((e,t)=>{if(Cl(t)){const n=t.amount;if(!n)return e;e.push(Pc(t.discount,n))}return e},[]):[]}(e,o),C=o?.totalSavings||e?.current?.fields?.totalSavings.value||null,E=uc(e)||o?.checkoutTotalTaxes||{amount:0,currencyCode:l},x=function(e,t,n,r){let a={amount:0,currencyCode:t};const i=e.current.fields.deliveryNext.value??r?.purchaseOrder?.deliveryNext;if("filled"===i?.status){const t=e.current.fields.remoteMerchandiseDetails?.value??r?.remoteMerchandiseDetails,o=ce(i.lines,t),s=[];
2o.forEach(e=>{if("available"===e.status){const t=e.selectedDeliveryMethodHandle;if(t){const n=e.methods.filter(e=>e.handle===t&&void 0!==e.costAfterDiscounts);s.push(...n.map(t=>({line:e,method:t})))}}});const l=n?ue(s,({method:e})=>e.cost.amount,({method:e,line:t})=>"ONE_TIME_PURCHASE"===t.type?he(e):void 0):new Set;a=s.reduce((e,{method:t},n)=>l.has(n)?e:{amount:e.amount+t.costAfterDiscounts.amount,currencyCode:t.costAfterDiscounts.currencyCode},a)}return a}(e,l,c,o),I=i?i.shippingAddress.value:e.current.fields.shippingAddress.value??o?.purchaseOrder?.shippingAddress,A={address1:I?.address1||null,address2:I?.address2||null,city:I?.city||null,country:I?.countryCode||null,countryCode:I?.countryCode||null,firstName:I?.firstName||null,lastName:I?.lastName||null,phone:I?.phone||null,province:I?.zoneCode||null,provinceCode:I?.zoneCode||null,zip:I?.postalCode||null},T=i?i.billingAddress.value:e.current.fields.billingAddress.value??o?.purchaseOrder?.billingAddress,L={address1:T?.address1||null,address2:T?.address2||null,city:T?.city||null,country:T?.countryCode||null,countryCode:T?.countryCode||null,firstName:T?.firstName||null,lastName:T?.lastName||null,phone:T?.phone||null,province:T?.zoneCode||null,provinceCode:T?.zoneCode||null,zip:T?.postalCode||null},N=function({orderId:e,customerId:t,isFirstOrder:n}){const r={id:de(t)??t??null,isFirstOrder:n??null};return{id:de(e)??e??null,customer:r}}({orderId:n,customerId:r,isFirstOrder:a}),R=e.current.fields.customAttributes.value,M=(R?.length?R:void 0)??o?.customAttributes??[],D=function(e,t,n){const r=e.current.fields.paymentLines.value?.lines,a=(r?.length?r:void 0)??n?.purchaseOrder?.paymentLines,i=[];return a?.forEach(e=>{if(!e.cost)return;let n=t||"",r="";switch(e.method.type){case"direct":case pe.CreditCard:r=e.method.brand||"";break;case"deferred":r=e.method.displayName||"";break;case"redeemable":n="",r=e.method.redemptionSource;break;case"giftCard":n="gift_card",r="";break;case pe.PayPal:case"bank":case"noop":case"paymentOnDelivery":case"other":case"shopWallet":r="";break;default:r=e.method.name}i.push({amount:{amount:e.cost.amount,currencyCode:e.cost.currencyCode},gateway:n,paymentMethod:{type:pc(e.method.type),name:r}})}),i}(e,o?.paymentDetails?.paymentGateway||void 0,o),O=function(e,t,n){const r=e.current.fields.buyerIdentity.value??n?.buyerIdentity;return{country:{isoCode:r?.countryCode??null},language:{isoCode:t},market:{id:r?.market?.id??null,handle:r?.market?.handle??null}}}(e,s,o);return{buyerAcceptsEmailMarketing:_,buyerAcceptsSmsMarketing:P,attributes:M,billingAddress:L,token:d,currencyCode:f,discountApplications:w,discountsAmount:C,email:p,phone:m,lineItems:y,localization:O,order:N,delivery:v,shippingAddress:A,subtotalPrice:h,shippingLine:{price:x},smsMarketingPhone:S,totalTax:E,totalPrice:g,transactions:D}}function Mc(e){return{...e,value:"<redacted>"}}function Dc(e,t){const n=e.current.fields.merchandiseLines.value,r=(n?.lines?.length?n:void 0)??t?.purchaseOrder?.merchandiseLines,a=e.current.fields.remoteMerchandiseDetails?.value??t?.remoteMerchandiseDetails;return r?.lines?.length?me(r.lines,a):[]}function Oc(e,t){const n=fc(t.variantId);void 0!==n&&e.set(t.stableId,n)}function zc(e,t){const n=new Map,r=new Map;return Dc(e,t).forEach(e=>{0!==e.lineComponents.length&&(n.set(e.stableId,e.lineComponents.map(e=>e.stableId)),e.lineComponents.forEach(t=>{r.set(t.stableId,e.stableId)}))}),{componentStableIdsByParent:n,parentStableIdByComponent:r}}const Bc={sectionComplete:!0,pageSubmit:!0,shippingMethodsFilled:!0,shippingMethodSelected:!0};function Vc(e){if(!(e.type in Bc))return!1;switch(e.type){case"sectionComplete":return"contact"===e.section||"deliveryAddress"===e.section;case"pageSubmit":return"shipping"===e.step;case"shippingMethodsFilled":case"shippingMethodSelected":return"onePage"===e.step}}function Fc(e,t){if(Vc(e))return Rc(t)}function Uc(){const{checkout:{negotiator:e}}=ie(),n=e.current.fields.buyerIdentity;return t(()=>{const e=n.value?.customerProfile;return Boolean("BusinessCustomerProfile"===e?.__typename&&e?.checkoutExperienceConfiguration?.editableShippingAddress)})}function qc(){const[e,t]=s(!1);return l(()=>{t("undefined"!=typeof window&&window.matchMedia("(prefers-reduced-motion: reduce)").matches)},[]),a(()=>
2{if("undefined"==typeof window)return;const e=window.matchMedia("(prefers-reduced-motion: reduce)"),n=()=>{t(e.matches)};return e.addListener(n),()=>{e.removeListener(n)}},[]),e}function jc(e){return t=>`${e}${t}`}function Hc(e,t){const n=c().replace(/:/g,"");return e??t(n)}const $c="PortalHost",Yc="data-portal-order";function Wc(e){e.setAttribute(Yc,String(performance.now()))}function Gc(e){let t=null,n=-1;for(let r=e?.firstElementChild??null;r;r=r.nextElementSibling){if("true"===r.firstElementChild?.getAttribute("data-popper-hidden"))continue;const e=Number(r.getAttribute(Yc));e>n&&(n=e,t=r)}return t}function Jc(e){const t=function(e){if(e.composedPath)return e.composedPath();const t=[];let n=e.target;for(;n!==document&&(t.push(n),n=n.parentNode,n););return t.push(document),t}(e),n=Gc(document.getElementById($c));return t.some(e=>e instanceof Node&&n?.contains(e))}function Kc(e){if(!e)return!1;const t=Gc(document.getElementById($c));return t?.contains(e)??!1}function Qc(e){if(!e)return!1;const t=document.getElementById($c);return t?.contains(e)??!1}const Xc=jc("Portal");function Zc(){return d("div",{id:$c})}function eu({children:e}){const[t,n]=s(null),r=Hc(void 0,Xc);return a(()=>{const e=document.getElementById($c)??document.body,t=document.createElement("div");return t.setAttribute("id",r),Wc(t),e.appendChild(t),n(t),()=>{e.removeChild(t)}},[r]),t&&u(e,t)}class tu extends Error{constructor(){super(...arguments),this.name="SpriteLoadError",this.groupingHash="checkout-web-ui:sprite-load-error"}}function nu(e,t){return new tu(`Failed to fetch sprite "${function(e){try{const t=new URL(e);return t.username="",t.password="",t.search="",t.hash="",t.toString()}catch{return e.split("#")[0].split("?")[0]}}(e)}": ${t}`)}function ru(e,t){return t instanceof tu?t:nu(e,t instanceof Error?t.message:String(t))}const au={errorClass:"SpriteLoadError",severity:"warning"};function iu(e,t){try{return ou.ensureFetched(e)}catch(n){throw ou.reportLoadFailure(e,n,t),n}}const ou=new class{#e=new Map;#t=new Set;ensureFetched(e){const t=this.#e.get(e);if("resolved"===t?.status)return t.content;if("rejected"===t?.status)throw t.error;if("pending"===t?.status)throw t.promise;throw this.#n(e)}reportLoadFailure(e,t,n){null==n||this.#t.has(e)||(this.#t.add(e),t instanceof Promise?t.catch(t=>{n.error(ru(e,t),au)}):n.error(ru(e,t),au))}#n(e){const t=fetch(e).then(t=>{if(!t.ok)throw nu(e,`HTTP ${t.status}`);return t.text()}).then(t=>(this.#e.set(e,{status:"resolved",content:t}),t)).catch(t=>{throw this.#e.set(e,{status:"rejected",error:ru(e,t)}),t});return this.#e.set(e,{status:"pending",promise:t}),t}},su=["cdn.shopify.com"],lu=f(null);function cu({children:e,logger:t}){const n=m([]),a=r(()=>{const e=new Set;return{logger:t,sprites:n,embed(t,r){e.has(t)||(e.add(t),n.value=[{url:t,content:r},...n.peek()])}}},[t,n]);return d(lu.Provider,{value:a,children:[e,d(uu,{sprites:n})]})}function uu({sprites:e}){return d("div",{className:"_1rnsrjf0 _1fragem6y","aria-hidden":"true",children:e.value.map(({url:e,content:t})=>d("div",{"data-sprite-url":e,dangerouslySetInnerHTML:{__html:t}},e))})}function du({iconUrl:e,allowRelativeUrl:t}){const n=m(!1);l(()=>{n.value=!0},[n]);const r=h(lu),{spriteUrl:a,symbolId:i}=function(e){const t=e.indexOf("#");return-1===t?{spriteUrl:e,symbolId:""}:{spriteUrl:e.slice(0,t),symbolId:e.slice(t+1)}}(e);if(!function(e,t){let n;try{n=new URL(e)}catch{return t}return!!t||"https:"===n.protocol&&su.includes(n.hostname)}(a,t))return console.warn(`[SpriteLoader] Blocked icon load from untrusted URL: ${a}`),null;if(!n.value)return d("span",{"aria-hidden":"true",children:d("svg",{viewBox:"0 0 14 14",focusable:"false","aria-hidden":"true"})});if(i)return d(pu,{spriteUrl:a,symbolId:i});const o=iu(a,r?.logger);return d("span",{dangerouslySetInnerHTML:{__html:o},"aria-hidden":"true"})}function pu({spriteUrl:e,symbolId:t}){const n=h(lu);if(!n)throw new ge("No sprite registry available");const r=iu(e,n.logger);return l(()=>{n.embed(e,r)},[n,e,r]),d("span",{"aria-hidden":"true",children:d("svg",{viewBox:"0 0 14 14",focusable:"false","aria-hidden":"true",children:d("use",{href:`#${t}`})})})}let mu=class extends g{constructor(){super(...arguments),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}render(){return this.state.hasError?this.props.fallback:this.props.children}};function hu({iconUrl:e,fallback:t,allowRelativeUrl:n=!1}){return d(mu,{fallback:t,children:d(p,{fallback:t,children:d(du,{iconUrl:e,allowRelativeUrl:n})})})}const gu=f(void 0);function fu(){return h(gu)}function yu({children:e,level:t}){const n=fu(),r=t??(n??0)+1;return d(gu.Provider,{value:r,children:e})}const vu=f({colorMix:!1,customProperties:!1,flexGap:!1});function _u({children:e}){const t=r(()=>"undefined"!=typeof CSS&&CSS.supports("color","color-mix(in srgb, red 50%, white)"),[]),n=r(()=>"undefined"==typeof window||"undefined"!=typeof CSS&&CSS.supports("color","var(--test)"),[]),a=r(()=>{if("undefined"==typeof window)return!0;
2if(!document.body)return!0;const e=document.createElement("div");e.style.display="flex",e.style.flexDirection="column",e.style.rowGap="1px",e.appendChild(document.createElement("div")),e.appendChild(document.createElement("div")),document.body.appendChild(e);const t=1===e.scrollHeight;return e.parentNode?.removeChild(e),t},[]),i=r(()=>({colorMix:t,customProperties:n,flexGap:a}),[t,n,a]);return d(vu.Provider,{value:i,children:e})}const bu=f(null);function ku({children:e}){const[t,a]=s(new Map),i=n(e=>t.get(e),[t]),o=n(e=>{a(t=>{const n=t.get(e.id);if(n&&!Object.keys(e).some(t=>n[t]!==e[t]))return t;const r=new Map(t);return r.set(e.id,{...n,...e}),r})},[]),l=n(e=>{a(t=>{const n=new Map(t);return n.delete(e),n})},[]),c=n(()=>{a(new Map)},[]),u=r(()=>({getInteraction:i,upsertInteraction:o,deleteInteraction:l,clearInteractions:c}),[c,l,i,o]);return d(bu.Provider,{value:u,children:e})}const Pu="forwarding-external-new-window-message";function Su({external:e,native:t}){if(e&&t)return Pu}const wu=f(null),Cu=f(void 0),Eu=jc("Overlay");function xu({activatorRef:e,children:t}){const n=i(new Map),a=Hc(void 0,Eu),[o,l]=s(()=>a),[c,u]=s(!1),[p,m]=s({}),h=r(()=>({activatorRef:e,overlayId:o,setOverlayId:l,attach(e,t){n.current?.set(e,t)},trigger(e,t){n.current?.get(e)?.(t)},active:c,setActive:u,activatorAttributes:p,setActivatorAttributes(e){Object.keys(e).every(t=>p[t]===e[t])||m(t=>({...t,...e}))}}),[e,o,n,c,p]);return d(Cu.Provider,{value:h,children:t})}function Iu({children:e}){return d(Cu.Provider,{value:void 0,children:d(wu.Provider,{value:null,children:e})})}function Au(){const e=h(Cu);if(e)return e}const Tu=f(void 0),Lu=()=>h(Tu),Nu=()=>{const e=Lu();return r(()=>({closeOverlay(t){e?.close(t)}}),[e])};function Ru({children:e}){const t=i(new Map),n=r(()=>({register(e,n){t.current.set(e,n)},unregister(e){t.current.delete(e)},close(e){t.current.get(e)?.close()}}),[t]);return d(Tu.Provider,{value:n,children:e})}const Mu=f(void 0);function Du({children:e}){const n=i({sheet:!1,modal:!1}),a=m(0),o=t(()=>a.value>0),s=r(()=>({isLocked:e=>n.current[e],lock(e){n.current[e]=!0},unlock(e){n.current[e]=!1},openModalCount:a,isModalOpen:o}),[a,o]);return d(Mu.Provider,{value:s,children:e})}function Ou(e){const t=h(Mu),[n,i]=s(!1);return a(()=>()=>{t&&n&&t.unlock(e)},[t,n,e]),r(()=>{if(!t)return;const{lock:r,unlock:a,isLocked:o}=t;return{setActive(t){i(i=>("function"==typeof t?t(i):t)?o(e)&&!n?(console.warn(`Multiple <${"modal"===e?"Modal":"Sheet"} /> components cannot be rendered at the same time`),i):o(e)?i:(r(e),!0):(n&&a(e),!1))},active:n}},[t,n,e])}function zu(e){const t=Au(),n=Ou(e);return r(()=>{if(!n)return;const{active:e,setActive:r}=n;return t?{...t,setActive:r,active:e}:void 0},[t,n])}const Bu=f(void 0);function Vu({announcementEmitter:e,children:t}){return d(Bu.Provider,{value:e,children:t})}function Fu(){const e=h(Bu);if(!e)throw new ge("Missing AnnouncementContext Context ");return e}var Uu="_14u2r6s0 _1fragem121";const qu=new class{#r=new Set;#a=new Set;#i=new Map;subscribe(e){return this.#r.add(e),()=>{this.#r.delete(e),0===this.#r.size&&this.#o()}}#s(){this.#r.forEach(e=>e(Array.from(this.#a)))}#o(){this.#a.clear(),this.#i.forEach(e=>{clearTimeout(e)})}announce(e){const t=Array.from(this.#a).find(t=>t.content===e.content&&t.role===e.role);if(t){const e=this.#i.get(t);e&&clearTimeout(e),this.#i.delete(t),this.#a.delete(t)}this.#a.add(e),this.#s();const n=setTimeout(()=>{this.#i.delete(e),this.#a.delete(e),this.#s()},1e4);return this.#i.set(e,n),()=>{this.#a.delete(e),clearTimeout(n),this.#i.delete(e),this.#s()}}};function ju({content:e,role:t="status"}){return qu.announce({content:e,role:t})}function Hu(){const[e,t]=s([]),n=e.filter(e=>"status"===e.role),r=e.filter(e=>"alert"===e.role);return a(()=>qu.subscribe(e=>{t(e)}),[]),d(y,{children:[d("div",{role:"status",className:Uu,children:n.map(({content:e,role:t})=>d("span",{children:e},`${e}-${t}`))}),d("div",{role:"alert",className:Uu,children:r.map(({content:e,role:t})=>d("span",{children:e},`${e}-${t}`))})]})}var $u="rij0560 _1fragem121";const Yu=f(null);function Wu(){const e=h(Yu);if(null==e)throw new fe("No app context available");return e}function Gu(){return Wu().currency}function Ju(){return Wu().translate}function Ku(){return Wu().formatNumber}function Qu(){return Wu().geolocation}function Xu(){return Wu().locale}function Zu({children:e,currency:t,embed:n,linkComponent:a,geolocation:i,locale:o,onePage:s,editor:l,redesignedChoiceLists:c,translate:u,formatNumber:p,announcementEmitter:m,inlineIcons:h,logger:g}){const f=r(()=>({currency:t,embed:n,formatNumber:p,geolocation:i,linkComponent:a,locale:o,onePage:s,editor:l,redesignedChoiceLists:c,translate:u,inlineIcons:h,logger:g}),[t,n,u,p,a,i,o,s,l,c,h,g]);return d(Yu.Provider,{value:f,children:d(Vu,{announcementEmitter:m,children:d(_u,{children:d(yu,{children:d(Du,{children:d(Ru,{children:d(ku,{children:[d(cu,{logger:g,children:e}),d(ed,{}),d(Hu,{})]})})})})})})})}function ed(){const e=Ju();
2return d(y,{children:[d("div",{id:Pu,"aria-hidden":!0,className:$u,children:e("externalNewWindow")}),d("div",{id:"forwarding-new-window-message","aria-hidden":!0,className:$u,children:e("newWindow")}),d("div",{id:"forwarding-external-message","aria-hidden":!0,className:$u,children:e("external")})]})}function td(e){return/\[.*?\]/.test(e)&&console.warn(`Grid template named lines are not supported. Found named lines in template: "${e}". Please use only size values without bracketed names.`),e}function nd(e){return/^span\s+\d+$/.test(e)?e:"auto"}function rd(e){return console.warn(`Invalid transform value '${String(e)}'. Expected 'none', 'translate(<size>)' or 'translate(<size>, <size>)' with px or % magnitudes.`),""}function ad(e){return id(e)}function id(e){if("0"===e)return 0;const t=_e(e);return void 0===t||"px"!==t.unit&&"%"!==t.unit?void 0:"%"===t.unit?`${t.number}%`:t.number}function od(e){if("auto"===e||"string"!=typeof e)return"auto";const t=id(e);return void 0===t?(console.warn(`Invalid inset coordinate '${e}'. Expected a px or % size, or 'auto'. Falling back to 'auto'.`),"auto"):ve(t)??"auto"}function sd(e){return cd(e,{auto:!0,fitContent:!0})}function ld(e){return cd(e,{none:!0})}function cd(e,t){if(t?.fitContent&&"fit-content"===e)return"fitContent";if(t&&e in t&&t[e])return e;if("0"===e)return"0";const n=_e(e),r=!n||"px"!==n.unit&&"%"!==n.unit&&"ch"!==n.unit&&"em"!==n.unit&&"lh"!==n.unit&&"vh"!==n.unit?void 0:ve(e);if(void 0===r){const n=[t?.auto?"'auto'":void 0,t?.none?"'none'":void 0,t?.fitContent?"'fit-content'":void 0].filter(Boolean);console.warn(`Invalid size value '${String(e)}'. Expected a px, %, ch, em, lh or vh size${n.length>0?`, or ${n.join(", ")}`:""}.`)}return r}function ud(e){return`url(${JSON.stringify(e)})`}const dd={auto:"flex",inline:"inlineFlex",block:"flex",none:"none"},pd={auto:"block",inline:"inline",block:"block",none:"none"},md={auto:"inline",inline:"inline",block:"block",none:"none"},hd={auto:"grid",inline:"inlineGrid",block:"grid",none:"none"},gd=e=>pd[e],fd=e=>md[e],yd=e=>dd[e],vd=e=>hd[e],_d=f(void 0),bd=()=>h(_d),kd=f(!1);function Pd(){return h(kd)}const Sd=f(!1);function wd(){return h(Sd)}const Cd=new Map([["none",0],["faster",88.9],["fast",133.333],["base",200],["slow",300],["slower",450],["slowest",675]]);function Ed(e,t="slow",n=!1){const[r,o]=s(!n&&e),[l,c]=s(!1),u=i(!n&&e),d=i(()=>{o(u.current),c(!1)}),p=qc();let m="string"==typeof t?t:t.enter,h="string"==typeof t?t:t.exit;return p&&(m="none",h="none"),a(()=>{let t;e!==u.current&&(t=setTimeout(()=>{c(!0)},0)),u.current=e;const n=setTimeout(d.current,e?Cd.get(m??"none"):Cd.get(h??"none"));return()=>{clearTimeout(n),clearTimeout(t)}},[m,h,e]),l?e?"entering":"exiting":e===r?e?"entered":"exited":e?"enter":"exit"}var xd={Transition:"_94sxtb1 _94sxtb0 _1fragemup _1fragemv4 _1fragemws _1fragem12q",transitionDurationVariant:{none:"_94sxtb9 _94sxtb2 _1fragem12i",faster:"_94sxtba _94sxtb3 _1fragem12c",fast:"_94sxtbb _94sxtb4 _1fragem12d",base:"_94sxtbc _94sxtb5 _1fragem12e",slow:"_94sxtbd _94sxtb6 _1fragem12f",slower:"_94sxtbe _94sxtb7 _1fragem12g",slowest:"_94sxtbf _94sxtb8 _1fragem12h"},transitionOpacity:{enter:"_94sxtbm _94sxtbg _1fragem11k",entering:"_94sxtbn _94sxtbh _1fragem11u",entered:"_94sxtbo _94sxtbi _1fragem11u",exit:"_94sxtbp _94
2sxtbj _1fragem11u",exiting:"_94sxtbq _94sxtbk _1fragem11k",exited:"_94sxtbr _94sxtbl _1fragem11k"}};function Id({id:e,open:t,renderChildrenWhenCollapsed:n=!1,children:r,duration:o="slow",properties:s=["height"],onTransition:l}){const c=Ed(t,o),u=i(null);a(()=>{l?.(c)},[c,l]);const p=new Map([["enter",()=>({height:0})],["entering",()=>({height:u?.current?.clientHeight})],["entered",()=>({height:"auto",overflow:"visible"})],["exit",()=>({height:u?.current?.clientHeight})],["exiting",()=>({height:0})],["exited",()=>({height:0})]]),m="exited"===c;return d("div",{id:e,style:{...s.includes("height")&&p.get(c)()},className:v(xd.Transition,xd.transitionDurationVariant[o],s.includes("opacity")&&xd.transitionOpacity[c]),hidden:m,children:d("div",{ref:u,children:m&&!n?null:r})})}const Ad=f(void 0);function Td({children:e,openByDefault:t,openMap:n,onToggle:a,duration:i="slow",transition:o="revealBlock"}){const s=m({}),l=m(new Set),c=r(()=>({openMap:n,onToggle:a,duration:i,transition:o,openByDefault:t,activatorIdMap:s,togglableLayoutIds:l}),[n,a,i,o,t,s,l]);return d(Ad.Provider,{value:c,children:e})}function Ld({layoutId:e,activatorId:t}){const n=h(Ad);if(a(()=>{if(n&&e&&t){const{activatorIdMap:r}=n;r.value[e]||(r.value={...r.value,[e]:t})}},[n,e,t]),n&&e){const{openMap:t,onToggle:r,duration:a,transition:i,openByDefault:o,activatorIdMap:s,togglableLayoutIds:l}=n,c=`${e}-transition`,u=l.value.has(e),d=(t[e]??o)||!u;return{activatorAttributes:{"aria-controls":"revealBlock"===i?c:e,"aria-expanded":d},layoutAttributes:{"aria-labelledby":s.value[e],role:"region"},toggle:()=>{r?.({...o&&Dd(Array.from(l.value)),...t,[e]:!(t[e]??o)})},setToggleable:()=>{if(!l.value.has(e)){const t=new Set(l.value);t.add(e),l.value=t}},open:d,duration:a,transition:i,transitionId:c,isToggleable:u}}}Ad.displayName="DisclosureContext";const Nd=jc("DisclosureActivator");function Rd(e,t){const n=e.displayName||e.name||"Component",r=_(({id:r,toggles:a,...i},o)=>{const s=Hc(r,Nd),l=Ld({layoutId:a,activatorId:s});if(l){const{setToggleable:n,activatorAttributes:r,open:a,toggle:c}=l;n();const{toggleEvent:u="onPress",setAriaExpanded:p=!0}=t||{},{onPress:m,onChange:h}=i,{"aria-expanded":g,...f}=r,y={..."onPress"===u?{onPress:()=>{c(),m?.()}}:{onChange:e=>{c(),h?.(e)}},...p?r:f};return d(e,{id:s,..."onChange"===u&&{value:a},...i,...y,ref:o})}return a&&console.warn(`${n} sets "toggles" property but is not wrapped inside a Disclosure component. Please ensure that the component is wrapped in a Disclosure component.`),d(e,{id:r,...i,ref:o})});return r.displayName=`DisclosureActivator(${n})`,r}function Md(e){const t=_((t,n)=>{const{id:r}=t,a=Ld({layoutId:r});if(a){const{open:r,duration:i,transition:o,isToggleable:s,transitionId:l,layoutAttributes:c}=a,u=d(e,{...t,...c,ref:n});return"revealBlock"===o&&s?d(Id,{open:r,id:l,duration:i,children:u}):r?u:null}return d(e,{...t,ref:n})});return t.displayName=`DisclosureLayout(${e.displayName||e.name||"Component"})`,t}function Dd(e=[]){return"boolean"==typeof e?{}:(Array.isArray(e)?e:[e]).reduce((e,t)=>({...e,[t]:!0}),{})}function Od(e){return"command"===e?.type&&"clipboard"===e.kind}function zd(e){return"command"===e?.type&&"visibility"===e.kind}function Bd(e){return"command"===e?.type&&"overlay"===e.kind}function Vd(e){return"interest"===e?.type}function Fd(){const e=h(bu);if(null===e)throw new fe("No Interactions in context");return e}function Ud(){const{getInteraction:e}=Fd();return{showOverlay:n(t=>{const n=e(t);Bd(n)?n.open():console.warn(`No overlay found for ID "${t}".`)},[e]),hideOverlay:n(t=>{const n=e(t);Bd(n)?n.close():console.warn(`No overlay found for ID "${t}".`)},[e])}}let qd="",jd=[],Hd=0,$d=0,Yd=[],Wd=!1;class Gd extends Error{}function Jd(){return Hd>=qd.length}function Kd(){return qd[Hd++]}function Qd(e){const t=qd.substring($d,Hd).trim();jd.push({type:e,text:t})}function Xd(){return Jd()?ip:qd[Hd]}function Zd(){const e=Kd();switch(e){case op:break;case ep:Qd("LEFT_PAREN");break;case tp:Qd("RIGHT_PAREN");break;case"@":{for(;!up.has(Xd());)Kd();const e=qd.substring($d,Hd);"@media"===e||"@container"===e?Qd("MEDIA_TYPE"):Yd.push(`Invalid media type "${e}" starting at position ${$d}.`);break}case np:Qd("COMMA");break;case ap:case rp:t="=",Jd()||qd[Hd]!==t||Hd++,Qd("COMPARATOR");break;case sp:case lp:for($d++;Xd()!==e;)Kd();Qd("IDENTIFIER"),Kd();break;default:if(function(e){const t=e.charCodeAt(0);return t>=48&&t<=57||t>=97&&t<=122||t>=65&&t<=90}(e)){for(;!up.has(Xd());)Kd();const e=qd.substring($d,Hd),t=e.toLowerCase();if("and"===t||"or"===t)e!==t?Yd.push(`Keyword "${e}" is not case sensitive at position ${$d}.`):Qd("OPERATOR");else if("inline-size"===t||"block-size"===t)e!==t?Yd.push(`Property "${e}" is not case sensitive at position ${$d}.`):Qd("PROPERTY");else{if(Xd()===op)for(Kd();!cp.has(Xd());)Kd();Qd("IDENTIFIER")}}else Yd.push(`Unexpected character "${e}" at position ${Hd}.`)}var t}const ep="(",tp=")",np=",",rp="<",ap=">",ip="\0",op=" ",sp="'",lp='"',cp=new Set([ip,ep,tp,np,rp,ap]),up=new Set([...cp,op]);let dp=[],pp=0;function mp(e){for(const t of e)if(hp(t))return gp(),!0;return!1}function hp(e){return!yp()&&(Array.isArray(e)?e.includes(vp().type):vp().type===e)}function gp(){return yp()||pp++,_p()}function fp(e,t){if(hp(e))return gp();throw new Gd(`${t}\nInstead we found this word/character: "${vp().text}"`)}function yp(){return"EOF"===dp[pp].type}function vp(){return dp[pp]}function _p(){return dp[pp-1]}const bp="s-default";function kp(){return{condition:Pp(),value:fp("IDENTIFIER","Expected an identifier").text}}function Pp(){fp("LEFT_PAREN",'Expected a condition to start with a left parenthesis "("');const e=Sp();let t=null;hp("COMPARATOR")&&(t=Sp(e.operator)),fp("RIGHT_PAREN",'Expected a condition to end with a right parenthesis ")"');let n=e;if(t&&(n={type:"compound-condition",left:e,right:t,operator:"and"}),"OPERATOR"===vp().type){const e=fp("OPERATOR","Expected an operator");return{type:"compound-condition",left:n,right:Pp(),operator:e.text}}return n}function Sp(e){const t=e?_p():fp(["IDENTIFIER","PROPERTY"],"Expected an identifier or property"),n=fp("COMPARATOR",'Expected a comparison operator (like "<" or ">")');if(e&&e[0]===n.text[0])throw new Gd("Cannot have two different c
2omparison operators (a less-than and a greater-than) in the same condition.");const r=fp("IDENTIFIER"===t.type?"PROPERTY":"IDENTIFIER",`Expected a ${"IDENTIFIER"===t.type?'property (like "inline-size")':'identifier (like "500px")'} to compare against.`);let a=n.text;return"IDENTIFIER"===t.type&&(a="<"===a?">":"<="===a?">=":">"===a?"<":"<="),{type:"condition",property:"PROPERTY"===t.type?t.text:r.text,operator:a,value:"PROPERTY"===t.type?r.text:t.text}}function wp(e){try{return t=function(e){if(Wd)throw Error("Cannot tokenize recursively");for(Wd=!0,qd=e,jd=[],Hd=0,$d=0,Yd=[];!Jd();)$d=Hd,Zd();if($d=Hd,Qd("EOF"),Wd=!1,Yd.length)throw new Gd(Yd.join("\n"));return jd}(e),dp=t,pp=0,function(){const e={responsiveType:fp("MEDIA_TYPE",'Expected a media type such as "@media" or "@container"').text,conditionalValues:[],fallbackValue:"",state:"valid"};if("@container"===e.responsiveType){const t="IDENTIFIER"===vp().type?gp().text:bp;e.name=t}for(e.conditionalValues.push(kp());mp(["COMMA"])&&"LEFT_PAREN"===vp().type;)e.conditionalValues.push(kp());if("COMMA"!==_p().type)throw new Gd(`Expected a comma before the fallback value of "${vp().text}"`);if(e.fallbackValue=fp("IDENTIFIER","Expected a final fallback value to be defined").text,"EOF"!==vp().type)throw new Gd(`Expected the query to end, instead found "${vp().text}"`);return e}()}catch(n){if(n instanceof Gd)return{state:"invalid",error:n.message};throw new Error("Unknown error",{cause:n})}var t}function Cp(e){return"string"==typeof e&&e.startsWith("@container")}function Ep(e){return"string"==typeof e&&e.startsWith("@media")}function xp(e){if(Xl(e))return e.base;if(!Cp(e)&&!Ep(e))return e;const t=wp(e);return"invalid"===t.state?void 0:t.fallbackValue}function Ip(e,t){if(e===t)return!0;if(Xl(e))return Object.values(e).some(e=>Ip(e,t));if(!Cp(e)&&!Ep(e))return!1;const n=wp(e);return"invalid"!==n.state&&(n.fallbackValue===t||n.conditionalValues.some(e=>e.value===t))}function Ap(e,t){return Xl(e)?Object.fromEntries(Object.entries(e).map(([e,n])=>[e,t(n)])):t(e)}function Tp(e){const t=e,i=_(function(e,i){const{upsertInteraction:o,deleteInteraction:l}=Fd(),{display:c}=e,u="none"===c,p=r(()=>Ip(c,"none"),[c]),[m,h]=s(),[g,f]=s(p);p!==g&&(f(p),"shown"===m&&h(void 0));const y=void 0===m?!u:"shown"===m,v="hidden"===m,_="shown"===m&&p,b=n(()=>h("hidden"),[]),k=n(()=>h(e=>"hidden"===e||p?"shown":void 0),[p]),P=n(()=>h(e=>(void 0===e?u:"shown"!==e)?"shown":"hidden"),[u]),{id:S}=e;if(a(()=>(S&&o({id:S,type:"command",kind:"visibility",defaultCommand:"--toggle",hide:b,show:k,toggle:P,visible:y}),()=>{S&&l(S)}),[S,y,b,k,P,o,l]),S&&v)return null;const w=S&&_?{...e,display:"auto"}:e;return d(t,{...w,ref:i})});return i.displayName=`VisibilityCommandTargetComponent(${e.displayName||e.name||"Component"})`,i}function Lp(e,{overlayType:t}){const r=_(function(r,i){const{open:o}=r,{upsertInteraction:l,deleteInteraction:c}=Fd(),{active:u,setActive:p}=function(e){const t=function(e){return"modal"===e||"sheet"===e?()=>{const t=Ou(e),n=s(!1);if(t)return t;const[r,a]=n;return{active:r,setActive:a}}:()=>{const[e,t]=s(!1);return{active:e,setActive:t}}}(e);return t()}(t),m=Au(),{id:h,onClose:g,onHide:f}=r,y=n(()=>{p(!1),"function"==typeof g&&g(),"function"==typeof f&&f()},[p,g,f]),v=n(()=>{p(!0)},[p]);if(a(()=>()=>{h&&c(h)},[h]),a(()=>{h&&l({id:h,type:"command",kind:"overlay",overlayType:t,defaultCommand:"--toggle",close:y,open:v,toggle:()=>{u?y():v()},active:u})},[u,y,c,h,v,l]),h&&!m&&void 0===o){const t={setActive:p,open:u,onClose:y,onHide:y};return d(e,{...r,...t,ref:i})}return d(e,{...r,ref:i})});return r.displayName=`OverlayCommandTargetComponent(${e.displayName||e.name||"Component"})`,r}function Np(e){return n(t=>{"function"==typeof e?e(t):null!=e&&(e.current=t)},[e])}function Rp(e,t){const r=Np(e),a=Np(t);return n(e=>{r(e),a(e)},[r,a])}const Mp=["aria-controls","aria-describedby","aria-expanded","aria-haspopup"];function Dp(e,t){return Mp.reduce((n,r)=>({...n,[r]:e?.activatorAttributes[r]??t?.[r]}),{})}const Op=["onBlur","onClick","onFocus","onKeyDown","onMouseDown","onMouseEnter","onMouseLeave","onMouseUp","onTouchStart"];function zp(e,t){return Op.map(n=>{return{[n]:(r=t?.[n],a=Bp(n,e),function(e){const t="function"==typeof r?r(e):void 0;return a?.(e),t})};var r,a}).reduce((e,t)=>
2({...e,...t}),{})}function Bp(e,t){return function(n){t?.trigger(e,n)}}function Vp(e){const t=_(({overlay:t,...n},r)=>{const a=i(null),o=Rp(r,a);return t?d(xu,{activatorRef:a,children:[d(e,{...n,ref:o}),t]}):d(e,{...n,ref:r})});return t.displayName=`OverlayActivator(${e.displayName||e.name||"Component"})`,t}function Fp(e,{focusActivatorWhenClosing:t=!1}={}){const n=_((n,r)=>{const{id:i,onClose:o,onHide:s}=n,l=Au(),c=Lu();return a(()=>(i&&c?.register(i,{close(){o?.(),s?.(),l?.setActive(!1),t&&l?.activatorRef.current?.focus({preventScroll:!0})}}),()=>{i&&c?.unregister(i)}),[i,o,s,c,l]),d(e,{...n,ref:r,id:i??l?.overlayId})});return n.displayName=`Overlay(${e.displayName||e.name||"Component"})`,n}function Up(e){if(e)return`${e}Title`}const qp=(e,t)=>{let n=0,r=null;return function(...a){const i=Date.now();r&&(clearTimeout(r),r=null),i-n>=t&&(e.apply(this,a),n=i),r=setTimeout(()=>{e.apply(this,a),n=Date.now(),r=null},t)}},jp=f(null);function Hp(){const e=h(jp);if(null===e)throw new fe("No Popper in context");return e}const $p=f({}),Yp=()=>h($p);function Wp(e,t){if("center"===t)return e;const n=e.startsWith("block");return`${e}Span${n?"Inline":"Block"}${"start"===t?"End":"Start"}`}function Gp(e){return Math.abs(e.left)+Math.abs(e.right)+Math.abs(e.top)+Math.abs(e.bottom)}function Jp(e,t,n){if("ltr"===n)return{position:e,alignment:t};switch(e){case"inlineStart":return{position:"inlineEnd",alignment:t};case"inlineEnd":return{position:"inlineStart",alignment:t};default:return"center"===t?{position:e,alignment:t}:{position:e,alignment:"start"===t?"end":"start"}}}function Kp(e,t,n,r,a,i,o){const s={x:0,y:0},l="rtl"===o?r.right-n.width:r.left,c=i?l:r.left+r.width/2-n.width/2,u=r.top+r.height/2-n.height/2;switch(e){case"inlineStart":s.x=r.left-n.width-a,"center"===t?s.y=u:"start"===t?s.y=r.top:"end"===t&&(s.y=r.bottom-n.height);break;case"inlineEnd":s.x=r.right+a,"center"===t?s.y=u:"start"===t?s.y=r.top:"end"===t&&(s.y=r.bottom-n.height);break;case"blockStart":s.y=r.top-n.height-a,"center"===t?s.x=c:"start"===t?s.x=r.left:"end"===t&&(s.x=r.right-n.width);break;case"blockEnd":s.y=r.bottom+a,"center"===t?s.x=c:"start"===t?s.x=r.left:"end"===t&&(s.x=r.right-n.width)}return s}function Qp(e,t){const n=document.documentElement.clientWidth,r=document.documentElement.clientHeight,a=e.x+t.width,i=e.y+t.height;let o={left:0,right:0,top:0,bottom:0};return a>n&&(o={...o,right:n-a}),e.x<0&&(o={...o,left:-e.x}),i>r&&(o={...o,bottom:i-r}),e.y<0&&(o={...o,top:-e.y}),o}const Xp=/^(block|inline)-(start|end)( span-(inline|block)-(start|end))?$/;function Zp(e){return Xp.test(e)}function em(e){const t=e.match(Xp);if(!t)return null;const[,n,r,,a,i]=t;return{axis:n,edge:r,...a&&i?{spanAxis:a,spanEdge:i}:{}}}function tm(e){const t=`${e.axis}-${e.edge}`;return e.spanAxis&&e.spanEdge?`${t} span-${e.spanAxis}-${e.spanEdge}`:t}var nm={Popper:"xoxyfm1 xoxyfm0 _1fragem132",colorSchemeVariant:{scheme1:"xoxyfma xoxyfm2 _1fragemxx",scheme2:"xoxyfmb xoxyfm3 _1fragemxy",scheme3:"xoxyfmc xoxyfm4 _1fragemxz",scheme4:"xoxyfmd xoxyfm5 _1fragemy0",scheme5:"xoxyfme xoxyfm6 _1fragemy1",scheme6:"xoxyfmf xoxyfm7 _1fragemy2",scheme7:"xoxyfmg xoxyfm8 _1fragemy3",scheme8:"xoxyfmh xoxyfm9 _1fragemy4"},positionVariant:{absolute:"xoxyfmk xoxyfmi _1fragemwi",fixed:"xoxyfml xoxyfmj _1fragemwn"},hidden:"xoxyfmm"};function rm(e){if(Zp(e)){const[t,n]=e.split(" ");return e.includes(" ")?{position:Pe(t),alignment:n.includes("start")?"end":"start"}:{position:Pe(t),alignment:"center"}}return{position:"blockStart",alignment:"center"}}function am(e){return e.split(",").map(e=>e.trim()).filter(e=>!!Zp(e))}function im({activator:e,children:t,hidden:a,id:o,offset:c,minInlineSize:u,positionArea:p="block-start",positionTryFallbacks:h,preventOverflow:g,sameInlineSize:f}){const{rect:y,direction:_}=function(e){const[t,r]=s(null),a=m("ltr"),o=i([]),c=i(null),u=n(()=>{null!==e&&(a.value="rtl"===window.getComputedStyle(e).direction?"rtl":"ltr",r(e.getBoundingClientRect()))},[e,a]);return l(()=>{u();const t=qp(u,16);c.current=t,window.addEventListener("resize",u),window.addEventListener("scroll",t);for(const e of o.current)e.removeEventListener("scroll",t);const n=e?function(e){const t=[];let n=e.parentElement;for(;n;){const{overflow:e,overflowX:r,overflowY:a}=getComputedStyle(n);(/(auto|scroll|overlay)/.test(e)||/(auto|scroll|overlay)/.test(r)||/(auto|scroll|overlay)/.test(a))&&t.pu
2sh(n),n=n.parentElement}return t}(e):[];o.current=n;for(const e of n)e.addEventListener("scroll",t);return()=>{window.removeEventListener("resize",u),window.removeEventListener("scroll",t);for(const e of n)e.removeEventListener("scroll",t);o.current=[],c.current=null}},[e,u]),{rect:t,direction:a.value}}(e),[b,k]=function(){const[e,t]=s(null),r=i(null),a=n(e=>{if(r.current?.disconnect(),r.current=null,null!==e&&(t(e.getBoundingClientRect()),"undefined"!=typeof ResizeObserver)){const n=new ResizeObserver(()=>{t(e.getBoundingClientRect())});n.observe(e),r.current=n}},[]);return l(()=>()=>{r.current?.disconnect()},[]),[e,a]}(),P=i(null),S=n(e=>{k(e),P.current=e},[k]),[w,C]=s(""),{current:E,parent:x}=Yp(),I=m("absolute"),{position:A,alignment:T}=rm(p),L=r(()=>{if("none"!==h)return h??function(e){const t=function(e){const t=em(e);return t?tm({...t,edge:"start"===t.edge?"end":"start"}):e}(e),n=function(e){const t=em(e);if(!t)return[];const n="block"===t.axis?"inline":"block",r=t.spanAxis&&t.spanEdge?{spanAxis:"inline"===t.spanAxis?"block":"inline",spanEdge:t.spanEdge}:{};return[tm({axis:n,edge:"start",...r}),tm({axis:n,edge:"end",...r})]}(e);return[t,...n].join(", ")}(p)},[h,p]),{clipping:N,offsets:R,spacing:M,resolvedPosition:D,resolvedAlignment:O}=r(()=>function(e,t,n,r,{offset:a=0,preventOverflow:i=!1,sameInlineSize:o=!1,direction:s="ltr",fallbackPositions:l}={}){const{position:c,alignment:u}=Jp(e,t,s),d=l?.map(({position:e,alignment:t})=>Jp(e,t,s)),p={x:0,y:0};let m={left:0,right:0,top:0,bottom:0},h=0,g=c,f=u;if(!n||!r)return{offsets:p,clipping:m,spacing:h,resolvedPosition:g,resolvedAlignment:f};const y=Kp(c,u,n,r,a,o,s);if(p.x=y.x,p.y=y.y,i){if(m=Qp(p,n),function(e,t){const n=0!==t.top||0!==t.bottom,r=0!==t.left||0!==t.right;return"blockStart"===e||"blockEnd"===e?n:n||r}(c,m)&&d?.length){const e=Gp(m);for(const t of d){const e=Kp(t.position,t.alignment,n,r,a,o,s),i=Qp(e,n);if(0===Gp(i)){p.x=e.x,p.y=e.y,m=i,g=t.position,f=t.alignment;break}}if(Gp(m)>0){let t=e;for(const e of d){const i=Kp(e.position,e.alignment,n,r,a,o,s),l=Qp(i,n),c=Gp(l);c<t&&(t=c,p.x=i.x,p.y=i.y,m=l,g=e.position,f=e.alignment)}}}m.right&&!m.left&&(p.x+=m.right,h=-10),!m.right&&m.left&&(p.x=0,h=10)}return{offsets:p,clipping:m,spacing:h,resolvedPosition:g,resolvedAlignment:f}}(A,T,b,y,{direction:_,offset:c,preventOverflow:g,sameInlineSize:f,fallbackPositions:L?am(L).map(rm):void 0}),[_,c,A,T,b,g,y,f,L]),z=r(()=>({clipping:N,offsets:R,position:D,alignment:O,popperRect:b,referenceRect:y,spacing:M}),[N,R,D,O,b,y,M]);return l(()=>{const t=e&&function(e){let t=e.parentElement;for(;t&&t!==document.body;){const{position:e}=getComputedStyle(t);if("fixed"===e||"sticky"===e)return!0;t=t.parentElement}return!1}(e)?"fixed":"absolute";I.value=t;const n="absolute"===t?window.scrollX||window.pageXOffset:0,r="absolute"===t&&(window.scrollY||window.pageYOffset||-parseInt(document.body.style.top,10))||0,{x:a,y:i}=function({x:e,y:t}){const n=window.devicePixelRatio||1;return{x:Math.round(e*n)/n||0,y:Math.round(t*n)/n||0}}({x:R.x+M+n,y:R.y+r});C((window.devicePixelRatio||1)<2?`translate(${a}px, ${i}px)`:`translate3d(${a}px, ${i}px, 0)`)},[R.x,R.y,M,e]),l(()=>{if(a)return;const e=P.current?.parentElement;e&&Wc(e)},[a]),d(jp.Provider,{value:z,children:d(eu,{children:d("div",{className:v(nm.Popper,nm.positionVariant[I.value],(x??E)&&nm.colorSchemeVariant[x??E],a&&nm.hidden),style:{...y&&{transform:w,...f&&{width:y.width},...u&&{minWidth:ke(u)}}},ref:S,id:o,"aria-hidden":a||void 0,"data-popper-hidden":a||void 0,children:x&&E?d("div",{className:nm.colorSchemeVariant[E],children:t}):t})})})}var om={Arrow:"by0ptke by0ptkd _1fragemwi _1fragemzd _1fragem11z",arrowNudge:"var(--by0ptk6)",arrowPositionVariant:{blockStart:"by0ptkf",blockEnd:"by0ptkg",inlineStart:"by0ptkh",inlineEnd:"by0ptki"},Tooltip:"by0ptk8 by0ptk7 _1fragempp _1fragemri _1fragemnw _1fragemtb _1fragem6e _1fragem11k _1fragemws _1fragemyt _1fragem124 _1fragemy5",tooltipPositionVariant:{blockStart:"by0ptk9",blockEnd:"by0ptka",inlineStart:"by0ptkb",inlineEnd:"by0ptkc"},tooltipTransitionVariant:{entered:"by0ptk0",exit:"by0ptk1",exiting:"by0ptk2",enter:"by0ptk3",entering:"by0ptk4",exited:"by0ptk5"}};function sm(e){const{children:t,id:r}=e,o=i(!1),s=Au(),{active:l=!1,setActive:c}=s??{},u=n(e=>
2{["Escape","Esc"].includes(e.key)&&l&&(e.preventDefault(),c?.(!1))},[l,c]);return a(()=>{if(s&&l)return document.addEventListener("keydown",u),()=>{document.removeEventListener("keydown",u)}},[s,l,u]),s?(s?.attach("onMouseEnter",()=>{o.current||c?.(!0)}),s?.attach("onMouseLeave",()=>{c?.(!1)}),s?.attach("onTouchStart",()=>{o.current=!0}),s?.attach("onClick",()=>{c?.(!l)}),d(y,{children:[l&&d("div",{role:"tooltip",className:Se({screenReaders:"only"}),children:t}),d(lm,{id:r,open:l,onMouseEnter:()=>{o.current||c?.(!0)},onMouseLeave:()=>{c?.(!1)},children:t})]})):d(lm,{...e})}const lm=Fp(function(e){const t=_(function(t,r){const{id:o,open:l}=t,{upsertInteraction:c,deleteInteraction:u}=Fd(),[p,m]=s(!1),h=i(),g=n(()=>{h.current&&(clearTimeout(h.current),h.current=void 0)},[]),f=n(({delay:e=0}={})=>{g(),e>0?h.current=setTimeout(()=>m(!1),e):m(!1)},[g]),y=n(()=>{g(),m(!0)},[g]);return a(()=>()=>{g(),o&&u(o)},[o]),a(()=>{o&&c({id:o,type:"interest",hide:f,show:y,active:p})},[p,f,o,y,c]),d(e,o&&void 0===l?{...t,open:p,ref:r}:{...t,ref:r})});return t.displayName=`InterestTargetComponent(${e.displayName||e.name||"Component"})`,t}(function({children:e,id:t,open:n,onMouseEnter:r,onMouseLeave:a}){const{getInteraction:i}=Fd(),o=t?i(t):void 0,s=Au(),{active:l=!1}=s??{};s?.setActivatorAttributes({"aria-controls":l?t:void 0,"aria-expanded":l});const c=o?.invokerRef?.current||s?.activatorRef.current||null,u=Ed(Boolean(n),{exit:"base"}),p=Boolean(t&&Vd(o)&&!s),m=p?d("div",{id:t,role:"tooltip","aria-hidden":"true",className:Se({screenReaders:"only"}),children:e}):null;return d(y,{children:[m,"exited"!==u&&d(im,{activator:c,preventOverflow:!0,offset:8,children:d(cm,{id:p?void 0:t,transition:u,onMouseEnter:()=>{Vd(o)&&o.show(),r?.()},onMouseLeave:()=>{Vd(o)&&o.hide({delay:100}),a?.()},children:e})})]})}));function cm({children:e,id:t,onMouseEnter:n,onMouseLeave:r,transition:a}){const{clipping:i,spacing:o,position:s}=Hp(),l="blockStart"===s||"blockEnd"===s,c=i.right||i.left,u=l&&c?b({[om.arrowNudge]:`${c+o}px`}):void 0,p=v(om.Tooltip,om.tooltipPositionVariant[s],om.tooltipTransitionVariant[a]);return d("div",{id:t,role:"tooltip","aria-hidden":void 0===t||void 0,onMouseEnter:n,onMouseLeave:r,className:p,style:u,children:[e,d(um,{})]})}function um(){const{position:e}=Hp();return d("div",{className:v(om.Arrow,om.arrowPositionVariant[e])})}async function dm(e){if(navigator.clipboard?.writeText)try{return void(await navigator.clipboard.writeText(e))}catch(r){console.warn("navigator.clipboard API failed, trying fallback method",r)}if(void 0===document.execCommand)throw new fe("Browser does not support copy to clipboard");let t=!1;const n=document.createElement("textarea");if(n.value=e,n.style.position="fixed",n.style.opacity="0",document.body.appendChild(n),n.select(),t=document.execCommand("copy"),document.body.removeChild(n),!t)throw new fe("Failed to copy text to clipboard")}const pm=jc("CommandInvoker");function mm(e,{commands:{clipboard:t=!0,visibility:r=!0,overlay:o=!0}={}}={}){const l=e.displayName||e.name||"Component",c=_(function({command:t,commandFor:r,onClick:o,overlay:l,...c},u){const{getInteraction:p}=Fd(),[m,h]=s(!1),[g,f]=s(""),y=Ju(),v=r?p(r):void 0,_=Od(v)&&null!=v.clipboard.text?v:void 0,b=n(async()=>{o?.();const{text:e,onCopy:t,onCopyError:n}=_.clipboard;let r=!1;try{await dm(e),r=!0}catch(a){console.warn("ClipboardItem: failed to copy text to clipboard",a)}finally{if(r){const e=y("clipboardCopied");f(e),h(!0),ju({content:e}),t?.()}else{const e=y("clipboardFailedToCopy");f(e),h(!0),ju({content:e}),n?.()}P(),k.current=setTimeout(()=>{h(!1)},2500)}},[o,_,y]),k=i(),P=()=>{k.current&&clearTimeout(k.current)};return a(()=>()=>P(),[]),d(e,{...c,command:t,commandFor:r,onClick:_?b:o,overlay:_?d(lm,{open:m,children:g}):l,ref:u})}),u=_(function({commandFor:t,id:n,onClick:r,...a},i){const o=Hc(n,pm),s=Ld({layoutId:t,activatorId:o});if(s){const{setToggleable:t,activatorAttributes:n,toggle:l}=s;t();const c={onClick:()=>{l(),r?.()},...n};return d(e,{...a,id:o,...c,ref:i})}return t&&console.warn(`${l} sets "command" property but is not wrapped inside a Disclosure component. Please ensure that the component is wrapped in a Disclosure component.`),d(e,{...a,id:n,ref:i}
2)}),p=_(function({command:t,commandFor:r,id:a,onClick:o,...s},l){const c=Hc(a,pm),{getInteraction:u,upsertInteraction:p}=Fd(),m=r?u(r):void 0,h=i(null),g=Rp(l,h),f=n(e=>{const t=r?u(r):void 0;if(Bd(t)){const{overlayType:n}=t;h.current&&"popover"===n&&e&&p({...t,invokerRef:h})}},[r,u,p]);if(m){let n={};if(zd(m)){const{hide:e,show:a,toggle:i,visible:s}=m;n={onClick:()=>{switch(t){case"--hide":e();break;case"--show":a();break;case"--toggle":i()}o?.()},"aria-controls":r,"aria-expanded":s}}else if(Bd(m)){const{active:e,close:a,open:i,overlayType:s,toggle:l}=m;n={onClick:()=>{var n;switch(("--show"===t||"--toggle"===t&&!e)&&(n=h.current)instanceof HTMLElement&&document.activeElement!==n&&n.focus({preventScroll:!0}),t){case"--hide":a();break;case"--show":i();break;case"--toggle":l()}f(!e),o?.()},...("modal"===s||"sheet"===s)&&{"aria-haspopup":"dialog"},..."popover"===s&&{"aria-controls":r,"aria-expanded":e}}}return d(e,{...s,command:t,commandFor:r,id:c,...n,ref:g})}return null}),m=_(function({command:n="--auto",commandFor:a,...i},s){const{getInteraction:m}=Fd();if(Ld({layoutId:a})&&("--hide"===n||"--show"===n||"--toggle"===n))return d(u,{...i,command:n,commandFor:a,ref:s});const h=a?m(a):void 0;if(h&&!Vd(h)){const{defaultCommand:e}=h,u="--auto"===n?e:n;if("--copy"===u&&t&&Od(h))return d(c,{...i,command:u,commandFor:a,ref:s});if(("--hide"===u||"--show"===u||"--toggle"===u)&&(r&&zd(h)||o&&Bd(h)))return d(p,{...i,command:u,commandFor:a,ref:s});if("--show"===u||"--hide"===u||"--toggle"===u||"--copy"===u){let e;Od(h)?e="clipboard":zd(h)?e="visibility":Bd(h)&&(e="overlay"),console.warn(`Command "${n}" targets "${a}" but ${l} does not support ${e} commands.`)}else console.warn(`Unknown command "${n}" for ${l}`)}return d(e,{...i,command:n,commandFor:a,ref:s})});return m.displayName=`CommandInvokerComponent(${l})`,m}function hm(e,{tapToggles:t=!1}={}){const r=e.displayName||e.name||"Component",o=_(function({interestFor:r,...o},s){const{onBlur:l,onClick:c,onFocus:u,onMouseEnter:p,onMouseLeave:m}=o,{getInteraction:h,upsertInteraction:g}=Fd(),f=r?h(r):void 0,y=i(null),v=i(),_=i(),b=n(e=>{if(_.current?.(),_.current=void 0,!(e instanceof HTMLElement))return;const t=e=>{v.current=e.pointerType};e.addEventListener("pointerenter",t),_.current=()=>{e.removeEventListener("pointerenter",t)}},[]),k=Rp(s,y),P=Rp(k,b),S=n(e=>{const t=r?h(r):void 0;Vd(t)&&g(e?{...t,invokerRef:y}:{...t,invokerRef:void 0})},[r,h,g]),w=Vd(f)&&f.active,C=n(e=>{["Escape","Esc"].includes(e.key)&&Vd(f)&&(e.preventDefault(),f.hide(),S(!1))},[f,S]);a(()=>{if(w)return document.addEventListener("keydown",C),()=>{document.removeEventListener("keydown",C)}},[w,C]);const E=n(e=>{const t=e.target;t instanceof Node&&!y.current?.contains(t)&&(t instanceof Element&&t.closest('[role="tooltip"]')||Vd(f)&&(f.hide(),S(!1)))},[f,S]);if(a(()=>{if(t&&w)return document.addEventListener("click",E),()=>{document.removeEventListener("click",E)}},[w,E]),Vd(f)){const n={"aria-describedby":r,onFocus:()=>{("touch"!==v.current||function(e){if(!(e instanceof HTMLElement))return!0;try{return e.matches(":focus-visible")}catch{return!0}}(y.current))&&(f.show(),S(!0)),u?.()},onBlur:()=>{f.hide(),S(!1),l?.()},onMouseLeave:()=>{f.hide({delay:100}),S(!1),m?.()},onMouseEnter:()=>{"touch"!==v.current&&(f.show(),S(!0)),p?.()},...t&&{onClick:()=>{"touch"===v.current&&(f.active?(f.hide(),S(!1)):(f.show(),S(!0))),c?.()}}};return d(e,{...o,...n,ref:P})}return d(e,{...o,ref:s})});return o.displayName=`InterestInvokerComponent(${r})`,o}const gm=Object.fromEntries(Object.entries({alignSelf:"auto",backgroundColor:"transparent",blockSize:"auto",borderRadius:"none",borderStyle:"none",inlineSize:"auto",maxBlockSize:"none",maxInlineSize:"none",minBlockSize:"0",minInlineSize:"0",padding:"none",placeContent:"normal",placeItems:"normal"}).flatMap(([e,t])=>we(e)?.map(e=>[e,t])??[[e,t]])),fm={none:"none","small-500":"small500","small-400":"small400","small-300":"small300","small-200":"small200","small-100":"small100",small:"small100",base:"base",large:"large100","large-100":"large100","large-200":"large200","large-300":"large300","large-400":"large400","large-500":"large500","large-600":"large600"},ym={center:"center",end:"end",normal:"normal","space-between":"between","space-around":"around","space-evenly":"evenly",start:"start",stretch:"stretch"},vm={baseline:"baseline",center:"center",end:"end",normal:"normal",start:"start",stretch:"stretch"},_m={auto:"auto",hidden:"hidden"},bm={alignContent:{...ym},placeContent:{...ym},alignItems:{...vm},alignSelf:{auto:"auto",baseline:"baseline",center:"center",end:"end",start:"start",stretch:"stretch"},placeItems:{...vm}
2,backgroundColor:{base:"base",baseSpecified:"baseSpecified",transparent:"transparent",subdued:"subdued",subdued200:"subdued200"},backgroundColorHoverAndFocus:{base:"base",transparent:"transparent",subdued:"subdued"},borderRadius:{none:"none","small-100":"small",small:"small",base:"base",large:"large","large-100":"large",max:"max",fullyRounded:"fullyRounded"},borderWidth:{none:"none",base:"base",large:"large100","large-100":"large100","large-200":"large200"},borderStyle:{none:"none",dotted:"dotted",dashed:"dashed",solid:"base",auto:"base"},borderColor:{base:"base"},display:{inline:"inline",block:"block",flex:"flex",inlineBlock:"inlineBlock",inlineFlex:"inlineFlex",grid:"grid",inlineGrid:"inlineGrid",none:"none"},flexDirection:{column:"column",row:"row"},flexWrap:{wrap:"wrap",nowrap:"nowrap"},gridAutoFlow:{row:"row",column:"column"},justifyContent:{...ym},justifyItems:{...vm},objectFit:{contain:"contain",cover:"cover",fill:"fill"},boxShadow:{none:"none",extraSmall:"extraSmall",small:"small",base:"base",large:"large",extraLarge:"extraLarge"},overflow:{..._m},overflowBlock:{..._m},overflowInline:{..._m},padding:{...fm},paddingBlock:{...fm},paddingInline:{...fm},paddingBlockStart:{...fm},paddingBlockEnd:{...fm},paddingInlineStart:{...fm},paddingInlineEnd:{...fm},gap:{...fm},rowGap:{...fm},columnGap:{...fm},position:{absolute:"absolute",relative:"relative",sticky:"sticky"},zIndex:{portal:"portal"}},km={borderRadius:{limit:4},borderStyle:{limit:4},borderWidth:{limit:4},gap:{limit:2},insetBlock:{limit:2},insetInline:{limit:2},overflow:{limit:2},padding:{limit:4},paddingBlock:{limit:2},paddingInline:{limit:2},placeContent:{limit:2},placeItems:{limit:2}},Pm={backgroundImage:ud,blockSize:sd,gridAutoColumns:e=>e,gridAutoRows:e=>e,gridColumn:nd,gridRow:nd,gridTemplateColumns:td,gridTemplateRows:td,inlineSize:sd,insetBlock:od,insetBlockEnd:od,insetBlockStart:od,insetInline:od,insetInlineEnd:od,insetInlineStart:od,maxBlockSize:ld,maxInlineSize:ld,minBlockSize:cd,minInlineSize:cd,transform:function(e){if("none"===e)return"none";if("string"!=typeof e||!e.startsWith("translate(")||!e.endsWith(")"))return rd(e);const t=e.slice(10,-1).split(",");if(t.length>2)return rd(e);const n=ad(t[0].trim()),r=2===t.length?ad(t[1].trim()):0;return void 0===n||void 0===r?rd(e):`translateX(calc(${ve(n)} * ${ye.global.transformDirectionModifier})) translateY(${ve(r)})`}},Sm=/\s+/;function wm(e,t,{filterDefaultValues:n=!1}={}){const r={};for(const[u,d]of Object.entries(e)){if(void 0===d||""===d)continue;const e=u in km?Cm(d,u):d;void 0!==e&&(r[u]=e)}const a=n?function(e){const t={};for(const[n,r]of Object.entries(e))n in gm&&r===gm[n]||(t[n]=r);return t}(Em(r,t)):Em(r,t),i=Am(a,Pm),o=Am(a,bm),s=Se(i),{className:l,style:c}=Ce(o);return{className:v(s,l),style:c}}function Cm(e,t){const{limit:n}=km[t];return Ap(e,e=>{if(void 0===e||"string"!=typeof e)return;const t=e.trim().split(Sm,n??4);return 1===t.length?t[0]:(3===t.length&&t.push(t[1]),t)})}function Em(e,t){const n={},r=(e,r)=>{const a=function(e,t){return function(e){return e.property in Pm}(e)?function(e,t,n){const r=n?.transforms?.[e]??Pm[e];return Ap(t,e=>{if(void 0!==e)return Ie(e)?Im(e.map(e=>r?.(e))):r?.(e)})}(e.property,e.value,t):function(e){return e.property in bm}(e)?function(e,t,n){const r=bm[e],a=t=>{const a=n?.transforms?.[e]?.(t);return r[a??t]};return Ap(t,e=>Ie(e)?Im(e.map(a)):a(e))}(e.property,e.value,t):void 0}({property:e,value:r},t),i=function(e,t){const n=we(e);if(!n||0===n.length)return{[e]:t};if(Xl(t)){const e=Object.entries(t),r={};for(let t=0;t<n.length;t++){const a=n[t],i={};for(const[n,r]of e)i[n]=xe(r)?r[t]:r;r[a]=i}return r}const r=xe(t),a={};for(let i=0;i<n.length;i++)a[n[i]]=r?t[i]:t;return a}(e,a);for(const[t,o]of Object.entries(i)){const e=xm(o);if(void 0===e)continue;const r=n[t];if(Xl(e)&&void 0!==r){const a=Xl(r)?r:{base:r};n[t]={...a,...e}}else n[t]=e}};for(const a of Ee)a in e&&r(a,e[a]);for(const[a,i]of Object.entries(e))Ee.includes(a)||r(a,i);return n}function xm(e){if(!Xl(e))return e;const t=Object.entries(e).filter(([,e])=>void 0!==e&&""!==e);return t.length>0?Object.fromEntries(t):void 0}function Im(e){if(!Array.isArray(e)||2!==e.length)return e;const[t,n]=e;return[t,n,t,n]}function Am(e,t){const n={};for(const r of Object.keys(e))r in t||(n[r]=e[r]);return n}const Tm=Object.keys(ne).filter(e=>"base"!==e),Lm=new Set([">",">="]),Nm=new Set(["<","<="]);function Rm(e){return"inline-size"===e}function Mm(e){if("invalid"===e.state)return e;function t(e){return!!Rm(e)||(console.warn(`Container queries should be based on the inline dimensions of the container. Use 'inline-size' instead of '${e}'.`),!1)}function n(e){return"compound-condition"===e.type?!("condition"===e.left.type&&!t(e.left.property)||"condition"===e.right.type&&!t(e.right.property))&&
2(function(e){if("and"!==e.operator)return!1;if("condition"!==e.left.type||"condition"!==e.right.type)return!1;if(e.left.property!==e.right.property)return!1;const t=e.left,n=e.right,r=parseFloat(t.value),a=parseFloat(n.value),i=Lm.has(t.operator),o=Lm.has(n.operator),s=Nm.has(t.operator),l=Nm.has(n.operator);return!!(i&&l||s&&o)&&(i?r:a)<(s?r:a)}(e)?function(e){const t=e.left,n=e.right,r=Lm.has(t.operator),a=Lm.has(n.operator),i=Nm.has(t.operator),o=Nm.has(n.operator);let s;if(r&&o)s=t;else{if(!i||!a)return console.warn("Invalid range query structure. Expected one lower bound and one upper bound."),!1;s=n}return!!Lm.has(s.operator)||(console.warn(`Mobile-first approach requires the lower bound of a range to use '>' or '>=' operators. Found '${s.operator}' in condition '${s.property} ${s.operator} ${s.value}'. Use '>' or '>=' instead.`),!1)}(e):n(e.left)&&n(e.right)):!("condition"!==e.type||!t(e.property)||!Lm.has(e.operator)&&(console.warn(`Mobile-first approach requires '>' or '>=' operators. Found '${e.operator}' in condition '${e.property} ${e.operator} ${e.value}'. Use '>' or '>=' instead.`),1))}return e.conditionalValues.every(e=>n(e.condition))?e:{state:"invalid",error:"Expected a mobile-first responsive query, instead found one that does not follow mobile-first principles."}}function Dm(e,t){if("invalid"===e.state)return e;const n=t?` for property '${t}'`:"";function r(e){return"compound-condition"===e.type?r(e.left)&&r(e.right):"condition"===e.type&&!(!Rm(o=e.property)&&(console.warn(`Media queries should be based on 'inline-size'. Use 'inline-size' instead of '${o}'.`),1)||(i=e.value,!Tm.includes(i)&&("base"===i?console.warn(`Media queries should use valid breakpoints${n}. Found 'base' (use 'base' only as fallback, minimum condition is 'extraSmall'). Use one of '${Tm.join("', '")}' instead.`):console.warn(`Media queries should use valid breakpoints${n}. Found '${i}'. Use one of '${Tm.join("', '")}' instead.`),1))||(t=e.operator,a=e.value,">="!==t&&(console.warn(`Media queries should use '>=' operator${n}. Found '${t}' (expected '>=' for breakpoint '${a}').`),1)));var t,a,i,o}return e.conditionalValues.every(e=>r(e.condition))?e:{state:"invalid",error:"Expected a valid media query with breakpoint conditions, instead found invalid property, breakpoints, or operators."}}const Om=jc("ContainerQueryStyle");function zm({cssClassNameSelector:e,property:t,value:n,config:r}){const{className:a,style:i}=wm({[t]:n},r);if(!a)return null;const o=function(e){if(Bm.has(e))return Bm.get(e)||null;if("undefined"==typeof document)return null;const t=e.split(" ").filter(Boolean);if(0===t.length)return null;const n=[];for(const a of Array.from(document.styleSheets))try{const e=a.cssRules||a.rules;for(const r of Array.from(e))if(r instanceof CSSStyleRule)for(const e of t)new RegExp(`\\.${e}(?![\\w-])`).test(r.selectorText)&&n.push(r.cssText)}catch{continue}const r=n.length>0?n.join("\n"):null;return Bm.set(e,r),r}(a);if(!o)return null;const s=function(e,t,n){const r=e.split("\n"),a=[];for(const i of r){const e=i.match(/^([^{]+)\{([^}]+)\}/);if(e){const r=e[1].trim(),i=Vm(e[2].trim(),n);if(r.includes("[dir=")){const e=r.match(/\[dir="[^"]+"\]/)?.[0];e&&r.match(/\.([^\s[\]]+)/)&&a.push(`${e} .${t}{${i}}`)}else a.push(`.${t}{${i}}`)}}return a.join("")}(o,e,i);return s}const Bm=new Map;function Vm(e,t){return e.replace(/var\(--[^)]+\)/g,e=>{const n=e.match(/var\(([^)]+)\)/)?.[1];return n&&t[n]?t[n]:e})}function Fm(e){if("compound-condition"===e.type){const t=Fm(e.left),n=Fm(e.right);return`${t} ${e.operator} ${n}`}return`(${e.property} ${e.operator} ${e.value})`}function Um(e,t){const{containerQueryProps:n,mediaQueryProps:a,literalProps:i}=r(()=>{const t={},n={},r={};for(const[i,o]of Object.entries(e||{}))null!=o&&(Cp(o)?t[i]=o:Ep(o)?n[i]=o:r[i]=o);const a=new Set(Object.keys(n).flatMap(e=>we(e)??[e]));for(let e=a.size>0;e;){e=!1;for(const[t,i]of Object.entries(r)){if(Ae(i))continue;const o=we(t);if(o?.length&&qm(o[0],i))continue;const s=o?.length?o:[t];if(s.some(e=>a.has(e))){n[t]=i,delete r[t];for(const e of s)a.add(e);e=!0}}}return{containerQueryProps:t,mediaQueryProps:n,literalProps:r}},[e]),{className:o,style:s,styleElement:l}=function(e,t){const n=Hc(void 0,Om),{containerQueryCssStrings:a,fallbackClassName:i,fallbackStyle:o}=r(()=>{const r={},a=[];if(!e)return{fallbackClassName:"",fallbackStyle:{},containerQueryCssStrings:a};for(const[s,l]of Object.entries(e)){if(!Cp(l))continue;const e=Mm(wp(l));if("invalid"===e.state)continue;r[s]=e.fallbackValue;const i=e.conditionalValues.map(r=>{const a=zm({cssClassNameSelector:n,property:s,value:r.value,config:t});return a?`${e.responsiveType}${"@container"===e.responsiveType&&e.name?` ${e.name} `:""}${Fm(r.condition)}{${a}}`:""}
2).filter(Boolean).join("");a.push({property:s,cssString:i})}const{className:i,style:o}=wm(r,t);return{containerQueryCssStrings:a,fallbackClassName:i,fallbackStyle:o}},[t,e,n]),s=a.length>0?d("style",{children:a.map(({cssString:e})=>e).join("")},n):null;return{className:v(n,i),style:o,styleElement:s}}(n,t),{className:c,style:u}=function(e,t){const{className:n,style:a}=r(()=>{const n={};if(!e)return{className:"",style:{}};for(const[t,r]of Object.entries(e)){if(!Ep(r)){n[t]=r;continue}const e=Dm(wp(r),t);if("invalid"===e.state)continue;const a={base:e.fallbackValue};for(const t of e.conditionalValues){const e=t.condition;"condition"===e.type&&(a[e.value]=t.value)}n[t]=a}return wm(n,t)},[t,e]);return{className:v(n),style:a}}(a,t),{className:p,style:m}=function(e,t){return r(()=>e&&0!==Object.keys(e).length?wm(e,t,{filterDefaultValues:!0}):{className:"",style:{}},[t,e])}(i,t);!function(e,t,n){const r=new Set,a=new Set,i=new Set,o=new Set;if(0===Object.keys(e).length&&0===Object.keys(t).length&&0===Object.keys(n).length)return;for(const[c,u]of Object.entries(e))if(Ee.includes(c)){const e=we(c)??[];if(e.length>0&&qm(e[0],u))continue;for(const t of e)r.add(t)}else{if(qm(c,u))continue;r.add(c)}for(const[c,u]of Object.entries(t))if(Ee.includes(c)){const e=we(c)??[];if(e.length>0&&qm(e[0],u))continue;for(const t of e)a.add(t)}else{if(qm(c,u))continue;a.add(c)}for(const[c,u]of Object.entries(n))if(Ee.includes(c)){const e=we(c)??[];if(e.length>0&&qm(e[0],u))continue;for(const t of e)i.add(t),o.add(t)}else{if(qm(c,u))continue;i.add(c)}const s=new Set,l=n=>o.has(n)&&(n in t||n in e);for(const c of r)if(a.has(c)||i.has(c)){if(l(c))continue;s.add(c)}for(const c of a)if(i.has(c)){if(l(c))continue;s.add(c)}s.size>0&&console.warn(`ResponsiveStyle: style property conflicts detected - ${Array.from(s).join(", ")}. These style properties are being set by multiple styling methods (container query, media query, or conditional). Consider avoiding mixing different responsive value types for the same properties.`)}(n,a,i),function(e){const t=Object.keys(e).filter(t=>Ae(e[t]));t.length>0&&console.warn(`ResponsiveStyle: conditional values are no longer resolved - ${t.join(", ")}. Convert them to an \`@media\` string or a per-breakpoint object at the component boundary.`)}(i);const h=Object.keys(n).length>0,g=Object.keys(a).length>0;return{className:v(h?o:void 0,g?c:void 0,p),style:{...s,...u,...m},styleElement:l}}function qm(e,t){const n=gm[e];return void 0!==n&&t===n}const jm=hm(mm(Vp(_(function({ariaBusy:e,ariaHidden:t,ariaLabel:n,ariaLive:r,children:a,className:i,commandFor:o,command:s,href:l,id:c,lang:u,onClick:p,onFocus:m,onMouseEnter:h,target:g,...f},y){const v=Wu().linkComponent,_=Pd(),b="function"==typeof p?()=>p():void 0,k="function"==typeof m?()=>m():void 0,P="function"==typeof h?()=>h():void 0,S=i??"_1M6e9",w=Au(),C=zp(w,{onClick:b,onFocus:k,onMouseEnter:P}),E=w?.activatorAttributes,x=!(!t&&!_)||void 0,I=x?-1:void 0;return v?d(v,{className:S,"aria-busy":e||void 0,"aria-hidden":x,"aria-label":n,"aria-live":r,href:l,id:c,lang:u,ref:y,tabIndex:I,target:g,...C,...E,...f,children:a}):d("a",{"aria-busy":e||void 0,"aria-describedby":Su({external:"_blank"===g||!1,native:!0}),"aria-label":n,"aria-live":r,"aria-hidden":x,className:S,href:l,id:c,lang:u,ref:y,rel:"_blank"===g?"noopener noreferrer":void 0,tabIndex:I,target:"_blank"===g?g:void 0,...C,...E,...f,children:a})}))));function Hm(){const e=h(Te);if(null==e)throw new fe("No theme found in context");return e}function $m(){const e=Hm();if("undefined"==typeof window)return e.configuration;const t=i();if(null!=t.current&&t.current.theme!==e&&(t.current=void 0),null==t.current){const n=e.configurationSignal,r=new Map,a={};for(const t of Object.keys(e.configuration))Object.defineProperty(a,t,{enumerable:!0,get:()=>(r.has(t)||r.set(t,k(()=>n.value[t])),r.get(t).value)});t.current={theme:e,watchedKeysSignals:r,reactiveConfiguration:a}}return t.current.reactiveConfiguration}function Ym(e){const t=_(function({disableGlobalBranding:t,...n},r){const{global:{cornerRadius:a}}=$m(),i=Le(a),o=t?n:{...n,borderRadius:i??n.borderRadius};return d(e,{...o,ref:r})});return t.displayName=`GlobalBrandedComponent(${e.displayName||e.name||"Component"})`,t}const Wm=Rd(Ym(hm(mm(Vp(_(function({accessibilityLabel:e,accessibilityVisibility:t="visible",background:n="transparent",blockSize:r="auto",border:i="none",borderRadius:o="none",borderStyle:s,borderWidth:l,children:c,className:u,command:p,commandFor:m,controlId:h,disabled:g=!1,display:f="auto",expanded:_,href:b,id:k,inlineSize:P="auto",lang:S,loading:w=!1,maxBlockSize:C="none",maxInlineSize:E="none",minBlockSize:x="0",minInlineSize:I="0",onBlur:A,onClick:T,onFocus:L,onPointerDown:N,onPointerEnter:R,onPointerLeave:M,onPointerUp:D,overflow:O="visible",padding:z="none",paddingBlock:B,paddingInline:V,paddingBlockEnd:F,paddingBlockStart:U,paddingInlineEnd:q,paddingInlineStart:j,target:H="auto",type:$="button",...Y},W){a(()=>{null!=_&&null==h&&console.warn('When <Clickable /> has an "expanded" prop, it should also have "controlId" defined')},[h,_]);const G=Pd(),J=Au(),{className:K,style:Q,styleElement:X}=Um({backgroundColor:n,blockSize:r,...Ne({border:i,borderStyle:s,borderWidth:l}),borderRadius:o,display:f,inlineSize:P,maxBlockSize:C,maxInlineSize:E,minInlineSize:I,minBlockSize:x,padding:z,paddingBlock:B,paddingBlockEnd:F,paddingBlockStart:U,paddingInline:V,paddingInlineEnd:q,paddingInlineStart:j},{transforms:{display:gd}}
2),Z=v("_1s82kpb1 _1s82kpb0 _1fragemyd _1fragemws _1fragem126 _1fragemyk _1fragem12b _1fragemxw","exclusive"===t&&"_1s82kpb5 _1fragem121",K,"hidden"===O&&"_1s82kpb4 _1s82kpb3 _1fragemup _1fragemv4",G&&"_1s82kpb2 _1fragemz0",u),ee=bd(),te=Np(W),ne=zp(J,{onClick:()=>{T?.()},onBlur:()=>{A?.()},onFocus:()=>{L?.()},onMouseEnter:()=>{R?.()},onMouseLeave:()=>{M?.()},onMouseDown:e=>{N&&0===e.button&&N?.()},onMouseUp:()=>{D?.()}}),re=w?"assertive":void 0,ae="hidden"===t||G,ie={className:Z,id:k,lang:S,style:Q,tabIndex:ae?-1:void 0,...Dp(J,{"aria-controls":h,"aria-expanded":_}),...ne,...Y};return d(y,{children:[X,d(Sd.Provider,{value:!0,children:b&&void 0===m?d(jm,{...ie,href:b,ref:te,ariaBusy:w,ariaHidden:!!ae||void 0,ariaLive:re,ariaLabel:e,target:H,children:c}):d("button",{ref:te,type:m?"button":$,disabled:g||w,form:"submit"===$&&ee?.nested?ee.id:void 0,"aria-busy":w,"aria-hidden":!!ae||void 0,"aria-live":re,"aria-label":e,...ie,children:c})})]})})))))),Gm="generic",Jm=new Map([["main",{element:"main"}],["header",{element:"header"}],["footer",{element:"footer"}],["section",{element:"section"}],["aside",{element:"aside"}],["navigation",{element:"nav"}],["ordered-list",{element:"ol",role:"list"}],["unordered-list",{element:"ul",role:"list"}],["list-item",{element:"li"}],["list-item-separator",{element:"li",role:"separator"}],["separator",{role:"separator"}],["status",{role:"status"}],["alert",{role:"alert"}],["group",{role:"group"}],["listbox",{role:"listbox"}],["generic",{}],["presentation",{}],["none",{}]]);function Km(e,{defaultRole:t=Gm,defaultElement:n="div"}={}){const r=Jm.get(e??t)??Jm.get(t)??Jm.get(Gm);return{Element:r.element??n,role:r.role}}const Qm=Md(Ym(function({accessibilityLabel:e,accessibilityRole:t="generic",accessibilityVisibility:n="visible",alignContent:r,alignItems:a,background:i="transparent",backgroundHoverAndFocus:o,blockSize:s="auto",border:l="none",borderColor:c,borderRadius:u="none",borderStyle:p,borderWidth:m,children:h,columnGap:g,display:f="auto",gap:_="none",gridAutoColumns:b,gridAutoFlow:k,gridAutoRows:P,gridTemplateColumns:S="none",gridTemplateRows:w="none",id:C,inlineSize:E="auto",justifyContent:x,justifyItems:I,maxBlockSize:A="none",maxInlineSize:T="none",minBlockSize:L="0",minInlineSize:N="0",overflow:R="visible",padding:M="none",paddingBlock:D,paddingBlockEnd:O,paddingBlockStart:z,paddingInline:B,paddingInlineEnd:V,paddingInlineStart:F,placeContent:U="normal normal",placeItems:q="normal normal",rowGap:j,...H}){const $=wd(),{Element:Y,role:W}=Km(t,{defaultElement:$?"span":"div"}),{className:G,style:J,styleElement:K}=Um({gap:_,placeContent:U,placeItems:q,alignContent:r,alignItems:a,backgroundColor:i,backgroundColorHoverAndFocus:o,blockSize:s,...Ne({border:l,borderStyle:p,borderWidth:m}),borderRadius:u,columnGap:g,display:f,gridAutoColumns:b,gridAutoFlow:k,gridAutoRows:P,gridTemplateColumns:S,gridTemplateRows:w,inlineSize:E,justifyContent:x,justifyItems:I,maxBlockSize:A,maxInlineSize:T,minBlockSize:L,minInlineSize:N,padding:M,paddingBlock:D,paddingBlockEnd:O,paddingBlockStart:z,paddingInline:B,paddingInlineEnd:V,paddingInlineStart:F,rowGap:j},{transforms:{blockSize:sd,display:vd}});return d(y,{children:[K,d(Y,{"aria-hidden":"hidden"===n||void 0,"aria-label":e,className:v("_1mrl40q0 _1fragemws","exclusive"===n&&"_1mrl40q2 _1fragem121","hidden"===R&&"_1mrl40q1 _1fragemup _1fragemv4",G),id:C,role:W,style:J,...H,children:h})]})})),Xm=["alertCircle","alertTriangle","alertTriangleFilled","arrowDown","arrowLeft","arrowRight","arrowUp","arrowUpRight","bag","bullet","calendar","camera","caretDown","cart","cashDollar","categories","check","checkCircle","checkCircleFilled","chevronDown","chevronLeft","chevronRight","chevronUp","circle","clipboard","clock","creditCard","delete","delivered","delivery","disabled","discount","edit","email","empty","external","filter","geolocation","giftCard","globe","grid","image","info","infoFilled","listBulleted","location","lock","map","menu","menuHorizontal","menuVertical","minus","mobile","note","order","organization","packageDelivery","plus","profile","questionCircle","questionCircleFilled","reorder","reset","return","savings","search","settings","star","starFilled","starHalf","store","truck","upload","x","xCircle","xCircleFilled"];var Zm=1,eh={colorVariant:{base:"a8x1wuj",strong:"a8x1wuk"},toneVariant:{auto:"a8x1wua",neutral:"a8x1wub",accent:"a8x1wuc a8x1wu4 _1fragemxq",custom:"a8x1wud a8x1wu5 _1fragemxs",info:"a8x1wue a8x1wu6 _1fragemxt",success:"a8x1wuf a8x1wu7 _1fragemxu",critical:"a8x1wug a8x1wu8 _1fragemxr",warning:"a8x1wuh a8x1wu9 _1fragemxv",monochrome:"a8x1wu
2i"},displayVariant:{block:"a8x1wun a8x1wul _1fragem5u",inline:"a8x1wuo a8x1wum _1fragem6e _1fragem12x"},sizeVariant:{"small-200":"a8x1wuq a8x1wup","small-100":"a8x1wur a8x1wup",base:"a8x1wus a8x1wup","large-100":"a8x1wut a8x1wup",fill:"a8x1wuu a8x1wup"},fillVariant:{fill:"a8x1wuw",outline:"a8x1wux"},Icon:"a8x1wu3 a8x1wu2 _1fragemzf _1fragem4q _1fragemvo _1fragemve _1fragem12k _1fragem12p _1fragem12e",InterestActivator:"a8x1wuz a8x1wuy _1fragemws _1fragemyk",mirrored:"a8x1wuv"};const th=["arrow-left","arrow-right","arrow-up-right","cart","chevron-left","chevron-right","delivery","external","list","note","package-delivery","return","star-half","truck","arrowLeft","arrowRight","arrowUpRight","chevronLeft","chevronRight","starHalf"],nh=["alert-triangle-filled","caret-down","check-circle-filled","info-filled","question-circle-filled","star-filled","star-half","x-circle-filled","caretDown","errorFill","infoFill","questionFill","starFill","starHalf","warningFill"];function rh({interestFor:e,...t}){return e?d(ih,{...t,interestFor:e}):d(ah,{...t})}function ah({accessibilityLabel:e,...t}){const{className:n,children:r}=oh(t);return d("span",{role:e?"img":void 0,"aria-label":e,className:n,id:t.id,children:r})}const ih=hm(_(function({accessibilityLabel:e,"aria-describedby":t,id:n,onBlur:r,onClick:a,onFocus:i,onMouseEnter:o,onMouseLeave:s,...l},c){const{className:u,children:p}=oh(l);return d("span",{role:"img",tabIndex:t?0:void 0,id:n,ref:c,className:v(eh.InterestActivator,u),"aria-label":e,"aria-labelledby":e?void 0:t,"aria-describedby":e?t:void 0,onBlur:r,onClick:a,onFocus:i,onMouseEnter:o,onMouseLeave:s,children:p})}),{tapToggles:!0});function oh({type:e,tone:t="auto",color:n="base",size:r="base",display:a="block",className:i}){const{icons:o}=$m(),s=Wu().inlineIcons??!1;let l;e?l=e:(""===e||console.warn(`"${e}" is not a valid <Icon /> type`),l="empty");const c=th.includes(l),u=nh.includes(l)?"fill":"outline";let p;switch(r){case"small":p="small-100";break;case"large":p="large-100";break;default:p=r}const m=v(eh.Icon,eh.toneVariant[t],("auto"===t||"neutral"===t)&&eh.colorVariant[n],eh.displayVariant[a],eh.sizeVariant[p],c&&eh.mirrored,eh.fillVariant[u],i);let h=function(e){const t=Pe(e);return t in sh?sh[t]:Xm.includes(t)?t:void 0}(l);h||(console.warn(`"${l}" is not a valid <Icon /> type`),h="empty");const g=o[h],f=g??`/cdn/shopifycloud/checkout-web/assets/c1/assets/sprite.CxF41tjh.svg#${h}`,y=d("svg",{viewBox:"0 0 14 14",focusable:"false","aria-hidden":"true",children:d("use",{href:f})});return{className:m,children:null!=g||s?d(hu,{iconUrl:f,fallback:y,allowRelativeUrl:null==g}):y}}const sh={checkmark:"check",close:"x",critical:"alertCircle",error:"xCircle",errorFill:"xCircleFilled",gift:"giftCard",giftFill:"giftCard",hamburger:"menu",hollowCircle:"circle",horizontalDots:"menuHorizontal",infoFill:"infoFilled",list:"listBulleted",magnify:"search",marker:"location",orderBox:"order",pen:"edit",question:"questionCircle",questionFill:"questionCircleFilled",starFill:"starFilled",success:"checkCircle",verticalDots:"menuVertical",warning:"alertTriangle",warningFill:"alertTriangleFilled"};function lh({message:e,dismiss:t}){const n=Ju();return a(()=>ju({content:e}),[e]),a(()=>{const e=setTimeout(t,5300);return()=>clearTimeout(e)},[t]),d("span",{className:"jmb5zc4 jmb5zc3 _1fragempk _1fragemnr _1fragemtb _1fragemri _1fragemy5 _1fragem120",children:d(Qm,{gridAutoFlow:"column",gridTemplateColumns:"minmax(0, 1fr) minmax(auto, max-content)",gridTemplateRows:"minmax(0, 1fr)",alignItems:"center",alignContent:"center",gap:"base",children:[d("span",{children:e}),d(Wm,{onClick:t,accessibilityLabel:n("closeNotification"),children:d(rh,{type:"x",size:"small",tone:"monochrome"})})]})})}const ch=f(null);function uh({children:e,handleToast:t}){const[a,o]=s([]),l=i(0),c=n(e=>{o(t=>t.filter(t=>t.id!==e))},[]),u=n(()=>(l.current+=1,`toast-message-${l.current}`),[]),p=r(()=>({setMessages:o,removeMessage:c,createMessageId:u,handleToast:t}),[o,c,u,t]);return d(ch.Provider,{value:p,children:[e,a.length>0?d(eu,{children:d(dh,{children:a.map(({id:e,content:t})=>d(lh,{message:t,dismiss:()=>c(e)},e))})}):null]})}function dh({children:e}){const t=qc(),n=i(null),r=i(void 0);return l(()=>{const e=n.current;if(!e)return;const a=e.offsetHeight,i=a-(r.current??a);r.current=a,t||!e.animate||i<=0||e.animate([{transform:`translateY(${i}px)`},{transform:"translateY(0)"}],{duration:150,easing:"ease-out"})}),d("div",{ref:n,className:"_17vpdjb1 _17vpdjb0 _1fragem8m _1fragemaf _1fragemwn _1fragem132 _1fragem11a _1fragem10v _1fragem6t _1fragemcn _1fragembj _1fragem11z",children:e})}function ph(){const e=h(ch),{setMessages:t,removeMessage:r,createMessageId:a,handleToast:i}=e??{};return n(e=>{if(!t||!r||!a)throw new fe("useToast must be used within Toaster context provider");if("string"!=typeof e||"string"==typeof e&&""===e.trim())return{hide:()=>{}};if(i?.(e))return{hide:()=>{}};const n=a();return t(t=>[...t,{id:n,content:e}]),{hide:()=>r(n)}},[t,r,a,i])}function mh(e,t){if(!e)throw new TypeError(t)}function hh(e){return r(()=>Re(e),[])}function gh(e,t){const n=oe(t),r=i();r.current||(r.current=e.listen(n.current)),a(()=>()=>r.current?.(),[e,n])}const fh="·",yh=150,vh="ASAP",_h=re("ShippingMethodsContext");function bh(){const e=h(_h);if(null!=e)return e}function kh(){const{observability:e}=ie();return n((t,n)=>{e.histogram({name:"checkout_delivery_promise_request_duration_ms",value:t,attributes:{apiClientId:n.toString()}})},[e])}const Ph=()=>De((e,t)=>
2{switch(e){case"ignored":if("timeout"===t)return"idle";break;case"idle":if("countryChange"===t)return"debounced";if("otherAddressFieldChange"===t)return"ignored";break;case"debounced":switch(t){case"countryChange":return"debounced";case"otherAddressFieldChange":return"ignored";case"timeout":return"idle"}}},"idle"),Sh=["streetName","streetNumber","neighborhood","line2"];function wh(e,t){const n=r(Ph,[e]),i=n.value;gh(n,({previousState:e,action:n})=>{"debounced"===e&&"timeout"===n&&t()}),a(()=>{let t=!1;return e.fields.countryCode.subscribe(()=>{t&&(n.value="countryChange"),t=!0})},[e.fields.countryCode,n]),a(()=>{if("debounced"===i||"ignored"===i){const e=setTimeout(()=>{n.value="timeout"},100);return()=>{clearTimeout(e)}}},[n,i]),a(()=>{let t=!1;const r=Object.keys(e.fields).filter(e=>!["countryCode",...Sh].includes(e)).map(r=>e.fields[r].subscribe(e=>{e&&t&&(n.value="otherAddressFieldChange")}));return t=!0,()=>{r.forEach(e=>e())}},[e.fields,n])}function Ch(){const{shop:{shippingRatesReloadStrategy:e}}=ie();return n(({countryCode:t,zoneCode:n})=>{try{mh("string"==typeof t,"Expected a country code");const r=e.get(t);switch(mh(null!=r,`Could not find a strategy for ${t}`),r.type){case"regional":{const e=Math.max(...r.regions.values());return null==n?e:r.regions.get(n)??e}case"national":return r.strategy}}catch{const t=e.get("ZZ");return"national"===t?.type?t.strategy:Me.Anything}},[e])}function Eh(){const{i18n:e}=ie(),t=new Map;return t.set("year",t=>e.translate("shipping.subscription_delivery_description.subscription_delivery_frequency.year",{count:t})),t.set("month",t=>e.translate("shipping.subscription_delivery_description.subscription_delivery_frequency.month",{count:t})),t.set("week",t=>e.translate("shipping.subscription_delivery_description.subscription_delivery_frequency.week",{count:t})),t.set("day",t=>e.translate("shipping.subscription_delivery_description.subscription_delivery_frequency.day",{count:t})),(e,n)=>{const r=t.get(e);return r?.(n)||""}}function xh({proposedDeliveryLines:e,onlyShippingOneTimePurchase:t=!1}){return e.value.map(e=>e.value).reduce((e,{type:n,id:r,deliveryMethodTypes:a,deliveryMethodHandle:i})=>{const o=["SHIPPING","LOCAL"];if(t&&("ONE_TIME_PURCHASE"!==n||0===a.length||!a.some(e=>o.includes(e))))return e;const s=ze(n,r);return{...e,[s]:i}},{})}function Ih(e,t){const n=e.value;void 0!==t?Object.entries(t).forEach(([e,t])=>{const[r,a]=e.split("-"),i=n.find(e=>{const{type:t,id:n}=e.value;return!(t!==r||a&&n&&le(n)!==a)});i&&(i.value={...i.value,deliveryMethodHandle:t})}):n.forEach(e=>{e.value={...e.value,deliveryMethodHandle:void 0}})}function Ah(e,t,n){const{checkout:{negotiator:r}}=ie(),{parts:a}=r,i=a.deliveryLines.value;function o(e){return!n||e.deliveryMethodTypes.includes(n)}return i.find(n=>{const r=n.peek(),a=r.deliveryMethodTypes.length>0;return r.type===e&&a&&(!t||r.id===t)&&o(r)})||i.find(e=>o(e.peek()))}function Th(e){const t=Ah(e);return Boolean(t?.fields)}function Lh(e,t){const r=Ah(e,t);return[r?.fields.deliveryMethodTypes.value||[],n(e=>{r&&(r.value={...r.value,deliveryMethodTypes:e})},[r])]}function Nh({type:e="ONE_TIME_PURCHASE",id:t,deliveryMethodType:r}){const a=Ah(e,t,r);return[a?.fields.deliveryMethodHandle.value||void 0,n(e=>{a&&(a.value={...a.value,deliveryMethodHandle:e})},[a])]}function Rh(e,t){const n=Ah(e,t);return r(()=>n?.fields.deliveryMethodOptions.value.phone||S(void 0),[n])}function Mh(e,t){const n=Ah(e,t);return r(()=>n?.fields.deliveryMethodOptions.value.instructions||S(void 0),[n])}function Dh(e,a){const i="ONE_TIME_PURCHASE"===a?"SUBSCRIPTION":"ONE_TIME_PURCHASE",{checkout:{negotiator:o}}=ie(),s=o.current.fields.deliveryNext,l=n(e=>Ue(s.value).filter(qe).find(t=>t.type===e),[s]),c=n((e,t)=>{const n=l(e),r=n?.methods.find(e=>e.methodType===t);if(r)return r},[l]),u=n(t=>{const n=e.find(e=>e.handle===t);if(!n)return;if("PICK_UP"===n.methodType){const e=l(i),t=e?.methods.find(e=>"PICK_UP"===e.methodType&&n.title===e.title);return t?.handle}const r=c(i,n.methodType);return r?.handle},[l,c,i,e]),{deliveryLines:d}=o.parts,p=t(()=>xh({proposedDeliveryLines:d})),m=n(e=>{Ih(d,{[i]:e})},[d,i]),h=p.value;return r(()=>({inverseGroupType:i,inverseGroupDeliveryMethodHandle:h,setInverseGroupDeliveryMethodHandle:m,getInverseGroupDeliveryMethodHandle:u}),[u,h,i,m])}function Oh(){const{checkout:{negotiator:e}}=ie(),{parts:t}=e;return[Oe(t.deliveryLines.peek()),n(e=>{t.deliveryLines.value.forEach(t=>{t.value={...t.value,deliveryMethodTypes:e}})},[t.deliveryLines])]}function zh(){const{negotiate:e}=rc(),{i18n:t,checkout:{negotiator:r}}=ie(),{parts:a}=r,i=ph(),o=Be(),s=bh();return n(({targetDeliveryMethodType:n,merchandiseStableIds:r})=>{const{orphanedMovedToShipping:l,orphanedRemovedFromCartStableIds:c}=Ve({deliveryLines:a.deliveryLines,merchandiseLines:a.merchandiseLines,targetDeliveryMethodType:n,merchandiseStableIds:r,sellableDeliveryMethodsByStableId:o.value.deliveryMethodsByMerchandise,discountLines:a.discountLines});c.length>0?i(t.translate("stock.removed_from_cart_notice")):l&&i(t.translate("split_delivery.items_moved_to_shipping_toast")),s?.dispatch?.("deliveryMethodChanged"),e({silenceViolations:Fe(["deliveryNext","merchandiseLines"])})},[a.deliveryLines,a.merchandiseLines,o,a.discountLines,s,e,i,t])}function Bh(){const{checkout:{negotiator:e}}=ie(),{deliveryLines:t,deliveryMacros:r}=e.parts,{negotiate:a}=rc(),i=xh({proposedDeliveryLines:t,onlyShippingOneTimePurchase:!0}),o=r.value?.length?je(r.value,i):void 0,s=n(async e=>{if(!e||e===o?.id)return;const n=r.value.find(({id:t})=>t===e);return n?(Ih(t,n.deliveryMethodHandles),a({silenceViolations:Fe(["deliveryNext"])})):void 0},[t,r,o,a]);return{selectedMacro:o,setSelectedMacro:s}}function Vh(){const{checkout:{identity:e},shopPay:{config:{tracking:t}}}=ie(),n="shopPay"===e.current.value,a=t.unique,i=t.visit;return r(()=>{if(n)return"undefined"!=typeof window&&window.ShopPay&&(window.ShopPay.trackingUnique=a,window.ShopPay.trackingVisit=i),{trackingUnique:a,trackingVisit:i}},[a,i,n])}const Fh=re("CheckoutSheetProtocolContext"),Uh=re("MobileCheckoutSdkContext");function qh(){const e=h(Fh),t=h(Uh);return null!=e?e:null!=t?t:null}function jh(e){const t=qh();return function(e,t){return null==e||"MERCHANT"===e&&"checkout_started"===t}(t?.config?.type,e)}function Hh(){const{checkout:e,shop:t}=ie();return e.configuration.isUniversalCheckoutFinalizer||t.hasFlagEnabled(He)}function $h(){const{checkout:e,shop:t}=ie();return Hh()&&(e.configuration.isUniversalCheckoutFinalizer||t.hasFlagEnabled($e))}class Yh extends cl{constructor(){super(...arguments),this.name="WebPixelsManagerError"}}
2class Wh extends Error{constructor(){super(...arguments),this.name="WebPixelsManagerCheckoutNativeSdkEnabledError"}}let Gh=null;const Jh=re("webPixels");function Kh({children:e}){const{client:t,embed:n,environment:{services:r},checkout:{identity:l,thankYouEntrance:c,negotiator:u},observability:p,shop:m,mobileCheckoutSdk:h,source:g,router:f}=ie(),y="shopPay"===l.current.value,v=m.hasFlagEnabled(Ye),_=function(){const{shop:e,source:t,checkout:{negotiator:n}}=ie();return o(()=>{const r=n.current.fields.buyerIdentity.value;return{cart:vc({negotiated:n,shop:e,source:t}),customer:yc(r),shop:_c({shop:e}),purchasingCompany:bc(r)}})}(),b=qh(),k=b?.config?.pixelEventsMode,P=n?.configuration?.pixelMode,S=Boolean(n?.isCheckoutKit({includeLegacyCsk:!1})),w="DISABLED"===k||"DISABLED"===P,{checkoutProtocolPresentedSignal:C}=u.context,E=C.value,x=S&&!0===n?.isPreload&&!E,I=$h()&&"settled"!==c.phase.value&&(f.currentUrlMatches("/thank-you")||f.currentUrlMatches("/processing")&&null!=c.progress&&"cancelled"!==c.progress.phase.value),A=r.webPixelsManager.url;r.webPixelsManager.type;const T=r.webPixelsManagerExtensions.url,L=i(),N=i(),R=i(!1),[M]=s(()=>{const e=new Promise((e,t)=>{L.current=e,N.current=t});return e.catch(()=>{}),e}),D={[tt]:m.hasFlagEnabled(tt),[et]:m.hasFlagEnabled(et),[Ze]:m.hasFlagEnabled(Ze),[Xe]:m.hasFlagEnabled(Xe),[Qe]:m.hasFlagEnabled(Qe),[Ke]:m.hasFlagEnabled(Ke),[Je]:m.hasFlagEnabled(Je),[Ge]:m.hasFlagEnabled(Ge),[We]:m.hasFlagEnabled(We)},O=Object.entries(D).filter(([e,t])=>t).map(([e])=>e),[z]=s({async publish(e,t,n){try{return(await M).publish(e,t,n)}catch{return!1}},async publishCustomEvent(e,t,n){try{return(await M).publishCustomEvent(e,t,n)}catch{return!1}},async publishDomEvent(e,t,n){try{return(await M).publishDomEvent(e,t,n),{type:"success"}}catch(r){return{type:"error",message:r.message}}},async subscribe(e,t,n){try{return(await M).subscribe(e,t,n)}catch{return()=>!1}},async visitor(e,t){try{return(await M).visitor(e,t),{type:"success"}}catch(n){return{type:"error",message:n.message}}}});return a(()=>{const e=e=>{p.log("web_pixel_manager_init",`WebPixelsProvider init: ${e}`,{outcome:e,shopAppDomain:y},{exportImmediately:"loading"!==e})};if(null===m.webPixelConfigurations)return e("web_pixel_configurations_null");if(!m.storefrontUrl)return e("storefront_url_missing");const r=Boolean(nt(navigator.userAgent));if(r&&!v)return e("shop_mobile_app_context");const a=y||r;if("disabled"===m.webPixelManagerVersion)return e("wpm_version_disabled");const i=a?[]:m.webPixelConfigurations;if(w)return N.current?.(new Wh("Checkout SDK enabled for partner with pixels suppressed")),void e("pixels_suppressed_by_config");if(x||R.current)return void(x&&!R.current&&e("deferred_for_preload"));if(I)return void e("deferred_for_thank_you");if(R.current=!0,e("loading"),"undefined"!=typeof PerformanceMark)try{window.performance.mark("wpm:start")}catch{}const o=h.variant.isStandard(),s=!n?.isFlagshipPartner&&Boolean(n?.isCheckoutSheetKit),l=function({shopAppDomain:e,isNativeShopApp:t,isCheckoutKit:n,isSdkSurface:r}){let a=n?"checkout-kit":"checkout-one";return r&&(a+="-sdk"),t?a+="-native-shop-app":e&&(a+="-shop-app"),a}({shopAppDomain:y,isNativeShopApp:r,isCheckoutKit:S,isSdkSurface:o||s});try{const e=function({storefrontBaseUrl:e,shopId:t,webPixelConfigurations:n,webPixelManagerVersion:r,initData:a,enabledBetaFlags:i=[],surface:o,monorailRegion:s,sriMap:l,managerBaseUrl:c,extensionsUrl:u,apiClientId:d,checkoutToken:p,facebookCapiEnabled:m=!1}){if(Gh)return Gh;const h=parseInt(le(t),10),g=function(){const{modern:e,legacy:t}={modern:/Edge?\/(1{2}[4-9]|1[2-9]\d|[2-9]\d{2}|\d{4,})\.\d+(\.\d+|)|Firefox\/(1{2}[4-9]|1[2-9]\d|[2-9]\d{2}|\d{4,})\.\d+(\.\d+|)|Chrom(ium|e)\/(9{2}|\d{3,})\.\d+(\.\d+|)|(Maci|X1{2}).+ Version\/(15\.\d+|(1[6-9]|[2-9]\d|\d{3,})\.\d+)([,.]\d+|)( \(\w+\)|)( Mobile\/\w+|) Safari\/|Chrome.+OPR\/(9{2}|\d{3,})\.\d+\.\d+|(CPU[ +]OS|iPhone[ +]OS|CPU[ +]iPhone|CPU IPhone OS|CPU iPad OS)[ +]+(15[._]\d+|(1[6-9]|[2-9]\d|\d{3,})[._]\d+)([._]\d+|)|Android:?[ /-](13\d|1[4-9]\d|[2-9]\d{2}|\d{4,})(\.\d+|)(\.\d+|)|Android.+Firefox\/(13\d|1[4-9]\d|[2-9]\d{2}|\d{4,})\.\d+(\.\d+|)|Android.+Chrom(ium|e)\/(13\d|1[4-9]\d|[2-9]\d{2}|\d{4,})\.\d+(\.\d+|)|SamsungBrowser\/([2-9]\d|\d{3,})\.\d+/,legacy:/Edge?\/(1[6-9]|[2-9]\d|\d{3,})\.\d+(\.\d+|)|Firefox\/(5[4-9]|[6-9]\d|\d{3,})\.\d+(\.\d+|)|Chrom(ium|e)\/(5[1-9]|[6-9]\d|\d{3,})\.\d+(\.\d+|)([\d.]+$|.*Safari\/(?![\d.]+ Edge\/[\d.]+$))|(Maci|X1{2}).+ Version\/(10\.\d+|(1[1-9]|[2-9]\d|\d{3,})\.\d+)([,.]\d+|)( \(\w+\)|)( Mobile\/\w+|) Safari\/|Chrome.+OPR\/(3[89]|[4-9]\d|\d{3,})\.\d+\.\d+|(CPU[ +]OS|iPhone[ +]OS|CPU[ +]iPhone|CPU IPhone OS|CPU iPad OS)[ +]+(10[._]\d+|(1[1-9]|[2-9]\d|\d{3,})[._]\d+)([._]\d+|)|Android:?[ /-](13\d|1[4-9]\d|[2-9]\d{2}|\d{4,})(\.\d+|)(\.\d+|)|Mobile Safari.+OPR\/([89]\d|\d{3,})\.\d+\.\d+|Android.+Firefox\/(13\d|1[4-9]\d|[2-9]\d{2}|\d{4,})\.\d+(\.\d+|)|Android.+Chrom(ium|e)\/(13\d|1[4-9]\d|[2-9]\d{2}|\d{4,})\.\d+(\.\d+|)|Android.+(UC? ?Browser|UCWEB|U3)[ /]?(15\.([5-9]|\d{2,})|(1[6-9]|[2-9]\d|\d{3,})\.\d+)\.\d+|SamsungBrowser\/(5\.\d+|([6-9]|\d{2,})\.\d+)|Android.+MQ{2}Browser\/(14(\.(9|\d{2,})|)|(1[5-9]|[2-9]\d|\d{3,})(\.\d+|))(\.\d+|)|K[Aa][Ii]OS\/(3\.\d+|([4-9]|\d{2,})\.\d+)(\.\d+|)/},n=navigator.userAgent;return n.match(e)?"modern":n.match(t)?"legacy":"unknown"}(),f="modern"===g?"modern":"legacy",y=`${c}/b${r}${f.substring(0,1)}.js`,v=`${u}/cdn/shopifycloud/web-pixels-manager`,_=document.createElement("script");_.setAttribute("async","true"),_.setAttribute("src",y);const b={shopId:h,storefrontBaseUrl:e,extensionsBaseUrl:v,browserTarget:g,surface:o,enabledBetaFlags:JSON.stringify(i),hashVersion:r,publish:"all",...null!=d&&{apiClientId:String(d)},...p&&{checkoutToken:p},...a.customer?.id&&{customerId:a.customer.id},facebookCapiEnabled:String(m)};b.trekkieShim="true";for(const P in b)if(Object.prototype.hasOwnProperty.call(b,P))try{_.dataset[P]=String(b[P])}catch{}const k=l[f];return k&&(_.setAttribute("integrity",k),_.setAttribute("crossorigin","anonymous")),Gh=new Promise((t,r)=>{if(_.onload=()=>
2{if(Boolean(window.Shopify?.analytics?.initialized))return;if(null==window.webPixelsManager||!("init"in window.webPixelsManager))return void r(new Yh("WebPixelManager is not available"));const l=window.webPixelsManager.init({shopId:h,storefrontBaseUrl:e,extensionsBaseUrl:v,surface:o,webPixelsConfigList:n.map(e=>{const t=e.dataSharingAdjustments&&{dataSharingAdjustments:e.dataSharingAdjustments},n=e.integrityHash&&{integrityHash:e.integrityHash};return{configuration:e.configuration,eventPayloadVersion:e.eventPayloadVersion,id:e.idTmp,runtimeContext:e.runtimeContext,scriptVersion:e.scriptVersion,type:e.type,apiClientId:e.apiClientId,privacyPurposes:e.purposes,name:e.name,capabilities:e.capabilities||[],enabledFlags:e.enabledFlags||[],dataSharingState:e.dataSharingState,...t,...n}}),initData:a,enabledBetaFlags:i,monorailRegion:s});window.Shopify||={},window.Shopify.analytics||={},window.Shopify.analytics.publish=l.publishCustomEvent,window.Shopify.analytics.initialized=!0,t(l)},_.onerror=()=>{r(new Yh(`Failed to load WebPixelManager runtime from ${y}`))},document.querySelector(`script[src="${_.src}"]`))r(new Yh("WebPixelsProvider::WebPixelsManagerError::ScriptAlreadyPresent",{groupingHash:"WebPixelsProvider::WebPixelsManagerError::ScriptAlreadyPresent"}));else try{document.body.appendChild(_)}catch{throw new Yh("WebPixelsProvider::WebPixelsManagerError::ScriptAppendError",{groupingHash:"WebPixelsProvider::WebPixelsManagerError::ScriptAppendError"})}}),Gh}({storefrontBaseUrl:m.storefrontUrl,shopId:m.id,webPixelConfigurations:i,webPixelManagerVersion:m.webPixelManagerVersion,initData:_,enabledBetaFlags:O,surface:l,sriMap:m.webPixelsManagerSriMap,managerBaseUrl:A,extensionsUrl:T,apiClientId:t.unstable_getSerialization("apiClientId")??void 0,checkoutToken:hc(g)||g.sourceId,facebookCapiEnabled:m.facebookCapiEnabled??!1});let n=!0;e.then(e=>{if(!L.current)throw N.current?.(),new Yh("WebPixelsManager: webPixelsPromiseResolveRef.current is undefined");L.current(e)}).catch(e=>{n=!1,p.log("web_pixels_context_manager_load_error_triggered",`WebPixelsProvider::WebPixelsManagerError::LoadError with error: ${e?.message}`)}).finally(()=>{p.counter({name:"web_pixel_manager_load",value:1,attributes:{status:n?"success":"failed",surface:l}})})}catch(c){N.current?.(c),p.counter({name:"web_pixel_manager_load",value:1,attributes:{status:"failed",surface:l}})}},[x,I]),d(Jh.Provider,{value:z,children:e})}function Qh(){return ae(Jh)}const Xh=new Map([[6167201,"hydrogen"],[12875497473,"headless"],[88312,"buy_button"],[1354745,"draft_order"]]);function Zh(e,t,n){const r=new Set([129785,6517121,757165]),a=new Set([3890849,3850711,5198245]);return Xh.has(e)?Xh.get(e):r.has(e)?"retail":a.has(e)?"shop_app":t===rt.CartPermalink?"permalink":580111===e?"online_store":n}function eg(){const e=window,t=e?.ShopifyAnalytics?.lib;return t?.trekkie?.defaultAttributes}function tg({eventName:e,checkoutType:t,walletName:r,progressionStepName:a,redirectSource:i,trackingUnique:o,trackingVisit:s}){const{client:l,checkout:c,consentManager:u,i18n:d,observability:p,userEvents:m,shop:h,source:g}=ie(),{id:f}=h,y=c.negotiator.current.fields.buyerIdentity.value?.customerProfile,v=jh(e),_=qh(),b=_?.config?.type,k=parseInt(le(f),10),P=l.unstable_getSerialization("apiClientId")??0,S=o??(l.cookies.get("_shopify_y")||void 0),w=s??(l.cookies.get("_shopify_s")||void 0);return n(()=>{const n=u.analyticsProcessingAllowed.value,o=u.marketingAllowed.value,s=Boolean(n||o),l={eventName:e,buyerConsentAnalyticsAllowed:n,buyerConsentMarketingAllowed:o,progressionStepName:a,userToken:S,walletName:r};if(!("checkout_started"===e&&"ShopifyPay"===r||s)||!v)return p.counter({name:"checkout_lifecycle_events_blocked_by_privacy",value:1,attributes:{eventName:e,application:"checkout-web"}}),void p.log("checkout_lifecycle_events_not_emitting_event","checkout_lifecycle_events.not_emitting_event",{logPayload:l});const h="contact_information"===a?1:void 0,f=ng(g.type),_=f?g.sourceId:void 0,C=c.configuration.profileId.value,E=function({eventName:e,walletName:t,shopId:n,checkoutSessionIdentifier:r="default",checkoutProfileId:a,trackingVisitToken:i,userToken:o,sourceId:s,sourceType:l,customerId:c,apiClientId:u=0,checkoutType:d,currency:p,locale:m,progressionStepName:h,progressionStepNumber:g,redirectSource:f,checkoutProtocolType:y,consentManager:v}){const _=eg(),b="MERCHANT"===y?{apiName:"mobile_checkout_sdk_merchant",checkoutType:Zh(u,f,"a
2pi")}:{};return{schemaId:"checkout_lifecycle_events/7.7",payload:{checkoutChainToken:r||"default",checkoutProfileId:a,eventName:e,checkoutType:Zh(u,f),checkoutExperience:t?"wallet":"web",entryPoint:"checkout",checkoutPlatform:"checkout_one",checkoutVersion:[d],walletName:t,apiClientId:u||0,currency:p||_?.currency,shopId:n,customerId:c,sourceId:s,sourceType:l,userToken:o||_?.uniqToken,deprecatedVisitToken:i||_?.visitToken,referrer:_?.referer,userAgent:navigator.userAgent,contentLanguage:m,eventTime:(new Date).toISOString(),progressionStepName:h,progressionStepNumber:g,buyerConsentAnalyticsAllowed:v.analyticsProcessingAllowed.value,buyerConsentSaleOfDataAllowed:v.saleOfDataAllowed.value,buyerConsentMarketingAllowed:v.marketingAllowed.value,...b}}}({eventName:e,walletName:r,shopId:k,checkoutSessionIdentifier:g.checkoutSessionIdentifier,checkoutProfileId:C?parseInt(le(C),10):void 0,trackingVisitToken:w,userToken:S,sourceId:_,sourceType:f,customerId:y?.id?parseInt(le(y.id),10):void 0,apiClientId:P,checkoutType:t,currency:d.currency,locale:d.locale,progressionStepName:a,progressionStepNumber:h,redirectSource:i,checkoutProtocolType:b,consentManager:u}),x=E.payload.entryPoint;p.log("checkout_lifecycle_events_emitting_event","checkout_lifecycle_events.emitting_event",{...l,progressionStepNumber:h,"context.sourceType":g.type,"context.sourceId":g.sourceId,checkoutType:t,entryPoint:x}),m.monorailEvent(E),p.counter({name:"checkout_lifecycle_events_emitted",value:1,attributes:{application:"checkout-web",eventName:e,checkoutType:g.type,isWallet:r?"true":"false",...r?{walletName:r}:{}}})},[e,a,S,r,k,g,c.configuration.profileId,w,y?.id,P,t,d,i,p,m,v,b,u])}function ng(e){const t={orderEdit:"order",paymentCollection:"paymentCollection",cartNext:"cart",checkout:"checkout",abandonedCart:"abandoned_cart",simulated:"simulated",draftOrder:"draft_order",buyItNow:void 0,shopPayExternal:void 0,other:void 0};return Object.keys(t).includes(e)?t[e]:void 0}function rg(e){return tg({eventName:"checkout_progression",checkoutType:ie().checkout.configuration.layout.isOnePage.value?"one_page":"three_page",walletName:e,progressionStepName:"contact_information"})}function ag(e,t,n,r){return tg({eventName:"checkout_started",checkoutType:ie().checkout.configuration.layout.isOnePage.value?"one_page":"three_page",walletName:e,redirectSource:t,trackingUnique:n,trackingVisit:r})}var ig=(e=>(e.Lifecycle="checkout_lifecycle_events/7.7",e))(ig||{});class og{constructor({observability:e,userEvents:t,shopPay:n,isShopPayActive:r,router:a,consentManager:i,shouldEmitEvent:o=!0,context:s,target:l}){this.acceptableEventType=new Set(["pageViewed","sectionComplete","shippingMethodsFilled","sectionInteraction","dom_clicked"]),this.#l=!0,this.#c=e,this.#u=t,this.#d=n,this.#p=r,this.#m=a,this.#h=i,this.#l=o,this.#g=s,this.#f=l}#c;#u;#d;#p;#m;#h;#l;#g;#f;willAccept(e){return this.acceptableEventType.has(e.type)}transmit(e){if(!this.#l||!this.#y(e))return this.#c.counter({name:"checkout_lifecycle_events_blocked_by_privacy",value:1,attributes:{eventName:"checkout_progression",application:"checkout-web"}}),void this.#v(!1);const t=this.#_(e);t&&void 0!==t.progressionStepName&&void 0!==t.progressionStepNumber&&(this.#v(!0,t),this.#u.monorailEvent({schemaId:ig.Lifecycle,payload:t}),this.#c.counter({name:"checkout_lifecycle_events_emitted",value:1,attributes:{application:"checkout-web",eventName:"checkout_progression",checkoutType:t.checkoutType,isWallet:t.walletName?"true":"false",...t.walletName?{walletName:t.walletName}:{}}}))}transmitImmediately(e){if(!this.#l||!this.#y(e))return this.#c.counter({name:"checkout_lifecycle_events_blocked_by_privacy",value:1,attributes:{eventName:"checkout_progression",application:"checkout-web"}}),void this.#v(!1);const t=this.#_(e);t&&void 0!==t.progressionStepName&&void 0!==t.progressionStepNumber&&(this.#v(!0,t),this.#u.monorailEvent({schemaId:ig.Lifecycle,payload:t},{exportImmediately:!0}),this.#c.counter({name:"checkout_lifecycle_events_emitted",value:1,attributes:{application:"checkout-web",eventName:"checkout_progression",checkoutType:t.checkoutType,isWallet:t.walletName?"true":"false",...t.walletName?{walletName:t.walletName}:{}}}))}#_(e){const{context:t,type:n}=e;this.#g=t,this.#f=at(this.#b(t),{isShopPayActive:this.#p,shopPay:this.#d});const r=this.#k(e.timestamp);if(!r)return null;if(this.#P()){if("pageViewed"===n){if(this.#S()){const[e,t]=this.#w("contact");return{...r,progressionStepName:e,progressionStepNumber:t}}if(this.#C()){const[e,t]=this.#w("review");return{...r,progressionStepName:e,progressionStepNumber:t}}}if("shippingMethodsFilled"===n){const[e,t]=this.#w("shipping");return{...r,progressionStepName:e,progressionStepNumber:t,...this.#E()}}if("sectionInteraction"===n&&"payment"===e.section){const[e,t]=this.#w("payment");return{...r,progressionStepName:e,progressionStepNumber:t}}
2if("dom_clicked"===n){if("summary_pay_button"===e.element.id){if(this.#g.reviewPageRequired){const[e,t]=this.#w("review_order_clicked");return{...r,progressionStepName:e,progressionStepNumber:t}}{const[e,t]=this.#w("pay_now_clicked");return{...r,progressionStepName:e,progressionStepNumber:t}}}if("review_pay_button"===e.element.id){const[e,t]=this.#w("pay_now_clicked");return{...r,progressionStepName:e,progressionStepNumber:t}}}}if(this.#x()){if("pageViewed"===n&&this.#I()){const[e,t]=this.#w(this.#g.step);return{...r,progressionStepName:e,progressionStepNumber:t,..."shipping"===e?this.#E():{}}}if("dom_clicked"===n){if("payment_go_to_next_step"===e.element.id){const[e,t]=this.#w(this.#g.reviewPageRequired?"review_order_clicked":"pay_now_clicked");return{...r,progressionStepName:e,progressionStepNumber:t}}if("review_go_to_next_step"===e.element.id){const[e,t]=this.#w("pay_now_clicked");return{...r,progressionStepName:e,progressionStepNumber:t}}}}return null}#b(e){const t=this.#m.currentUrl.value;return e.pathname?new URL(e.pathname,t):t}#k(e){if(!this.#g)return null;const t=ng(this.#g.sourceType),n=t?this.#g.sourceId:void 0;return{userToken:this.#g.userToken,apiClientId:this.#g.apiClientId,sourceId:n,sourceType:t,currency:this.#g.currency,shopId:parseInt(le(this.#g.shopId),10),checkoutChainToken:this.#g.checkoutToken,checkoutProfileId:this.#g.checkoutProfileId,checkoutExperience:"web",checkoutPlatform:"checkout_one",eventName:"checkout_progression",deprecatedVisitToken:this.#g.trackingVisit,requestId:this.#g.requestId,checkoutVersion:[this.#P()?"one_page":"three_page",this.#g.workerVersion,this.#g.serverHandling],checkoutType:Zh(this.#g.apiClientId),entryPoint:void 0,eventTime:e.toISOString(),buyerConsentAnalyticsAllowed:this.#A(),buyerConsentSaleOfDataAllowed:this.#T(),buyerConsentMarketingAllowed:this.#L()}}#y(e){const t=e.context.consent;return t?(n=t,Boolean(n.analyticsProcessingAllowed||n.marketingAllowed)):Boolean(this.#A()||this.#L());var n}#A(){return this.#h.analyticsProcessingAllowed.value}#T(){return this.#h.saleOfDataAllowed.value}#L(){return this.#h.marketingAllowed.value}#w(e){const{shippingRequired:t,reviewPageRequired:n}=this.#g||{};let r=2;t&&(r=3);let a=r+1;n&&(a=r+3);const i=r+1;switch(e){case"information":case"contact":case"deliveryAddress":return["contact_information",1];case"shipping":case"delivery":return["shipping",2];case"payment":return["payment",r];case"pay_now_clicked":return["pay_now_clicked",a];case"review_order_clicked":return["review_order_clicked",i];case"review":return["review",t?5:4];default:return[void 0,void 0]}}#P(){return"c1_redesign"===this.#g?.sourceDesign}#x(){return"c1_legacy"===this.#g?.sourceDesign}#C(){return this.#f&&/review/.test(this.#f)}#I(){return["information","shipping","payment","review"].some(e=>this.#f&&new RegExp(e).test(this.#f))}#S(){return this.#f&&/information/.test(this.#f)}#E(){return this.#g?{shippingMacroCostLocal:String(this.#g.selectedDeliveryMacro?.cost?.amount),shippingMacroList:this.#g.deliveryMacros?.map(({id:e})=>e),numDeliveryLines:[this.#g.deliveryLines?.filter(({type:e})=>"ONE_TIME_PURCHASE"===e).length||0,this.#g.deliveryLines?.filter(({type:e})=>"SUBSCRIPTION"===e).length||0],shippingMacroSelected:this.#g?.selectedDeliveryMacro?.id}:{}}#v(e,t){const n={buyerConsentAnalyticsAllowed:this.#A(),buyerConsentMarketingAllowed:this.#L()};e&&t?this.#c.log("buyer_progression_events_adapter_event_transmitted","Emitting checkout lifecycle event",{...n,progressionStepName:t.progressionStepName,progressionStepNumber:t.progressionStepNumber,userToken:t.userToken,"context.sourceType":this.#g?.sourceType,"context.sourceId":this.#g?.sourceId,"context.apiClientId":this.#g?.apiClientId}):this.#c.log("buyer_progression_events_adapter_event_not_transmitted","Not emitting checkout lifecycle event",n)}}class sg extends Error{constructor(e){super(`Unknown event type: ${e}`),this.name="UnknownEventTypeError"}}function lg(e){return{shopId:le(e.shopId),checkoutToken:e.checkoutSessionIdentifier?le(e.checkoutSessionIdentifier):void 0,customerId:e.customerId?le(e.customerId):void 0}}function cg(e,t){try{switch(e.eventTypeName){case"shopify.apps.app_runtime.AppRuntimeClientEvent":return function(e,t){switch(e.type){case"UI_EXTENSION_ERROR":return function(e,t){const n=it(e.extensionTarget);return{event:{eventTypeName:e.eventTypeName,type:e.type,apiVersion:e.apiVersion,appId:le(e.appId),appApiKey:e.appApiKey,appVersion:e.appVersion,code:e.code,errorName:e.errorName,extensionId:e.extensionId?le(e.extensionId):void 0,registrationId:e.registrationId,message:e.message,schemaVersion:e.schemaVersion,extensionTarget:n,placementReference:e.placementReference,context:e.context},context:lg(t),__brand:"PreparedEventRefineryPayload"}}(e,t);case"UI_EXTENSION_MOUNT_START":case"UI_EXTENSION_MOUNT_END":return function(e,t){const n=it(e.extensionTarget);
2return{event:{...e,appId:le(e.appId),extensionId:e.extensionId?le(e.extensionId):void 0,extensionTarget:n},context:lg(t),__brand:"PreparedEventRefineryPayload"}}(e,t);case"UI_EXTENSION_FETCH":return function(e,t){const n=it(e.extensionTarget);return{event:{eventTypeName:e.eventTypeName,type:e.type,apiVersion:e.apiVersion,appId:le(e.appId),appApiKey:e.appApiKey,appVersion:e.appVersion,extensionId:e.extensionId?le(e.extensionId):void 0,registrationId:e.registrationId,extensionTarget:n,placementReference:e.placementReference,durationMs:e.durationMs,httpStatus:e.httpStatus,httpMethod:e.httpMethod,requestUrl:e.requestUrl,context:e.context},context:lg(t),__brand:"PreparedEventRefineryPayload"}}(e,t);default:throw new sg(e.type)}}(e,t);case"shopify.event.BuyerEvent":return function(e,t){return{event:{eventTypeName:e.eventTypeName,type:e.type,checkoutToken:e.checkoutToken},context:lg(t),__brand:"PreparedEventRefineryPayload"}}(e,t);case"shopify.advertising.incentives.IncentivePresentedEvent":return function(e,t){return{event:e,context:lg(t),__brand:"PreparedEventRefineryPayload"}}(e,t);default:throw new sg(e.eventTypeName)}}catch(n){return{__brand:"PreparedEventRefineryPayload",error:n}}}class ug{constructor(e){this.acceptableEventTypes=new Set(["alertDisplayed","uiExtensionError"]),this.#u=e.userEvents,this.#N=e.source}#u;#N;willAccept(e){return this.acceptableEventTypes.has(e.type)}transmit(e){const{context:t}=e,n=hc(this.#N),r=parseInt(le(t.shopId),10),a={pageUrl:t.href??window.location.href,shopId:r,checkoutToken:n?le(n):"",eventName:e.type,userToken:t.userToken};if("alertDisplayed"===e.type){const{target:t,value:n,errorType:r,message:i}=e;this.#u.monorailEvent({schemaId:"checkout_error_capture/1.0",payload:{...a,errorTarget:t,errorValue:n??void 0,errorType:r,errorMessage:i}})}if("uiExtensionError"===e.type){const{apiVersion:r,appId:i,appName:o,appVersion:s,extensionName:l,placementReference:c,extensionTarget:u,trace:d,code:p,message:m}=e;this.#u.monorailEvent({schemaId:"checkout_error_capture/1.0",payload:{...a,extensionApiVersion:r,extensionAppId:i,extensionAppName:o??"",extensionAppVersion:s,extensionName:l,extensionPlacementReference:c??"",errorTarget:u,errorTrace:d??"",errorType:p,errorMessage:m}}),"local"!==e.extensionType&&this.#u.refineryEvent(cg({...void 0===e.placementReference?{extensionTarget:e.extensionTarget,placementReference:void 0}:{extensionTarget:e.extensionTarget,placementReference:e.placementReference},eventTypeName:"shopify.apps.app_runtime.AppRuntimeClientEvent",type:"UI_EXTENSION_ERROR",apiVersion:e.apiVersion,appId:e.appId,appApiKey:e.appApiKey,appVersion:e.appVersion,code:e.code,errorName:e.errorName,extensionId:e.extensionId,registrationId:e.registrationId,message:e.message,schemaVersion:1,context:e.context},{shopId:t.shopId,checkoutSessionIdentifier:n,customerId:t.customerId}))}}}const dg="checkout_c1_extension_skeleton_dimensions/3.4";class pg{constructor(e,t,n=!0){this.client=e,this.userEvents=t,this.shouldEmitEvent=n}transmit(e){this.shouldEmitEvent&&"extensionDimension"===e.type&&(this.userEvents.monorailEvent({schemaId:dg,payload:this.mapEventToMonorailSchema(e)}),this.client.counter({name:"extension_dimension_event",value:1,attributes:{skeleton_size:e.skeletonSize,extension_size:e.extensionSize,skeleton_size_source:e.skeletonSizeSource,skeleton_size_match:e.skeletonSizeMatch,extension_type:e.extension.type}}))}willAccept(e){return"extensionDimension"===e.type}transmitImmediately(e){this.shouldEmitEvent&&"extensionDimension"===e.type&&(this.userEvents.monorailEvent({schemaId:dg,payload:this.mapEventToMonorailSchema(e)},{exportImmediately:!0}),this.client.counter({name:"extension_dimension_event",value:1,attributes:{skeleton_size:e.skeletonSize,extension_size:e.extensionSize,skeleton_size_source:e.skeletonSizeSource,skeleton_size_match:e.skeletonSizeMatch,extension_type:e.extension.type}}))}mapEventToMonorailSchema(e){const{context:t,extension:n}=e;return{userToken:t.userToken,customerId:t.customerId,shopId:parseInt(le(t.shopId),10),sessionToken:t.sessionToken,checkoutToken:t.checkoutToken,apiClientId:t.apiClientId,deviceType:t.deviceType,locale:t.locale,currency:t.currency,browser:t.browser,browserConnectionType:t.browserConnectionType,extensionInstanceId:e.extensionInstanceId,step:e.page,pageLoadId:t.pageLoadId,extensionId:n.extensionId,extensionApiClientId:n.appId,extensionRegistrationId:n.registrationId,extensionType:n.type,extensionPoint:n.extensionPoint.target,extensionPlacementReference:n.placementReference,extensionWidth:e.width,extensionHeight:e.height,viewportWidth:e.viewportWidth,viewportHe
2ight:e.viewportHeight,extensionPositionX:e.positionX,extensionPositionY:e.positionY,publicIdentifier:e.targetPublicIdentifier||e.publicIdentifier,targetPublicIdentifier:e.targetPublicIdentifier,skeletonHeight:e.skeletonHeight,countryCode:e.countryCode,configurationRecordId:t.checkoutProfileId}}}const mg=new Set(["941ed414-846b-48da-ba78-f015038d42a1","b837b75c-d827-4a16-9fe6-0b556bbbcfa2","bead5f8a-a991-4378-8ac3-b757353d3423","3caac7fb-9307-42ea-ad62-5bddbc7fb6c9","800c1727-ae5b-4f7d-be6c-502933f9257d","2382db67-d84b-4c12-a2a7-2ae97e93f8aa","22d72ba7-bed0-4301-9eb1-50b47b797d65","9b1870d3-fdc9-4b48-9143-2dc2715e5f48","62ea86bc-927b-492c-a434-af86abdffa37","df2e3eb6-8403-4239-a060-586ad8e84c4c","9ad836e8-e0d7-41c9-b46e-323373cad94f","cd33b11c-1347-4482-9468-35d3c2466ece","a5f4f09b-f177-41c6-b9f2-4c5af0a06756","742df6b1-ec95-47f4-9bab-c39cff66fa64","580e5211-39d7-4f9b-9feb-61966d75d7d6","90d86972-4f99-40aa-a733-81fb169e125a"]),hg=new Set([...mg,"de6f8c7c-99d4-4ed7-bef3-9bc5485e5afa","81ef0db5-f008-4775-abf0-9eea53e348b9","5a4dcc13-5e28-43d3-8fe0-9047c8b1e9a1","36d82657-0623-44a6-a765-ca8ca2bb1d70","68757a68-0d13-43c7-9d92-389fa35ceae9","fe246ebb-49e3-49f6-bf7b-62a1bfd3fd0c","c2efdc0e-0538-4111-ba60-c300fce86c62","756d9412-1da6-41a5-b317-f590511ead72","cb60c3d0-6406-4e9c-9558-b5088a3f8610","7aaf94fa-1c49-48eb-ad72-32c7d9a3c1da","3f51fa85-5bda-4dbb-bd3a-15711c90bff2","1b8ddc3b-7fb7-46c7-aa56-c5b359d5005c","6cff6580-7b31-4bf4-86de-daea0d733c8d","b6873cb2-1546-469d-921b-f64ecbd95548","4ded2224-9d1e-4861-8c10-bee777c11f7c","d65d9a59-47d0-4bde-a637-4d2df8354d1c","2b415f2a-38a2-4bb1-8df6-509443baef72","1d0d6217-e99f-4c5a-b0c0-f0a0acb29072","f2f6b43a-dc2b-4583-b5df-1023da235bde","7437505c-bad7-4735-977b-c32c56e7a92d","d20aee3b-4068-409d-ad66-88032bd6ee0f","ad9dbcd5-9772-48cc-a914-8a672640661a","86c7aec0-d984-4bdd-b30d-73068c7de1a2","7dd5c930-e1a5-49d7-a9cd-6aa012abd302","d6796644-c5fa-4454-8043-e927276c22f6","3a5daf6a-54b6-40f9-a665-d95de608415b","9b2c4a74-34c5-4394-b13c-74d689e45675","1a828591-4b2f-4784-adf7-c314917c8eb9","c602fcb4-51ba-4524-a0a7-55288b7f810a","baed0a29-534e-4f7f-8123-c72e0ef0a0bd","b64f0497-e450-453a-898f-6e3181fadaed","4aea3abe-18e4-4902-a9e8-241f92c98e4b","b1a20474-31b5-496c-93d9-856734fe321a","d00e75dc-b367-40f9-a37a-95a89a875e9f","6200a1a6-b4a0-4d2b-9733-ab7cccf2aa59","e7e403b2-970f-4341-9ed0-f10f54fc1f33","54aedcf6-a0a7-4ccf-8572-bbbfe9230037","db5704ac-aa91-4fd8-9fae-0e80b98f0882","b471b42d-8e9a-457f-a3c0-88d8e479bb8d","dc14e7f0-c251-4287-ae5e-d6e9f88f3b23","35563e44-df53-4ac0-8562-3710c5f82d8b","506f9167-3a90-463a-a58d-558988306e6b","a6a1267a-f3dc-425b-990b-811748126dc1","b69beea0-269d-4448-84b9-d99e5c05e833","c44a7a57-1140-4fc4-aa9a-8058f665287c","319648e8-8032-48a2-ac6e-ce2f58f8a553","df4e106f-4b61-4585-b3eb-5a53dd01d89e","2f3f3eea-fc1f-4dd7-8f34-26bd31d5163f","12d50b8f-7ef5-4eac-b347-561b9bacd485","e1e4907d-6174-4760-a073-761a6eab7baf"]);class gg{#c;#u;#N;constructor(e){this.#c=e.observability,this.#u=e.userEvents,this.#N=e.source}willAccept(e){return"extensionFetchCall"===e.type}transmit(e){if(!this.willAccept(e))return;const t=e,n=this.#R(t.httpStatus),r="registrationId"in t.extension?t.extension.registrationId:void 0,a=null!=r&&hg.has(r),i={destination:t.destination,isHighValueExtension:a,...n&&{http_status_bucket:n},...t.errorType&&{error_type:t.errorType}},o=t.duration??0;if(this.#c.histogram({name:"extension_fetch_call_duration",value:o,unit:"ms",attributes:i}),a&&"type"in t.extension&&"registrationId"in t.extension&&("persisted"===t.extension.type||"global"===t.extension.type)&&this.#c.log("extension_fetch_call_duration","Extension fetch call duration",{value:o,unit:"ms",appId:t.extension.appId,extensionRegistrationId:t.extension.registrationId,...i}),"local"!==t.extension.type&&"storefront"!==t.destination){const e=hc(this.#N);this.#u.refineryEvent(cg({eventTypeName:"shopify.apps.app_runtime.AppRuntimeClientEvent",type:"UI_EXTENSION_FETCH",apiVersion:t.extension.apiVersion,appId:t.extension.appId,appApiKey:t.extension.appApiKey,appVersion:t.extension.version,extensionId:t.extension.extensionId,registrationId:t.extension.registrationId,extensionTarget:t.extension.extensionPoint.target,placementReference:t.extension.placementReference,durationMs:t.duration,httpStatus:t.httpStatus,httpMethod:t.httpMethod,requestUrl:t.requestUrl,context:t.context},{shopId:t.context.shopId,checkoutSessionIdentifier:e,customerId:t.context.customerId}))}}transmitImmediately(e){this.transmit(e)}#R(e){if(void 0!==e)return String(100*Math.floor(e/100))}}class fg{#N;#u;constructor(e){this.#N=e.source,this.#u=e.userEvents}willAccept(e){if("extensionLifecycle"!==e.type)return!1;const{extension:t,phase:n}=e;return("mountStart"===n||"mountSuccess"===n||"mountError"===n)&&null!=t}transmit(e){if(!this.willAccept(e))return;const{extension:t,mountId:n}=e,r=hc(this.#N),a={...void 0===t.placementReference?{extensionTarget:t.extensionPoint.target,placementReference:void 0}:{extensionTarget:t.extensionPoint.target,placementReference:t.placementReference},eventTypeName:"shopify.apps.app_runtime.AppRuntimeClientEvent",apiVersion:t.apiVersion,appId:t.appId,appApiKey:t.appApiKey,appVersion:t.version,extensionId:t.extensionId,mou
2ntId:n,registrationId:t.registrationId,schemaVersion:1,context:e.context};let i;var o;i="mountStart"===e.phase?{...a,type:"UI_EXTENSION_MOUNT_START"}:{...a,type:"UI_EXTENSION_MOUNT_END",durationMs:e.duration??0,...e.error?.name&&{failureErrorName:e.error.name},mountOutcome:"mountSuccess"===e.phase?"SUCCESS":(o=e.error,o?.name&&ot(o.name)?"APP_FAILURE":"OTHER_FAILURE")},this.#u.refineryEvent(cg(i,{shopId:e.context.shopId,checkoutSessionIdentifier:r,customerId:e.context.customerId}))}}const yg=["buyerUsable","timeToFirstMeaningfulCheckoutInteraction","apiObjectEnd","apiRead","appMetafieldsLoadEnd","sandboxIframeLoadEnd","postPurchaseIframeLoadEnd","sandboxJsFetchEnd","sandboxJsFetchPostPurchaseEnd","sandboxJsFetch2023_04End","sandboxJsFetch2025_07End","sandboxPolyfillFetchEnd","sandboxJsEvalEnd","sandboxJsEval2025_07End","sandboxJsEval2023_04End","partnerJsFetchEnd","partnerJsEvalEnd","executionEnd","partnerJsExecEnd","skeletonEnd","timeToSettleEnd"],vg=Object.values({updateAttribute:"updateAttribute",removeAttribute:"removeAttribute",addCartLine:"addCartLine",updateCartLine:"updateCartLine",removeCartLine:"removeCartLine",addDiscountCode:"addDiscountCode",removeDiscountCode:"removeDiscountCode",addGiftCard:"addGiftCard",removeGiftCard:"removeGiftCard",updateMetafield:"updateMetafield",removeMetafield:"removeMetafield",updateCartMetafield:"updateCartMetafield",removeCartMetafield:"removeCartMetafield",updateNote:"updateNote",removeNote:"removeNote",updateShippingAddress:"updateShippingAddress",updatePaymentMethodAttributes:"updatePaymentMethodAttributes",redeemableAddChange:"redeemableAddChange",changeVisitorConsent:"changeVisitorConsent"}),_g=["buyerJourneyInterceptor","storefrontApiTokenRefresh","getSessionToken","getSessionTokenError","getSessionTokenCached","storefrontApiQueryStart","storefrontApiQuerySuccess","storefrontApiQueryError","storefrontResponseParseError",...vg.flatMap(e=>[`${e}Start`,`${e}Success`,`${e}Error`]),"marketDriverChangeShippingAddressCountryCode","unknownChangeStart","unknownChangeSuccess","unknownChangeError"];class bg{constructor(){this.type="extensionBuyerJourneyBlock"}map(e){if(e.type!==this.type)return;const t=e.extension.registrationId;return{type:"counter",name:"extension_buyer_journey_block_event",value:1,attributes:{isHighValueExtension:null!=t&&hg.has(t)}}}}class kg{constructor(){this.type="extensionInteraction"}map(e){if(e.type!==this.type)return;let t=e.interaction;_g.includes(t)||(t="unknownEvent");const n=e.error?tl(e.error):void 0;return null==e.duration?{type:"counter",name:"extension_interaction_count_event",value:1,attributes:{event_name:t,validation_error:n}}:{type:"histogram",name:"extension_interaction_distribution_event",value:e.duration,attributes:{event_name:t,validation_error:n}}}}class Pg{constructor(){this.type="extensionLifecycle"}map(e){if(e.type!==this.type)return;if(yg.includes(e.phase))return;const t=e.extension?.registrationId,n={step:e.phase,checkoutType:Zh(e.context.apiClientId),isRemoteDom:!!e.extension?.apiVersion&&Ml(e.extension?.apiVersion),isHighValueExtension:null!=t&&hg.has(t)};return void 0!==e.error&&(n.error=tl(e.error)),null==e.duration?{type:"counter",name:"extension_lifecycle_count_event",value:1,attributes:n}:null!=e.duration?{type:"histogram",name:"extension_lifecycle_distribution_event",value:e.duration,attributes:n}:void 0}}class Sg{constructor(e){this.client=e}#M=new Map([new bg,new kg,new Pg].map(e=>[e.type,e]));willAccept(e){return this.#M.has(e.type)}transmit(e){const t=this.#D(e);if(!t)return;const{name:n,value:r,attributes:a,unit:i,type:o}=t;switch(o){case"histogram":this.client.histogram({name:n,value:r,attributes:a,unit:i});break;case"gauge":this.client.gauge({name:n,value:r,attributes:a,unit:i});break;case"counter":this.client.counter({name:n,value:r,attributes:a,unit:i})}}transmitImmediately(e){this.transmit(e)}#D(e){const t=this.#M.get(e.type);return t?.map(e)}}var wg=(e=>(e.InteractionAndImpression="checkout_c1_interaction_and_impression_events/2.25",e))(wg||{});function Cg(e){return function(e){return e.replace(/([a-z])([A-Z]+)/g,(e,t,n)=>`${t} ${n}`).replace(/([A-Z])([A-Z]+)([^a-zA-Z0-9]*)$/,(e,t,n,r)=>t+n.toLowerCase()+r).replace(/([A-Z]+)([A-Z][a-z])/g,(e,t,n)=>`${t.toLowerCase()} ${n}`)}(e).replace(/\W+/g," ").split(/ |\B(?=[A-Z])/).map(e=>e.toLowerCase()).join("_")}class Eg{constructor(e,t=!0){this.client=e,this.shouldEmitEvent=t,this.acceptableEventType=new Set(["extensionLifecycle","extensionInteraction","extensionUiInteraction","extensionBuyerJourneyBlock","extensionFetchCall","click","change","inventoryPriceChange","autofill","
2impression","moreShippingOptions","deliveryMacroInteraction","splitShipAndPickupIntent"])}willAccept(e){return this.acceptableEventType.has(e.type)}transmit(e){this.shouldEmitEvent&&this.client.monorailEvent({schemaId:wg.InteractionAndImpression,payload:this.mapEventToMonorailSchema(e)})}transmitImmediately(e){this.shouldEmitEvent&&this.client.monorailEvent({schemaId:wg.InteractionAndImpression,payload:this.mapEventToMonorailSchema(e)},{exportImmediately:!0})}commonExtensionEventFields(e){return null===e.extension?{}:{extensionId:e.extension.extensionId,extensionApiClientId:e.extension.appId,extensionRegistrationId:e.extension.registrationId,extensionPublicIdentifier:e.extension.publicIdentifier,extensionTargetPublicIdentifier:e.extension.targetPublicIdentifier,extensionType:e.extension.type,extensionPoint:e.extension.extensionPoint.target,extensionPlacementReference:e.extension.placementReference,section:e.section}}mapEventToMonorailSchema(e){const{context:t,timestamp:n,type:r}=e,a={frontendEventTimestampEpochMs:n.getTime(),userToken:t.userToken,customerId:t.customerId,shopId:t.shopId,sessionToken:t.sessionToken,checkoutToken:t.checkoutToken,checkoutProfileId:t.checkoutProfileId,apiClientId:t.apiClientId,sourceId:t.sourceId,sourceType:t.sourceType,identityProvider:t.identityProvider,sourceDesign:t.sourceDesign,deviceType:t.deviceType,locale:t.locale,currency:t.currency,browser:t.browser,browserConnectionType:t.browserConnectionType,frontendEventTimeZone:t.frontendEventTimeZone,companyContactId:t.companyContactId,companyLocationId:t.companyLocationId,checkoutToDraft:t.checkoutToDraft,editableShippingAddress:t.editableShippingAddress,payNowOnly:t.payNowOnly,clientIp:t.clientIp,checkoutSdkVersion:t.checkoutSdkVersion,checkoutSdkVariant:t.checkoutSdkVariant,checkoutSdkSchemaVersion:t.checkoutSdkSchemaVersion,serverRendered:t.serverRendered,clientHydrated:t.clientHydrated,pageLoadId:t.pageLoadId};switch(r){case"change":{const t="tel"===e.element.type||"email"===e.element.name?"contact":e.element.name;return{...a,eventName:(t?`${Cg(t)}_`:"")+"field_value_changed",eventType:`${e.element.type?`${e.element.type}_`:""}${e.element.tagName.toLowerCase()}_change`,fieldValue:e.element.value,labelValue:e.element.label,section:e.section}}case"click":return{...a,eventName:(e.element.textContent?`${Cg(e.element.textContent)}_`:"")+"clicked",eventType:`${e.element.tagName.toLowerCase()}_click`,labelValue:e.element.label,section:e.section,identityProvider:e.identityProvider};case"autofill":return{...a,eventName:`${Cg(e.element.name?.toLocaleLowerCase()??"")}_autofill`,eventType:`${Cg(e.source)}_autofill`,section:e.section};case"extensionLifecycle":{const t=e=>{switch(e){case"mountError":return"extension_mount_failed";case"mountStart":return"extension_mount_started";case"mountSuccess":return"extension_mount_ended";case"sandboxIframeLoadEnd":return"extension_sandbox_iframe_load_ended";case"postPurchaseIframeLoadEnd":return"extension_post_purchase_iframe_load_ended";case"sandboxJsFetchEnd":return"extension_sandbox_js_fetch_ended";case"sandboxJsFetchPostPurchaseEnd":return"extension_sandbox_js_fetch_post_purchase_ended";case"sandboxJsFetch2023_04End":return"extension_sandbox_js_fetch_2023_04_ended";case"sandboxJsFetch2025_07End":return"extension_sandbox_js_fetch_2025_07_ended";case"sandboxPolyfillFetchEnd":return"extension_sandbox_polyfill_fetch_ended";case"sandboxJsEvalEnd":return"extension_sandbox_js_eval_ended";case"sandboxJsEval2025_07End":return"extension_sandbox_js_eval_2025_07_ended";case"sandboxJsEval2023_04End":return"extension_sandbox_js_eval_2023_04_ended";case"partnerJsFetchEnd":return"extension_partner_js_fetch_ended";case"partnerJsEvalEnd":return"extension_partner_js_eval_ended";case"partnerJsExecEnd":return"extension_partner_js_exec_ended";case"apiObjectEnd":return"extension_api_object_ended";case"apiRead":return"extension_api_read";case"appMetafieldsLoadEnd":return"extension_app_metafields_load_ended";case"jsLoadingEnd":return"extension_js_loading_ended";case"executionEnd":return"extension_execution_ended";case"skeletonEnd":return"extension_skeleton_ended";case"visible":return"extension_visible";case"buyerUsable":return"extension_buyer_usable";case"waitTimeAfterExecution":return"extension_wait_time_after_execution";case"checkoutProfileChangeDestroy":return"extension_destroyed_by_checkout_profile_change";case"timeToFirstMeaningfulCheckoutInteraction":return"extension_time_to_first_meaningful_checkout_interaction";case"timeToSettleEnd":return"extension_time_to_settle_ended";default:return`extension_${e}`}};return{...a,...void 0!==e.duration&&{frontendEventsTimeDifferenceMs:Math.round(e.duration)},...void 0!==e.eventValue&&{eventValue:e.eventValue.toString()},...void 0!==e.apiPropertyName&&{eventValue:e.apiPropertyName},...this.commonExtensionEventFields(e),eventName:t(e.phase),eventType:"extension_lifecycle",step:e.page,extensionInstanceId:e.instanceId,...e.mountId&&{mountId:e.mountId},...void 0!==e.ttsCompletionReason&&{extensionTtsCompletionReason:e.ttsCompletionReason}
2,...void 0!==e.ttsRenderObserved&&{extensionTtsRenderObserved:e.ttsRenderObserved},...void 0!==e.ttsRequestCount&&{extensionTtsRequestCount:e.ttsRequestCount},initialLoad:e.initialPageLoad,transferredBundleSize:e.transferredBundleSize,bundleSize:e.bundleSize,validationErrors:e.error?[nl(e.error)]:[]}}case"extensionFetchCall":return{...a,...this.commonExtensionEventFields(e),eventName:e.errorType?"extension_network_call_errored":"extension_network_call_ended",eventType:"extension_lifecycle",frontendEventsTimeDifferenceMs:Math.round(e.duration),fetchDestination:e.origin,fetchHttpStatus:e.httpStatus,fetchErrorType:e.errorType};case"extensionBuyerJourneyBlock":return{...a,...this.commonExtensionEventFields(e),eventName:"extension_buyer_journey_blocked",eventType:"extension_buyer_journey_block_progress",eventValue:e.reason,validationErrors:e.validationErrors.map(e=>JSON.stringify(e))};case"extensionInteraction":{const t=e=>{switch(e){case"updateNoteStart":return"note_update_started";case"updateNoteSuccess":return"note_update_succeeded";case"updateNoteError":return"note_update_errored";case"removeNoteStart":return"note_remove_started";case"removeNoteSuccess":return"note_remove_succeeded";case"removeNoteError":return"note_remove_errored";case"updateMetafieldStart":return"metafield_update_started";case"updateMetafieldSuccess":return"metafield_update_succeeded";case"updateMetafieldError":return"metafield_update_errored";case"removeMetafieldStart":return"metafield_remove_started";case"removeMetafieldSuccess":return"metafield_remove_succeeded";case"removeMetafieldError":return"metafield_remove_errored";case"updateCartMetafieldStart":return"cart_metafield_update_started";case"updateCartMetafieldSuccess":return"cart_metafield_update_succeeded";case"updateCartMetafieldError":return"cart_metafield_update_errored";case"removeCartMetafieldStart":return"cart_metafield_remove_started";case"removeCartMetafieldSuccess":return"cart_metafield_remove_succeeded";case"removeCartMetafieldError":return"cart_metafield_remove_errored";case"updateAttributeStart":return"attribute_update_started";case"updateAttributeSuccess":return"attribute_update_succeeded";case"updateAttributeError":return"attribute_update_errored";case"removeAttributeStart":return"attribute_remove_started";case"removeAttributeSuccess":return"attribute_remove_succeeded";case"removeAttributeError":return"attribute_remove_errored";case"addCartLineStart":return"cart_line_add_started";case"removeCartLineStart":return"cart_line_remove_started";case"updateCartLineStart":return"cart_line_update_started";case"addCartLineSuccess":return"cart_line_add_succeeded";case"addCartLineError":return"cart_line_add_errored";case"removeCartLineSuccess":return"cart_line_remove_succeeded";case"removeCartLineError":return"cart_line_remove_errored";case"updateCartLineError":return"cart_line_update_errored";case"updateCartLineSuccess":return"cart_line_update_succeeded";case"addDiscountCodeStart":return"discount_code_add_started";case"addDiscountCodeSuccess":return"discount_code_add_succeeded";case"addDiscountCodeError":return"discount_code_add_errored";case"removeDiscountCodeStart":return"discount_code_remove_started";case"removeDiscountCodeSuccess":return"discount_code_remove_succeeded";case"removeDiscountCodeError":return"discount_code_remove_errored";case"addGiftCardStart":return"gift_card_add_started";case"removeGiftCardStart":return"gift_card_remove_started";case"addGiftCardSuccess":return"gift_card_add_succeeded";case"removeGiftCardSuccess":return"gift_card_remove_succeeded";case"addGiftCardError":return"gift_card_add_errored";case"removeGiftCardError":return"gift_card_remove_errored";case"getSessionToken":return"session_token_retrieved";case"getSessionTokenError":return"session_token_retrieval_errored";case"getSessionTokenCached":return"cached_session_token_retrieved";case"storefrontApiTokenRefresh":return"storefront_api_token_refreshed";case"storefrontApiQueryStart":return"storefront_api_query_started";case"storefrontApiQueryError":return"storefront_api_query_errored";case"storefrontApiQuerySuccess":return"storefront_api_query_succeeded";case"storefrontResponseParseError":return"storefront_response_parse_errored";case"updateShippingAddressStart":return"shipping_address_update_started";case"updateShippingAddressSuccess":return"shipping_address_update_succeeded";case"updateShippingAddressError":return"shipping_address_update_errored";case"buyerJourneyInterceptor":return"buyer_journey_intercept_ran";case"redeemableAddChangeStart":return"redeemable_add_started";case"redeemableAddChangeSuccess":return"redeemable_add_succeeded";case"redeemableAddChangeError":return"redeemable_add_errored";case"updatePaymentMethodAttributesStart":return"payment_method_attributes_change_started";case"updatePaymentMethodAttributesSuccess":return"payment_method_attributes_change_succeeded";case"updatePaymentMethodAttributesError":return"payment_method_attributes_change_errored";case"changeVisitorConsentStart":return"visitor_consent_change_started";case"changeVisitorConsentSuccess":return"visitor_consent_change_succeeded";case"changeVisitorConsentError":return"visitor_consent_change_errored";case"marketDriverChangeShippingAddressCountryCode":return"market_driver_change_shipping_address_country_code";default:return"unknown_event"}};return{...a,...e.duration&&{frontendEventsTimeDifferenceMs:Math.round(e.duration)},...this.commonExtensionEventFields(e),eventName:`extension_${t(e.interaction)}
2`,eventType:"extension_interaction",validationErrors:e.error?[nl(e.error)]:[],extensionInstanceId:e.extensionInstanceId,initialLoad:e.initialLoad,...e.eventId&&{eventValue:e.eventId},...void 0!==e.throttleCounter&&{throttleCounter:e.throttleCounter}}}case"extensionUiInteraction":{const t=e=>{switch(e){case"modalOpen":return"modal_opened";case"modalClose":return"modal_closed";case"modalRender":return"modal_rendered";case"mapRender":return"map_rendered";case"sheetOpen":return"sheet_opened";case"sheetClose":return"sheet_closed";case"sheetRender":return"sheet_rendered";case"announcementExpanded":return"announcement_expanded";case"announcementCollapsed":return"announcement_collapsed";case"announcementDismissedFromHost":return"announcement_dismissed_from_host";case"announcementDismissedFromExtension":return"announcement_dismissed_from_extension"}},n=e=>{switch(e){case"modalOpen":case"modalClose":case"sheetOpen":case"sheetClose":case"announcementExpanded":case"announcementCollapsed":case"announcementDismissedFromHost":case"announcementDismissedFromExtension":return"component_buyer_interaction";case"modalRender":case"sheetRender":case"mapRender":return"component_lifecycle"}};return{...a,componentType:e.componentType,componentInstanceId:e.componentInstanceId,...this.commonExtensionEventFields(e),eventName:t(e.interaction),eventType:n(e.interaction)}}case"impression":return{...a,eventType:"impression",eventName:`${e.impressionType}_impression`,eventValue:e.eventValue,impressionFeatures:e.impressionFeatures,section:e.section,identityProvider:e.identityProvider,..."delivery_macros"===e.impressionType?xg(t.selectedDeliveryMacro,t.deliveryMacros||[],t.deliveryLines||[]):{}};case"moreShippingOptions":return{...a,eventType:"more_shipping_options",eventName:e.subEvent,...xg(t.selectedDeliveryMacro,t.deliveryMacros||[],t.deliveryLines||[])};case"deliveryMacroInteraction":return{...a,eventType:"delivery_macro_interaction",eventName:e.subEvent,...xg(t.selectedDeliveryMacro,t.deliveryMacros||[],t.deliveryLines||[])};case"splitShipAndPickupIntent":return{...a,eventType:"split_ship_and_pickup",eventName:"split_ship_and_pickup_intended"};default:return{...a,eventName:"unknown_interaction_event",eventType:"interaction"}}}}function xg(e,t,n){return{shippingNumSplits:n?.length,splitShippingDeliveryGroups:JSON.stringify(n.map(e=>({id:e.id,numItems:e.targetMerchandiseLines?.length??0,productItemIds:e.targetMerchandiseLines?.map(e=>e.id?le(e.id):"")??[],deliveryMethods:e.methods.map(e=>({title:e.title,handle:e.handle,cost:e.cost.amount,deliveryEstimate:e.deliveryPromisePresentmentTitle?.long}))}))),splitShippingMacros:JSON.stringify(t.map(t=>({selected:e?.id===t.id,handle:t.id,cost:t.cost.amount,title:t.title,methods:Object.entries(t.deliveryMethodHandles).map(([e,t])=>({deliveryGroup:e,deliveryMethod:t}))})))}}class Ig{constructor(e){this.client=e,this.acceptableEventType=new Set(["receiptError","paymentError","violationError","addressError"])}willAccept(e){return this.acceptableEventType.has(e.type)}transmit(e){this.client.monorailEvent({schemaId:"checkout_c1_interaction_errors/3.2",payload:this.mapEventToMonorailSchema(e)})}transmitImmediately(e){this.client.monorailEvent({schemaId:"checkout_c1_interaction_errors/3.2",payload:this.mapEventToMonorailSchema(e)},{exportImmediately:!0})}mapEventToMonorailSchema(e){const{context:t,type:n}=e,r={userToken:t.userToken,shopId:t.shopId,sessionToken:t.sessionToken,checkoutToken:t.checkoutToken,apiClientId:t.apiClientId,sourceId:t.sourceId,sourceType:t.sourceType,sourceDesign:t.sourceDesign,requestId:t.requestId,checkoutSdkVersion:t.checkoutSdkVersion,checkoutSdkVariant:t.checkoutSdkVariant,checkoutSdkSchemaVersion:t.checkoutSdkSchemaVersion};switch(n){case"receiptError":return{...r,errorMessage:e.error.message||"",eventName:"receipt_error",eventType:"error",errorReason:e.error.code||e.error.field||"",silencedViolation:e.error.silencedViolation||!1,errorOrigin:e.error.origin||"",errorType:e.error.type||""};case"addressError":return{...r,errorMessage:e.error.message||"",eventName:"address_error",eventType:"error",errorReason:e.error.code||e.error.field||"",silencedViolation:!1,errorOrigin:e.error.origin||"",errorType:e.error.type||""};case"paymentError":return{...r,errorMessage:e.error.message||"",eventName:"payment_error",eventType:"error",errorReason:e.error.code||e.error.field||"",silencedViolation:e.error.silencedViolation||!1,errorOrigin:e.error.origin||"",errorType:e.error.type||""};case"violationError":return{...r,errorMessage:e.error.message||"",eventName:"validation_error",eventType:"error",errorReason:e.error.code||e.error.field||"",silencedViolation:e.error.silencedViolation||!1,errorOrigin:e.error.origin||"",errorType:e.error.type||""}}return{...r,errorMessage:"Unknown error",eventName:"error",eventType:"interaction_error",errorReason:"",silencedViolation:!1,errorOrigin:"unknown",errorType:"unknown"}}}class Ag{constructor(e,t=!0){this.observability=e,this.shouldEmitEvent=t,this.acceptedTypes=new Set(["click"])}willAccept(e){return this.acceptedTypes.has(e.type)}transmit(e){if(!this.shouldEmitEvent)return;const t=this.createDescriptiveLogName(e),{context:n,...r}=e;this.observability.log("telemetry_events_adapter_event_transmitted",t,r)}createDescriptiveLogName(e){const{section:t,type:n,element:r}=e;return[t,n,r.tagName.toLowerCase()].join("_")}}class Tg{constructor(e){this.acceptableEventTypes=new Set(["alertDisplayed","uiExtensionError","pageViewed","sectionComplete","shippingMethodSelected","shippingMethodsFilled","sectionInteraction","pageSubmit","dom_
2clicked","dom_input_focused","dom_input_blurred","dom_input_changed"]),this.webPixels=e.webPixels}willAccept(e){return this.acceptableEventTypes.has(e.type)}transmit(e){"pageViewed"===e.type&&this.webPixels.publish("page_viewed",{});const t=function(e){return JSON.stringify(e,(e,t)=>"timestamp"===e||"webPixelCheckout"===e?"":t)}(e);if(t!==this.mostRecentEvent){if(this.mostRecentEvent=t,"shippingMethodsFilled"===e.type||"shippingMethodSelected"===e.type){const t=Lg(e),n=(t?.delivery?.selectedDeliveryOptions??[]).some(e=>"shipping"===e.type);t&&n&&this.webPixels.publish("checkout_shipping_info_submitted",{checkout:t})}if("sectionComplete"===e.type){const t=Lg(e);if(t)switch(e.section){case"contact":this.webPixels.publish("checkout_contact_info_submitted",{checkout:t});break;case"deliveryAddress":this.webPixels.publish("checkout_address_info_submitted",{checkout:t})}}if("pageSubmit"===e.type){const t=Lg(e);t&&this.webPixels.publish("checkout_shipping_info_submitted",{checkout:t})}if("alertDisplayed"===e.type&&this.webPixels.publish("alert_displayed",{alert:{target:e.target,value:e.value,type:e.errorType,message:e.message}}),"uiExtensionError"===e.type&&this.webPixels.publish("ui_extension_errored",{error:{apiVersion:e.apiVersion,appId:e.appId,appName:e.appName??"",appVersion:e.appVersion,extensionName:e.extensionName,message:e.message,placementReference:e.placementReference??null,extensionTarget:e.extensionTarget,trace:e.trace??"",type:e.code}}),function(e){return e.type.startsWith("dom")}(e))if(function(e){return"dom_clicked"===e.type}(e))this.webPixels.publishDomEvent("clicked",{...st(e,["element","screenX","screenY","pageX","pageY","offsetX","offsetY","movementX","movementY","clientX","clientY"])});else{const t=e.type.replace("dom_","");this.webPixels.publishDomEvent(t,{element:e.element})}}}}function Lg(e){return Vc({type:e.type,step:e.context.step,section:"section"in e?e.section:void 0})?e.context.webPixelCheckout:void 0}const Ng=re("EventHubContext");function Rg({children:e}){const{observability:t,userEvents:n,shopPay:a,checkout:{identity:i},source:o,router:s,consentManager:l}=ie(),c="shopPay"===i.current.value,u=Qh(),p=jh(),m=r(()=>{const e=[new Eg(n,p),new Ig(n),new Sg(t),new pg(t,n,p),new gg({observability:t,userEvents:n,source:o}),new fg({userEvents:n,source:o}),new Ag(t,p),new Tg({webPixels:u}),new og({observability:t,userEvents:n,shopPay:a,isShopPayActive:c,router:s,consentManager:l}),new ug({userEvents:n,source:o})];return new Mg(e)},[t,n,a,c,u,o,p,s,l]);return d(Ng.Provider,{value:m,children:e})}class Mg{constructor(e){this.clients=e}emit(e){this.transmit(e)}transmit(e){this.clients.forEach(t=>{t.willAccept(e)&&(e.transmitImmediately&&t.transmitImmediately?t.transmitImmediately(e):t.transmit(e))})}}function Dg(){const{client:e,shop:t,checkout:n,i18n:a,source:i,mobileCheckoutSdk:o,router:s}=ie(),{currentPage:l}=nc().value,{pathname:c}=s.currentUrl.value,u=Vh(),d=u?.trackingUnique??lt({serialized:e.unstable_getSerialization("shopifyY"),expiration:e.unstable_getSerialization("shopifyYExpiration")}),p=u?.trackingVisit??lt({serialized:e.unstable_getSerialization("shopifyS"),expiration:e.unstable_getSerialization("shopifySExpiration")}),m=n.negotiator.current.fields.buyerIdentity.value?.customerProfile,h=e.unstable_getSerialization("sessionToken"),g=Uc(),f=n.negotiator.current.fields.buyerIdentity.value?.purchasingCompany,{value:y}=n.negotiator.current.fields.paymentFlexibilityPaymentTermsTemplate,v=ct(),{value:_}=n.negotiator.current.fields.deliveryNext,{selectedMacro:b}=Bh(),k=Ql({base:!0,small:!1}),P=n.configuration.layout.isOnePage.value,S="shopPay"===n.identity.current.value,w=navigator.connection?.effectiveType??"unknown",C=e.unstable_getSerialization("requestId"),E=l?.id,x=e.unstable_getSerialization("apiClientId")??0,I=e.unstable_getSerialization("workerVersion")??"proxy",A=e.unstable_getSerialization("serverHandling")??"proxy";let T="c1_legacy";P&&(T="c1_redesign"),S&&(T="shop_pay");const L=ut(_),{deliveryMacros:N}=n.negotiator.parts,R=N.value,{isServerRendered:M}=e.initialRequest,D=n.configuration.profileId.value;return r(()=>({userToken:d,trackingVisit:p,customerId:m?.id,shopId:t.id,sessionToken:h,checkoutToken:i.checkoutSessionIdentifier,checkoutProfileId:D?parseInt(le(D),10):void 0,apiClientId:x,sourceId:i.sourceId,sourceType:i.type,identityProvi
2der:void 0,sourceDesign:T,deviceType:k?"mobile":"desktop",locale:a.locale,currency:a.currency,browser:navigator.userAgent,browserConnectionType:w,frontendEventTimeZone:Intl.DateTimeFormat().resolvedOptions().timeZone,clientIp:"0.0.0.0",userAgent:navigator.userAgent,companyContactId:f?m?.id:void 0,companyLocationId:f?.location.id,companyId:f?.company.id,checkoutToDraft:v.value,editableShippingAddress:g.value,payNowOnly:!y&&!v.value,shippingRequired:n.isShippingRequired.value,requestId:C,step:E,pathname:c,checkoutSdkSchemaVersion:o.config.schema||void 0,checkoutSdkVersion:o.config.version||void 0,checkoutSdkVariant:o.variant.value?.toUpperCase(),workerVersion:I,serverHandling:A,reviewPageRequired:t.confirmationPageEnabled,serverRendered:M,clientHydrated:M,..."filled"===_?.status?{selectedDeliveryMacro:L?b:void 0,deliveryMacros:L?R:[],deliveryLines:_.lines.filter(qe)}:{selectedDeliveryMacro:void 0,deliveryMacros:[],deliveryLines:[]},pageLoadId:dt}),[d,p,m?.id,t.id,t.confirmationPageEnabled,h,i.checkoutSessionIdentifier,i.sourceId,i.type,D,x,T,k,a.locale,a.currency,w,f,v.value,g.value,y,n.isShippingRequired.value,C,E,c,o,I,A,_,L,b,R,M])}function Og(){if("undefined"==typeof window)return zg;const{shop:e,consentManager:t,source:r,i18n:a,checkout:{negotiator:i}}=ie(),o=ae(Ng),s=Dg(),l=oe(s),c=i.parts;return n((n,s)=>{o.emit({type:n,context:{...l.current,href:window.location.href,consent:Zl(t),webPixelCheckout:Fc({type:n,step:l.current.step,section:s.section},{negotiated:i,proposedParts:c,source:r,locale:a.locale,shopCurrencyCode:e.currencyCode,marketDrivenShippingEnabled:e.marketDrivenShippingEnabled})},...s})},[o,l,e,t,i,c,r,a])}function zg(){}function Bg(e,t){const{router:n}=ie();a(()=>{if(""!==n.currentUrl.peek().hash)return;const r=document.activeElement;r&&e.current?.contains(r)&&t(r)},[])}function Vg(){const e=Og(),{client:t}=ie();return n(n=>{if(!t.isFirstMeaningfulInteractionMarked.value){const r=performance.now();e("extensionLifecycle",{phase:"timeToFirstMeaningfulCheckoutInteraction",eventValue:r,duration:r,extension:null,section:"extension",initialPageLoad:!0,timestamp:new Date,page:n??""}),t.markFirstMeaningfulInteraction()}},[e,t])}function Fg(){const e=Og(),{observability:t}=ie();return function(n){e("alertDisplayed",n),t.log("alert_displayed_event_emitted","Error alert was displayed to the buyer",{event:Mc(n)})}}function Ug(){const{checkout:e}=ie(),n=e.configuration.addressSettings.nonBillingAddressSettings;return t(()=>{const e=n.value?.validationEnabled;if(!e)return"BASIC"})}function qg(){const{i18n:e}=ie();return n((t,n)=>pt(e,t,n),[e])}function jg(){const{i18n:e,checkout:n,shopPay:r}=ie(),a=qg(),i=r.user.installments.isRetryable.value,{paymentMethods:o,paymentDue:s}=n.negotiator.current.fields,l=t(()=>mt(o.value));if(!n.installments.isSupported.value||!l.value)return"";const c=l.value,u=s.value,d=Boolean(c.cbtEnabled&&u&&(c.minPrice.currencyCode!==u.currencyCode||c.maxPrice.currencyCode!==u.currencyCode));if(i)return e.translate("installments.installments_condition_retryable");const p=t=>{switch(t){case"US":return e.translate("installments.installments_country_adjective.US");case"CA":return e.translate("installments.installments_country_adjective.CA");case"GB":return e.translate("installments.installments_country_adjective.GB");default:return t}},m=n.installments.ineligibilityReasons.value,h=!r.user.installments.isRejected.value;if(h&&0===m.length)return"";const g=(h&&m.length>0?m:["user_rejected"]).map(t=>{switch(t){case"amount":return d||c.cbtEnabled&&0===c.availableLoanTypes.length&&u&&u.amount>=c.minPrice.amount&&u.amount<=c.maxPrice.amount?e.translate("installments.installments_condition_generic"):e.translate("installments.installments_condition_amount",{minimum:e.formatCurrency(c.minPrice.amount,{currency:c.minPrice.currencyCode,form:"short"}),maximum:e.formatCurrency(c.maxPrice.amount,{currency:c.maxPrice.currencyCode,form:"short"})});case"billing_address":return e.translate("installments.installments_condition_billing_address");case"billing_shipping_country_mismatch":return e.translate("installments.installments_condition_billing_shipping_country_mismatch");case"shipping_address":return e.translate("installments.installments_condition_shipping_address",{listOfCountryCodes:a(c.supportedCountries.map(p),ht.Or)});case"currency":return d&&u&&c.supportedCurrencies.includes(u.currencyCode)?e.translate("installments.installments_condition_generic"):e.translate("installments.installments_condition_currency",{listOfCurrencyCodes:a(c.supportedCurrencies,ht.Or)});case"gift_cards":return e.translate("installments.installments_condition_gift_cards");case"subscriptions":return e.translate("installments.installments_condition_subscriptions");case"order_edit":return e.translate("installments.installments_condition_order_edit");case"test_mode":return e.translate("installments.installments_condition_test_mode");default:return e.translate("installments.installments_condition_generic")}});return(c.cbtEnabled?[...new Set(g)]:g).join(" ")}function Hg(e,t){return t?.availableLoanTypes?.includes(e)??!1}function $g(e){const{retailTraceId:n,deviceId:a,userId:i,locationId:o}=function(){const{checkout:{negotiator:e}}=ie(),n=e.current.fields.customAttributes;return t(()=>{const e=gt(ft,n?.value),t=gt(yt,n?.value),r=gt(vt,n?.value),a=gt(_t,n?.value);return{retailTraceId:e?.value||"",deviceId:t?.value||"",locationId:r?.value||"0",userId:a?.value||"0"}})}().value,{shop:{id:s},source:{checkoutSessionIdentifier:l},checkout:c}=ie(),u=bt(),{value:d}=kt(),p=c.installments.config.value,m=d?.amount?Number(d.amount):0,h=c.installments.isCheckoutEligible.value,g=jg(),f=Hg("SPLIT_PAY",p),y=Hg("INT
2EREST",p),v=Hg("ZERO_PERCENT",p),_=d?.currencyCode,b=_||"USD";return r(()=>({userId:parseInt(i,10),shopId:parseInt(le(s),10),locationId:parseInt(o,10),posCheckoutToken:n,stage:e||"",totalOrderValue:m||0,cartItemsCount:u.value||0,installmentsEligible:h||!1,posDeviceId:a,currency:b,shopPayCheckoutToken:l,ineligibilityReason:g,splitPayEligible:f,interestBearingEligible:y,zeroPercentEligible:v}),[e,n,a,i,o,m,h,s,u.value,b,l,g,f,y,v])}function Yg(){const{checkout:{negotiator:e}}=ie(),n=e.current.fields.customAttributes;return t(()=>Pt(n.value))}function Wg(e){const{observability:t}=ie(),[n,r]=s(()=>wt(e));return a(()=>{const r=function(e,t){return"function"==typeof window.requestIdleCallback?window.requestIdleCallback(e):(t?.leaveErrorBreadcrumb("[usePersistedState] requestIdleCallback was not available, used setTimeout fallback"),window.setTimeout(e,0))}(()=>{St(e,n)},t);return()=>{!function(e,t){"function"==typeof window.cancelIdleCallback?window.cancelIdleCallback(e):"number"==typeof e&&(window.clearTimeout(e),t?.leaveErrorBreadcrumb("[usePersistedState] cancelIdleCallback was not available during cleanup, used clearTimeout fallback"))}(r,t)}},[e,t,n]),[n,r]}function Gg(e,t){const{persistence:n}=ie(),r=n?.get(e,t),a=m(r);return P(()=>{n?.createUpdate(e,t)(a.value)}),a}const Jg=re("AnalyticsContext");function Kg({children:e}){const t=r(()=>new Xg,[]);return d(Jg.Provider,{value:t,children:e})}function Qg(){return ae(Jg)}class Xg{constructor(){this.eventHistory=[],this.listeners=new Set}emit(e){this.eventHistory.push(e);for(const t of this.listeners)t(e)}subscribe(e){this.listeners.add(e);for(const t of this.eventHistory)e(t);return()=>{this.listeners.delete(e)}}}function Zg(){const e=Qg();return n(t=>e.emit(t),[e])}function ef(e){const t=Qg();a(()=>t.subscribe(e),[e,t])}const tf=()=>{const{url:e}=ie(),t=e.shopPayRememberMe(),n=lc(),r=n?.redirectUrl?.includes(t);return Boolean(r)};function nf({selectedDeliveryMethodHandle:e,methods:t}){const{userEvents:r,shop:{id:a},checkout:{identity:i,negotiator:o},source:s}=ie(),l="shopPay"===i.current.value,c=o.current.fields.buyerIdentity.value?.customerProfile,u=t=>t.handle===e,d=t.find(u)?.originLocation?.id,p=t.findIndex(u);return n(e=>r.monorailEvent({schemaId:"local_pickup_checkout/3.1",payload:{eventType:e,checkoutToken:s.checkoutSessionIdentifier||"",shopId:parseInt(le(a),10),locationId:d&&le(d),selectedLocationRank:p,userId:c?.id?parseInt(le(c.id),10):void 0,numberLocationsFound:t.length||0,checkoutSurface:l?"shop_pay":"guest_checkout"}}),[c?.id,l,d,t.length,r,p,a,s.checkoutSessionIdentifier])}const rf=580111;function af(){const{client:e,userEvents:o,i18n:{locale:l},shop:c,source:u,mobileCheckoutSdk:p,checkout:{negotiator:m}}=ie(),h=m.current.fields.buyerIdentity.value?.customerProfile,g=jh(),f=function(){const e=nc();return t(()=>{const t=e.value.currentPage?.id||e.value.currentDetour?.type;switch(t){case"information":return"contact_information";case"shipping":return"shipping_method";case"payment":return"payment_method";case"review":return"review";case"thankYou":return"thank_you";case"stockProblems":return"stock_problems";case"postPurchase":return"post_purchase";default:return t}})}(),{value:v}=Et(),{value:_}=xt("ONE_TIME_PURCHASE"),b=It(_),k=Boolean(b)&&0===b?.costAfterDiscounts.amount,{value:S}=m.current.fields.taxes,{value:w}=m.current.fields.merchandiseLines,{value:C}=m.current.fields.paymentLines,{value:E}=m.current.fields.discountLines,{value:x}=m.current.fields.contactInfo,{value:I}=m.current.fields.buyerIdentity,{value:A}=At(),[T,L]=s("");function N(e){return e.toFixed(2)}function R(e){return parseInt(le(e),10)}!function(){const e=i(!1),{userEvents:t,shop:{id:n},source:{checkoutSessionIdentifier:r},checkout:{identity:a}}=ie(),o="shopPay"===a.current.value,s=Be();P(()=>{s.value.enabledDeliveryMethods.includes("PICK_UP")&&!e.current&&(t.monorailEvent({schemaId:"local_pickup_checkout_availability_viewed/1.1",payload:{shopId:parseInt(le(n),10),checkoutToken:r||"",sourceName:"checkout_one",checkoutSurface:o?"shop_pay":"guest_checkout"}}),e.current=!0)})}();const M=r(()=>k?void 0:b?.costAfterDiscounts?.amount||b?.cost.amount,[k,b?.costAfterDiscounts?.amount,b?.cost?.amount]),D=r(()=>"USD"===A?.currencyCode?A.amount:void 0,[A?.amount,A?.currencyCode]),O=r(()=>w?.lines?.filter(e=>e.productId).map(e=>R(e.productId)),[w?.lines]),z=r(()=>w?.lines?.filter(e=>e.variantId).map(e=>R(e.variantId)),[w?.lines]),B=r(()=>w?.lines?.map(e=>{const t=e.totalPrice.amount;return void 0===t?"":N(t)}),[w?.lines]),V=r(()=>w?.lines?.every(e=>"USD"===e.totalPrice.currencyCode)?w?.lines?.map(e=>{const t=e.totalPrice.amount;return void 0===t?"":N(t)}):void 0,[w?.lines]),F=r(()=>w?.lines?.map(e=>e.quantity),[w?.lines]),U=r(()=>F?.reduce((e,t)=>
2e+t,0),[F]),q=r(()=>F?.length,[F]),j=r(()=>C?.lines.filter(e=>"giftCard"===e.method.type&&e.cost?.amount).map(e=>N(e.cost.amount)),[C?.lines]),H=r(()=>{if("thank_you"!==f.value&&"post_purchase"!==f.value)return;const e=C?.lines.find(e=>"giftCard"===e.method.type&&e.cost?.amount)?"giftCard":void 0,t=C?.lines.filter(e=>"giftCard"!==e.method.type).map(e=>e.method.type);return t&&t?.length>0?t[0]:e},[C?.lines,f.value]),$=r(()=>E?.lines.reduce((e,t)=>{if(!Cl(t))return e;let n=e;n||(n=[]);const r=t.amount?.amount;return r&&n.push(N(r)),n},[]),[E]),Y=Vh(),W=n(()=>{const t="available_total"===S?.status?S.totalTax.amount:void 0,n=h?.id?R(h.id):void 0,r=h?.fullName||void 0,a=Y?.trackingUnique??lt({serialized:e.unstable_getSerialization("shopifyY"),expiration:e.unstable_getSerialization("shopifyYExpiration")}),i=Y?.trackingVisit??lt({serialized:e.unstable_getSerialization("shopifyS"),expiration:e.unstable_getSerialization("shopifySExpiration")});return{schemaId:"checkout_track/3.8",payload:{eventName:"cart_information",cartToken:"cartNext"===u.type?u.sourceId:void 0,customerId:n,trackingUnique:a,shopId:R(c.id),eventTimestampEpochMs:Date.now(),trackingVisit:i,userAgent:navigator.userAgent,landingPage:e.cookies.get("_landing_page")||void 0,customerEmail:h?.email||x?.email,contentLanguage:l,actionName:"query",remoteIp:void 0,totalPrice:A?.amount?N(A?.amount):void 0,customerName:r,lineItemProductIds:O,lineItemVariantIds:z,lineItemTotalPrice:B,lineItemTotalPriceUsd:V,lineItemQuantity:F,currency:I?.presentmentCurrency||c.currencyCode,totalItemCount:U,paymentGatewayId:void 0,gatewayName:void 0,totalPriceUsd:D?N(D):void 0,apiClientId:rf,currentApiClientId:rf,paymentMethod:H,paymentProviderId:void 0,currentStep:f.value,checkoutToken:u.checkoutSessionIdentifier,totalShipping:M?N(M):void 0,sourceProcessor:"web_checkout",appliedGiftCards:j?.length?j:void 0,subtotalPrice:v?.amount?N(v.amount):void 0,sourceName:"checkout_one",freeShippingDiscount:k.valueOf(),totalTax:t?N(t):void 0,appliedDiscounts:!$||$.length<1?void 0:$,orderId:void 0,distinctItemCount:q,javascriptEnabled:!0,checkoutPlatform:"checkout_one",checkoutSdkVersion:p.config.version||void 0,checkoutSdkSchemaVersion:p.config.schema||void 0,checkoutSdkVariant:p.variant.value?.toUpperCase()}}},[$,S,k,v,j,u,M,A?.amount,D,f,I?.presentmentCurrency,c,U,F,B,V,z,O,h,x,q,l,H,Y,e,p]);return a(()=>{g&&(T!==f.value&&o.monorailEvent(W()),L(f.value))},[T,f.value,o,W,L,g]),d(y,{})}const of=w({suspenseName:"trekkie",displayName:"Trekkie",load:()=>C(()=>ul(()=>import("./b887ec56.B_GyG9Me.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11])))});function sf(){const e=Qh(),{plan:t}=nc().value,{router:r,i18n:{locale:a},shop:{currencyCode:i,marketDrivenShippingEnabled:o},source:s,checkout:{negotiator:l}}=ie(),c=l.parts,u=lc(),d=cc(),p=n(()=>{const t=Rc({negotiated:l,source:s,proposedParts:c,locale:a,shopCurrencyCode:i,marketDrivenShippingEnabled:o});requestAnimationFrame(()=>{e.publish("payment_info_submitted",{checkout:t})})},[l,s,e,c,a,i,o]),m=n(()=>{const t=Rc({negotiated:l,source:s,proposedParts:c,locale:a,shopCurrencyCode:i,marketDrivenShippingEnabled:o});e.publish("checkout_started",{checkout:t})},[l,s,e,c,a,i,o]),h=n(()=>
2{if(!u)return;if(d.shouldPrevent())return;const n=Rc({negotiated:l,receipt:u,source:s,orderId:u.orderIdentity.id,customerId:u.customerId||void 0,isFirstOrder:u.isFirstOrder,locale:a,shopCurrencyCode:i,marketDrivenShippingEnabled:o});d.markAsEmitted();const c=u.analytics?.checkoutCompletedEventId;let p=!1;function m(){if(p)return;p=!0,window.removeEventListener("pagehide",m),document.removeEventListener("visibilitychange",h);const a=function(e,t){const n=e.find(e=>e.route===t);return n?dc[n.type]??"unknown":"unknown"}(t.detours,r.currentUrl.value.normalizedPath),i={...c&&{eventId:c},checkoutCompletedPageType:a},o=Object.keys(i).length>0?i:void 0;e.publish("checkout_completed",{checkout:n},o)}function h(){"hidden"===document.visibilityState&&m()}window.addEventListener("pagehide",m),document.addEventListener("visibilitychange",h),"hidden"===document.visibilityState?m():requestAnimationFrame(m)},[u,l,s,e,r,t.detours,a,i,o,d]);return ef(n(e=>{"initiate_checkout"===e.type&&m()},[m])),ef(n(e=>{"add_payment_info"===e.type&&p()},[p])),ef(n(e=>{"complete_checkout"===e.type&&h()},[h])),null}const lf=["/processing","/thank-you","/error","/post-purchase"],cf=[rt.DirectCheckoutCheckout,rt.CheckoutPaymentStep,rt.ShopPayInstallmentsAsPaymentMethod,rt.ShopPayAsPaymentMethod];function uf(){Vh();const e=Zg(),{currentPage:t,currentDetour:n}=nc().value,{userEvents:r,source:i,router:o,checkout:{negotiator:s}}=ie(),l=function(){const[e,t]=Wg(Ct.TrackedSourceId),{source:{sourceId:n}}=ie();return a(()=>{t(n)},[n,t]),n===e}(),c=function(){const[e,t]=Wg(Ct.TrackedCompleteOrderSourceId),n=lc(),r=tf(),{source:{sourceId:i}}=ie();return a(()=>{n&&!r&&t(i)},[i,n,r,t]),i===e}(),{normalizedPath:u}=o.currentUrl.value,p=lc(),m=Yg().value,h=$g(Lt.SHOP_PAY_CHECKOUT_COMPLETE),g=s.current.fields.paymentLines?.value?.lines,f=function(){const{client:e}=ie();return e.unstable_getSerialization("shopPayConfig").redirect_source}(),v=Og(),_=tf();return a(()=>{const r=n?.route??t?.route;if(r){v("pageViewed",{timestamp:new Date});const n=["/"];t&&["onePage"].includes(t.id)&&n.includes(r)?e({type:"one_page_checkout_page_view",url:r}):e({type:"page_view",url:r})}},[t,n,v,e]),ac(n=>{"negotiationStage"in n&&"negotiation"===n.negotiationStage||t&&["payment","onePage"].includes(t.id)&&e({type:"add_payment_info"})}),a(()=>{p&&(_||c||(e({type:"complete_checkout"}),m&&function(e,t,n){e.monorailEvent({schemaId:"retail_shop_pay/2.0",payload:{...n,orderId:se(t.orderIdentity.id)}})}(r,p,h)))},[e,p,_,c,m,r,h]),a(()=>{"cartNext"!==i.type&&"checkout"!==i.type||l||e({type:"initiate_checkout_once_per_checkout",url:u})},[e,u,i.type,l]),a(()=>{const t=o.currentUrl.value.normalizedPath,n=Boolean(Nt(g,"GOOGLE_PAY")),r="cartNext"===i.type||"checkout"===i.type,a=!f||!cf.includes(f);r&&(n&&"/processing"===t||!lf.includes(t))&&a&&e({type:"initiate_checkout",url:t})},[]),d(y,{children:[d(af,{}),d(of,{}),d(sf,{})]})}const df=E(function({children:e}){const t=Tt();return d(Kg,{children:[e,d(x,{when:t,children:d(uf,{})})]})});function pf(){const{userEvents:e,shop:{id:t},source:n,i18n:{locale:r},checkout:{negotiator:a}}=ie(),i=Rt(),{billingAddress:o}=a.parts,s=o.value,{details:l}=Mt(s.countryCode),c=Ug();return ac(a=>
2{if("complete"===a.type&&o&&i.value.defaultAttributes){const a=i.value.defaultAttributes?.uniqToken||"",o=l?.zones?.find(e=>e.code===s.zoneCode)?.name;e.monorailEvent({schemaId:"checkout_address_submission/5.2",payload:{checkoutToken:n.checkoutSessionIdentifier||"",shopId:parseInt(le(t),10),uniqueToken:a,territory:l?.name||"",context:"Billing address",address1:s.address1||"",address2:s.address2||"",city:s.city||"",zone:o||"",zip:s.postalCode||"",errorCode:"",errorFields:[],locale:r,matchingStrategy:c.value}})}}),null}const mf=re("WebPixelTargetContext"),hf=({children:e,target:t})=>d(mf.Provider,{value:t,children:e});function gf(){const{checkout:e}=ie();return e.configuration.branding.shell.configuration.environment.isCheckoutEditor??!1}const ff=w({displayName:"AdminPreviewBar",load:()=>ul(()=>import("./a6e11e56.CcNVFj1l.js"),__vite__mapDeps([12,2,1,3,4,5,7,8,9,10,11,13])),suspense:!1});function yf(){const{router:e,source:t,shop:n}=ie(),r="no-preview"!==n.configurationPreviewContext,a=i(e.currentUrl.peek()).current,o=function({source:e,isThemeEditor:t,hasServerPreviewContext:n}){return null!=e.previewScript?.name||"simulated"!==e.type&&!t&&n}({source:t,isThemeEditor:Dt(),hasServerPreviewContext:r});return o?d(ff,{initialUrl:a}):null}function vf(){const e=i(!1);return a(()=>(e.current=!0,()=>{e.current=!1}),[]),e}const _f=f(void 0);function bf(){const e=h(_f);if(!e)throw new ge("Missing FocusManager Context ");return e.focusErrors}function kf(e){const t=e.defaultView?.getComputedStyle(e.documentElement).direction;return"rtl"===t||"ltr"===t?t:"rtl"===e.dir?"rtl":"ltr"}function Pf({children:e}){const t=i(new Set),a=vf(),o=(e,t,n)=>e.top===t.top?"ltr"===n?e.left<t.left:e.right>t.right:e.top<t.top,s=n(()=>{let e;for(const n of t.current){if(!n.current)continue;const t={coordinates:n.current.getBoundingClientRect(),ref:n};e&&!o(t.coordinates,e.coordinates,kf(n.current.ownerDocument))||(e=t)}a.current&&e&&function(e){const t=e.ref.current;if(!t)return;if(t.focus({preventScroll:!0}),function({coordinates:e,ref:t}){const n=t.current?.ownerDocument.defaultView??window;return e.top>=0&&e.left>=0&&e.bottom<=n.innerHeight&&e.right<=n.innerWidth}(e))return;""===t.style.scrollMarginTop&&(t.style.scrollMarginTop="var(--x-spacing-large-500)");const n=t.ownerDocument.defaultView?.matchMedia("(prefers-reduced-motion: reduce)").matches??!1;t.scrollIntoView({behavior:n?"instant":"smooth"})}(e)},[a]),l=n(e=>(t.current.add(e),()=>t.current.delete(e)),[]),c=r(()=>({requestFocus:l,focusErrors:s,numberOfErrors:()=>t.current.size}),[s,l]);return d(_f.Provider,{value:c,children:e})}function Sf({active:e}){const t=i(null),n=h(_f);return l(()=>{if(n&&e)return n.requestFocus(t)},[e,t,n]),t}function wf(){return h(_f)}function Cf(e){return document.activeElement===e}const Ef='\n a[href],\n area[href],\n input:not([type="hidden"]):not([disabled]):not([tabindex="-1"]),\n select:not([disabled]),\n textarea:not([disabled]),\n button:not([disabled]):not([tabindex="-1"]),\n iframe:not([tabindex="-1"]),\n object,\n embed,\n [tabindex="0"],\n [contenteditable],\n audio[controls],\n video[controls]';function xf(e,t=!0){return!t&&e.matches(Ef)?e:e.querySelector(Ef)}function If(e,t=!0){if(!t&&e.matches(Ef))return e;const n=e.querySelectorAll(Ef);return n[n.length-1]}function Af(e){const t=[...document.querySelectorAll(Ef)],n=t.findIndex(t=>e===t);return n?t[n+1]:null}function Tf(){const{checkout:{negotiator:e}}=ie(),{paymentLines:n}=e.parts,r=e.current.fields.paymentMethods;return t(()=>{const e=n.value.at(0);if(!e)return null;const t="walletContent"in e.method?e.method.walletContent?.paymentMethodIdentifier:"popupEnabled"in e.method?e.method.paymentMethodIdentifier:void 0,a=r.value?.find(e=>"popupEnabled"in e&&e.popupEnabled&&e.paymentMethodIdentifier===t);return Ot()?null:a&&"name"in a?a.name:null})}var Lf={backgroundPositionVariant:{bottom:"_17kya4u5 _17kya4u0 _1fragemxj",center:"_17kya4u6 _17kya4u1 _1fragemxk",left:"_17kya4u7 _17kya4u2 _1fragemxl",right:"_17kya4u8 _17kya4u3 _1fragemxm",top:"_17kya4u9 _17kya4u4 _1fragemxn"},backgroundRepeatVariant:{noRepeat:"_17kya4uc _17kya4ua _1fragemxo",repeat:"_17kya4ud _17kya4ub _1fragemxp"},backgroundSizeVariant:{cover:"_17kya4ue",contain:"_17kya4uf"},colorLayerVariant:{base:"_17kya4ui _17kya4ug _1fragemy5",control:"_17kya4uj _17kya4uh _1fragemy6"},inert:"_17kya4un _17kya4um _1fragemyb _1fragem11z _1fragem12w",containerName:"_17kya4ul",opacityVariant:{10:"_17kya4uz _17kya4uq _1fragem11l",20:"_17kya4u10 _17kya4ur _1fragem11m",30:"_17kya4u11 _17kya4us _1fragem11n",40:"_17kya4u12 _17kya4ut _1fragem11o",50:"_17kya4u13 _17kya4uu _1fragem11p",60:"_17kya4u14 _17kya4uv _1fragem11q",70:"_17kya4u15 _17kya4uw _1fragem11r",80:"_17kya4u16 _17kya4ux _1fragem11s",90:"_17kya4u17 _17kya4uy _1fragem11t"},overflowHidden:"_17kya4up _17kya4uo _1fragemup _1fragemv4",visuallyHidden:"_17kya4u18 _1fragem121",withAlignment:"_17kya4u19 _1fragem73",vars:{containerNameVar:"var(--_17kya4uk)"}};const Nf=Ym(Tp(Md(_(function({accessibilityLabel:e,accessibilityRole:t="generic",accessibilityVisibility:r="visible",autoFocus:a,background:i="transparent",backgroundHoverAndFocus:o,backgroundFit:s,backgroundImage:l,backgroundPosition:c,backgroundRepeat:u="noRepeat",blockAlignment:p,blockSize:m="auto",border:h="none",borderRadius:g="none",borderStyle:f,borderWidth:y,boxShadow:_,children:k,
2className:P,colorLayer:S,containerName:w,display:C="auto",id:E,inert:x,inlineAlignment:I,inlineSize:A="auto",maxBlockSize:T="none",maxInlineSize:L="none",minBlockSize:N="0",minInlineSize:R="0",opacity:M,overflow:D="visible",padding:O="none",paddingBlock:z,paddingInline:B,paddingBlockEnd:V,paddingBlockStart:F,paddingInlineEnd:U,paddingInlineStart:q,position:j="relative",insetBlock:H,insetInline:$,transform:Y,translate:W,zIndex:G,...J},K){const Q=p||I,X=Rp(K,n(e=>{a&&e&&e.focus({preventScroll:!0})},[a])),{className:Z,style:ee,styleElement:te}=Um({alignItems:I,backgroundColor:i,backgroundColorHoverAndFocus:o,backgroundImage:l,blockSize:m,...Ne({border:h,borderStyle:f,borderWidth:y}),borderRadius:g,boxShadow:_,display:C,inlineSize:A,insetBlock:H,insetInline:$,justifyContent:p,maxBlockSize:T,maxInlineSize:L,minBlockSize:N,minInlineSize:R,padding:O,paddingBlock:z,paddingInline:B,paddingBlockEnd:V,paddingBlockStart:F,paddingInlineEnd:U,paddingInlineStart:q,position:j,transform:Y,zIndex:G},{transforms:{display:Q?yd:gd}}),ne=wd(),{Element:re,role:ae}=Km(t,{defaultElement:ne?"span":"div"}),ie=w?b({[Lf.vars.containerNameVar]:w}):void 0;return d(Rf,{condition:x,children:[te,d(re,{"aria-hidden":!("hidden"!==r&&!x)||void 0,"aria-label":e,className:v("exclusive"===r&&Lf.visuallyHidden,l&&s&&Lf.backgroundSizeVariant[s],l&&c&&Lf.backgroundPositionVariant[c],l&&Lf.backgroundRepeatVariant[u],S&&Lf.colorLayerVariant[S],w&&Lf.containerName,Q&&Lf.withAlignment,x&&Lf.inert,M&&Lf.opacityVariant[M],"hidden"===D&&Lf.overflowHidden,Z,{notranslate:!1===W},P),id:E,inert:x?" ":void 0,ref:X,role:ae,style:{...ee,...ie},tabIndex:a?-1:void 0,translate:(!0===W?"yes":void 0)??(!1===W?"no":void 0),...J,children:k})]})}))));function Rf({children:e,condition:t}){return null==t?d(y,{children:e}):d(kd.Provider,{value:t,children:e})}var Mf={Spinner:"_1ggkr8p4 _1ggkr8p3 _1fragemzf _1fragem4q _1fragemvo _1fragemve _1fragem12k _1fragem12p _1fragem12e",appearanceVariant:{auto:"_1ggkr8p6",accent:"_1ggkr8p7 _1ggkr8p5 _1fragemxq",monochrome:"_1ggkr8p8"},sizeVariant:{"small-200":"_1ggkr8p9",small:"_1ggkr8pa",base:"_1ggkr8pb",large:"_1ggkr8pc",fill:"_1ggkr8pd"},SVG:"_1ggkr8pf _1ggkr8pe _1fragem5u _1fragemzf _1fragemvo _1fragemve"};function Df({size:e="base",appearance:t="auto",accessibilityLabel:n,id:r}){const a=qc(),i=Boolean(n&&a),o=function(e="base"){switch(e){case"small-100":return"small";case"large-100":return"large";default:return e}}(e),s=v(Mf.Spinner,t&&Mf.appearanceVariant[t],Mf.sizeVariant[o]),l=d("fill"===o||"large"===o?Of:zf,{...{"aria-label":n,"aria-hidden":n?void 0:"true"}});return i?d(y,{children:n}):d("div",{className:s,id:r,children:l})}function Of(e){return d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",className:Mf.SVG,focusable:"false",...e,children:d("path",{d:"M32 16c0 8.837-7.163 16-16 16S0 24.837 0 16 7.163 0 16 0v2C8.268 2 2 8.268 2 16s6.268 14 14 14 14-6.268 14-14z"})})}function zf(e){return d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:Mf.SVG,focusable:"false",...e,children:d("path",{d:"M20 10c0 5.523-4.477 10-10 10S0 15.523 0 10 4.477 0 10 0v2a8 8 0 1 0 8 8z"})})}var Bf={accessibilityVisibilityVariant:{exclusive:"_19gi7yt1u _19gi7yt1t _1fragem121"},colorVariant:{base:"_19gi7yt1g",subdued:"_19gi7yt1h"},decorationVariant:{none:"_19gi7ytz _19gi7ytx _1fragem128",underline:"_19gi7yt10 _19gi7yty _1fragem129"},fontsVariant:{primary:"_19gi7ytv _19gi7ytt _1fragemyg",secondary:"_19gi7ytw _19gi7ytu _1fragemyh"},kerningVariant:{base:"_19gi7ytc",large100:"_19gi7ytd",large200:"_19gi7yte"},letterCaseVariant:{uppercase:"_19gi7yt8",lowercase:"_19gi7yt9",capitalize:"_19gi7yta",none:"_19gi7ytb"},sizeVariant:{extraSmall:"_19gi7ytm _19gi7ytf _1fragemys",small:"_19gi7ytn _19gi7ytg _1fragemyt",base:"_19gi7yto _19gi7yth _1fragemyu",medium:"_19gi7ytp _19gi7yti _1fragemyv",large:"_19gi7ytq _19gi7ytj _1fragemyw",extraLarge:"_19gi7ytr _19gi7ytk _1fragemyx",extraExtraLarge:"_19gi7yts _19gi7ytl _1fragemyy"},Text:"_19gi7yt0",toneVariant:{auto:"_19gi7yt18",neutral:"_19gi7yt19",info:"_19gi7yt1a _19gi7yt11 _19gi7yt12 _1fragemxt",success:"_19gi7yt1b _19gi7yt11 _19gi7yt13 _1fragemxu",warning:"_19gi7yt1c _19gi7yt11 _19gi7yt14 _1fragemxv",critical:"_19gi7yt1d _19gi7yt11 _19gi7yt15 _1fragemxr",custom:"_19gi7yt1e _19gi7yt11 _19gi7yt16 _1fragemxs",accent:"_19gi7yt1f _19gi7yt17 _1fragemxq"}
2,typeVariant:{address:"_19gi7yt1l",emphasis:"_19gi7yt1m",generic:"_19gi7yt1n",mark:"_19gi7yt1o _19gi7yt1i _1fragem13i",offset:"_19gi7yt1p",redundant:"_19gi7yt1q _19gi7yt1j _1fragem12a",small:"_19gi7yt1r _19gi7ytn _19gi7ytg _1fragemyt",strong:"_19gi7yt1s _19gi7yt1k _1fragemyz"}};const Vf=_(function({accessibilityLive:e,accessibilityVisibility:t,children:n,color:r="base",decoration:a,dir:i,display:o="auto",fonts:s,id:l,kerning:c,lang:u,letterCase:p,size:m,translate:h,tone:g="auto",type:f="generic"},_){const b=(e=>{switch(e){case"address":return"address";case"emphasis":return"em";case"generic":return"span";case"mark":return"mark";case"offset":return"i";case"redundant":return"s";case"strong":return"strong";case"small":return"small";default:return console.warn("Invalid Textâs `type`"),"span"}})(f),{className:k,styleElement:P}=Um({display:o},{transforms:{display:fd}});return d(y,{children:[P,d(b,{"aria-hidden":"hidden"===t||void 0,"aria-live":e,className:"exclusive"===t?Bf.accessibilityVisibilityVariant[t]:v(Bf.Text,a&&Bf.decorationVariant[a],s&&Bf.fontsVariant[s],c&&Bf.kerningVariant[c],p&&Bf.letterCaseVariant[p],m&&Bf.sizeVariant[m],g&&Bf.toneVariant[g],r&&("auto"===g||"neutral"===g)&&Bf.colorVariant[r],f&&Bf.typeVariant[f],k,{notranslate:!1===h}),dir:i,id:l,lang:u,translate:(!0===h?"yes":void 0)??(!1===h?"no":void 0),ref:_,children:n})]})});var Ff,Uf={primary:"_1m2hr9g1b _1m2hr9g17 _1fragem12d","shop-pay":"_1m2hr9g1c _1m2hr9g17 _1fragem12d",secondary:"_1m2hr9g1d _1m2hr9g18 _1fragem12d",tert
2iary:"_1m2hr9g1e _1m2hr9g19 _1fragem12d",plain:"_1m2hr9g1f _1m2hr9g1a _1fragem12p _1fragem12n _1fragem12d"},qf={borderVariant:{blockEnd:"_1m2hr9g14",full:"_1m2hr9g15",none:"_1m2hr9g16"},colorLayerVariant:{primary:"_1m2hr9g1l _1m2hr9g1j _1fragemy9",secondary:"_1m2hr9g1m _1m2hr9g1k _1fragemya",tertiary:"_1m2hr9g1n",plain:"_1m2hr9g1o","shop-pay":"_1m2hr9g1p"},Content:"_1m2hr9gx _1m2hr9gw _1fragem11z _1fragem12j _1fragem12d _1fragem12q",disabled:"_1m2hr9g20 _1m2hr9g1z _1fragem11z",displayVariant:{block:"_1m2hr9gm _1m2hr9gk _1fragem5u",inline:"_1m2hr9gn _1m2hr9gl _1fragem6e"},editorDisabled:"_1m2hr9g21",forcedColorsPrimaryFill:"_1m2hr9g22",inlineAlignmentVariant:{center:"_1m2hr9gr _1m2hr9gp _1fragem64 _1fragembj _1fragem124",start:"_1m2hr9gs",end:"_1m2hr9gt _1m2hr9gq _1fragem64 _1fragembt _1fragem125"},loading:"_1m2hr9gv _1m2hr9gu _1fragem11z _1fragemyb",LoadingContent:"_1m2hr9gz _1m2hr9gy _1fragem12j _1fragem12d _1fragem12q _1fragem64 _1fragem19",ExtendedLoadingContent:"_1m2hr9g11 _1m2hr9g10 _1fragem12q _1fragem12y",segmentVariant:{start:"_1m2hr9g23",end:"_1m2hr9g24"},Spinner:"_1m2hr9g13 _1m2hr9g12 _1fragemwi _1fragem109 _1fragem113",sizeVariant:{small:"_1m2hr9g1v _1m2hr9g1u",base:"_1m2hr9g1w _1m2hr9g1u",large:"_1m2hr9g1x _1m2hr9g1u",extraLarge:"_1m2hr9g1y _1m2hr9g1u"},textDecorationVariant:{underline:"_1m2hr9g1h _1m2hr9g1g _1fragem129",none:"_1m2hr9g1i"},toneVariant:{critical:"_1m2hr9g1q",monochrome:"_1m2hr9g1r",neutral:"_1m2hr9g1s",custom:"_1m2hr9g1t"},verticalAlignVariant:{"text-bottom":"_1m2hr9go"},inMenu:"_1m2hr9g25",inert:"_1m2hr9g26 _1fragemz0"};const jf=hm(mm(Vp((Ff=_(function({accessibilityLabel:e,accessibilityLive:t,children:n,className:r,disabled:a,command:i,commandFor:o,display:s="block",href:l,id:c,inlineAlignment:u="center",inlineSize:p="auto",loading:m,loadingLabel:h,loadingMode:g="auto",onClick:f,onFocus:y,onMouseEnter:_,overlay:b,segment:k,size:P="base",textDecoration:S,target:w="auto",tone:C="auto",type:E="button",variant:x="auto",verticalAlign:I="baseline",...A},T){const L=a?void 0:l,N=$f(f)?()=>f?.():void 0,R=$f(y)?()=>y?.():void 0,M=$f(_)?()=>_?.():void 0,D=Np(T),O="auto"===x?"secondary":x,z="shop-pay"===O||"auto"===C?"neutral":C,{className:B,style:V,styleElement:F}=Um({inlineSize:p},{transforms:{inlineSize:Hf}}),U=Ju(),q=qc(),{primaryButton:{border:j="none"},secondaryButton:{border:H="full"},link:{typographyDecoration:$="underline"}}=$m(),Y=bd(),W=Pd(),G=Wu().editor??!1,J=Boolean(a)&&!G,K="plain"===O,Q="in-menu"===O,X=!m&&J?"full":j,Z=(()=>{switch(O){case"tertiary":return"none";case"secondary":return H;default:return X}})(),ee=S||("monochrome"===z?"underline":$),te=v("_1m2hr9gj _1m2hr9gi _1fragem12w _1fragemws _1fragemyd _1fragem126 _1fragem12n _1fragem12p _1fragem12e _1fragemyk",(m||!J)&&!K&&!Q&&"neutral"===z&&qf.colorLayerVariant[O],Uf[Q?"plain":O],!K&&qf.sizeVariant[P],Z&&!K&&qf.borderVariant[Z],("primary"===O||"shop-pay"===O)&&qf.forcedColorsPrimaryFill,qf.displayVariant[s],"text-bottom"===I&&qf.verticalAlignVariant[I],qf.toneVariant[z],B,(J||W)&&qf.disabled,G&&a&&qf.editorDisabled,W&&qf.inert,m&&qf.loading,qf.textDecorationVariant[K?ee:"none"],k&&qf.segmentVariant[k],Q&&qf.inMenu,r),ne=h||U("processing"),re=d("span",{className:v(qf.Content,u&&qf.inlineAlignmentVariant[u]),"aria-hidden":m||void 0,children:n}),ae=d("span",{className:v(qf.LoadingContent,u&&qf.inlineAlignmentVariant[u],!q&&qf.Spinner),dir:"auto",children:[d(Df,{accessibilityLabel:ne}),"extended"===g&&!q&&d("span",{className:qf.ExtendedLoadingContent,dir:"auto",children:d(Vf,{children:ne})})]}),ie=Au(),oe=ie?.activatorAttributes,se=void 0!==m;if(L&&void 0===o)return d(Sd.Provider,{value:!0,children:[F,d(jm,{ariaBusy:se?m:void 0,ariaLabel:m?void 0:e,ariaLive:se?"polite":t,className:te,href:L,id:c,onClick:f,onFocus:y,onMouseEnter:_,overlay:b,ref:D,style:V,target:w,...A,children:[re,m&&ae]})]});const le=zp(ie,{onClick:N,onFocus:R,onMouseEnter:M});return d(Sd.Provider,{value:!0,children:[F,d("button",{"aria-busy":se?m:void 0,"aria-hidden":!!W||void 0,"aria-label":m?void 0:e,"aria-live":se?"polite":t,className:te,disabled:a||m,form:"submit"===E&&Y?.nested?Y.id:void 0,id:c,ref:D,style:V,type:o?"button":E,tabIndex:W?-1:void 0,...le,...oe,...A,children:[re,m&&ae]})]})}),_((e,t)=>
2{switch(h(wu)){case"Menu":{const n={...e,size:"base",tone:e.tone||"monochrome",variant:"in-menu",textDecoration:"none",inlineAlignment:"start",inlineSize:"fill"};return d("li",{children:d(Ff,{...n,ref:t})})}case"Sheet":{const n={...e,size:"small"};return d(Ff,{...n,ref:t})}case"Banner":{const n={...e,tone:"auto"===e.tone||void 0===e.tone&&"plain"!==e.variant?"monochrome":e.tone};return d(Ff,{...n,ref:t})}default:return d(Ff,{...e,ref:t})}})))));function Hf(e){if("legacy-default"!==e)return"fill"===e?"100%":sd("auto"===e?"fit-content":e)}function $f(e){return"function"==typeof e}var Yf={Link:"s2kwpi1 s2kwpi0 _1fragemws _1fragem12n _1fragem12p _1fragem12d _1fragem12u _1fragemxw _1fragem12v _1fragemyk",toneVariant:{neutral:"s2kwpi2",monochrome:"s2kwpi3"},textDecorationVariant:{underline:"s2kwpi5 s2kwpi4 _1fragem129",none:"s2kwpi6"},displayVariant:{inline:"s2kwpi8",block:"s2kwpi9 s2kwpi7 _1fragem5u _1fragemzg"},verticalAlignVariant:{"text-bottom":"s2kwpia"}};function Wf({accessibilityLabel:e,accessibilityLive:t,command:n="--auto",commandFor:r,children:a,display:i="inline",href:o,id:s,lang:l,onClick:c,onFocus:u,onMouseEnter:p,target:m="auto",textDecoration:h,tone:g="auto",verticalAlign:f="baseline",overlay:y,..._}){const{link:{typographyDecoration:b="underline"}}=$m(),k="text-bottom"===f?Yf.verticalAlignVariant[f]:void 0;return o&&void 0===r?d(jm,{ariaLabel:e,ariaLive:t,command:n,commandFor:r,className:v(Yf.Link,Yf.toneVariant["auto"===g?"neutral":g],Yf.textDecorationVariant[h||("monochrome"===g?"underline":b)],Yf.displayVariant[i],k),href:o,id:s,lang:l,onClick:c,onFocus:u,onMouseEnter:p,overlay:y,target:m,..._,children:a}):d(jf,{accessibilityLabel:e,accessibilityLive:t,command:n,commandFor:r,display:i,onClick:c,onFocus:u,onMouseEnter:p,id:s,overlay:y,textDecoration:h,tone:"auto"===g?"neutral":g,variant:"plain",verticalAlign:f,..._,children:a})}var Gf={Stack:"r0qqvk1 r0qqvk0 _1fragemws _1fragem64",overflowHidden:{hidden:"r0qqvk3 r0qqvk2 _1fragemup _1fragemv4",visible:"r0qqvk4"}};const Jf=Ym(Tp(_(function({accessibilityCurrent:e,accessibilityLabel:t,accessibilityRole:n="generic",accessibilityLabelledBy:r,alignContent:a="normal",alignItems:i="normal",background:o,backgroundHoverAndFocus:s,blockSize:l="auto",border:c="none",borderRadius:u="none",borderStyle:p,borderWidth:m,children:h,className:g,columnGap:f,display:_="auto",direction:b="block",gap:k,id:P,inlineSize:S="auto",justifyContent:w="normal",maxBlockSize:C="none",maxInlineSize:E="none",minBlockSize:x="0",minInlineSize:I="0",overflow:A="visible",padding:T="none",paddingBlock:L,paddingInline:N,paddingBlockEnd:R,paddingBlockStart:M,paddingInlineEnd:D,paddingInlineStart:O,rowGap:z,...B},V){const{className:F,style:U,styleElement:q}=Um({alignContent:a,alignItems:i,backgroundColor:o,backgroundColorHoverAndFocus:s,...Ne({border:c,borderStyle:p,borderWidth:m}),blockSize:l,borderRadius:u,columnGap:f,display:_,flexDirection:b,flexWrap:b,gap:k,inlineSize:S,justifyContent:w,maxBlockSize:C,maxInlineSize:E,minBlockSize:x,minInlineSize:I,padding:T,paddingBlock:L,paddingBlockEnd:R,paddingBlockStart:M,paddingInline:N,paddingInlineEnd:D,paddingInlineStart:O,rowGap:z},{transforms:{display:yd,flexDirection:e=>"block"===e?"column":"row",flexWrap:e=>"block"===e?"nowrap":"wrap"}}),j=wd(),{Element:H,role:$}=Km(n,{defaultElement:j?"span":"div"});return d(y,{children:[q,d(H,{className:v(Gf.Stack,Gf.overflowHidden[A],F,g),role:$,"aria-label":t,"aria-current":e,"aria-labelledby":r,style:U,id:P,...B,ref:V,children:h})]})})));var Kf="_1fyvcoo0 _1fragemwn _1fragem11z _1fragem11k";function Qf({children:e}){const t=i(null),n=i(null),r=i(null),a=i(document.activeElement);l(()=>{const e=r.current;if(e){const t=xf(e);t?t.focus():e.focus()}const t=a.current;if(t)return()=>{t.focus()}},[]);const o=e=>{const t=r.current;if(t){const n=e?xf(t):If(t);n?n.focus():t.focus()}};return d(y,{children:[d("button",{className:Kf,ref:t,"aria-hidden":"true",onFocus:()=>o(!1),type:"button"}),I(e,{tabIndex:-1,ref:r}),d("button",{className:Kf,ref:n,"aria-hidden":"true",onFocus:()=>o(!0),type:"button"})]})}const Xf="scrollbar-gutter",Zf="stable";function ey(){const[e,t]=s(!1),r=i(0),o=i(null),l=i(null),c=n(()=>
2{if(!document.body||o.current)return;const{position:e,top:n,overflow:a}=document.body.style,i=function(e){if(!function(e){return function(e){return window.innerWidth>e.clientWidth}(e)&&(t=window.getComputedStyle(e).getPropertyValue(Xf),!t?.split(/\s+/).includes(Zf));var t}(e))return null;const t=e.style.getPropertyValue(Xf);return e.style.setProperty(Xf,Zf),t}(document.documentElement);o.current={position:e,top:n,overflow:a},l.current=i,r.current=window.scrollY,document.body.style.position="fixed",document.body.style.top=`-${r.current}px`,document.body.style.overflow="hidden",t(!0)},[]),u=n(()=>{if(!document.body)return;var e,n;null!==l.current&&(e=document.documentElement,(n=l.current)?e.style.setProperty(Xf,n):e.style.removeProperty(Xf),l.current=null);const a=o.current;o.current=null,a&&"fixed"!==a.position&&(document.body.style.position=a.position,document.body.style.top=a.top,document.body.style.overflow=a.overflow,window.scrollTo(0,r.current)),t(!1)},[]);return a(()=>()=>{u()},[u]),{isLocked:e,lock:c,unlock:u}}function ty({children:e,isInvisible:n,onClick:r}){const{lock:i}=ey(),{i18n:o}=ie();a(()=>{i()},[i]);const s=t(()=>n?.value??!1),l=d("div",{children:d(x,{when:s,fallback:d(y,{children:[d("div",{className:"hYGiX"}),d("div",{className:"UGCQu",children:e})]}),children:d("div",{className:"yF8Vq",onClick:r,role:"button",tabIndex:0,"aria-label":o.translate("wallets.scrim.cancel"),onKeyDown:e=>{"Escape"!==e.key&&"Enter"!==e.key||!r||r()},children:e})})});return d(eu,{children:d(Qf,{children:l})})}function ny({isOpen:e,isInvisible:t,children:n,onClick:r}){return d(x,{when:e,children:d(ty,{isInvisible:t,onClick:r,children:n})})}function ry({isOpen:e,walletName:t,handleClose:n,handleFocus:r}){return d(ny,{isOpen:e,children:d(ay,{handleClose:n,walletName:t,handleFocus:r})})}function ay({handleClose:e,handleFocus:t,walletName:n}){const{i18n:r}=ie();return d(Nf,{children:d(Jf,{gap:"large-400",alignItems:"center",children:[d(Vf,{size:"large",children:r.translate("wallets.scrim.continue_purchase_in_window",{walletName:t?d(Wf,{tone:"monochrome",onClick:t,children:n}):n})}),d(Vf,{children:[d(Wf,{tone:"monochrome",onClick:e,children:r.translate("wallets.scrim.cancel")})," ",r.translate("wallets.scrim.and_return_to_checkout")]})]})})}function iy(){const{checkout:{offsitePopupController:e}}=ie(),t=Tf();return d(ry,{isOpen:e.isOpen,walletName:t.value??"",handleClose:()=>e.close({runCancelCallback:!0}),handleFocus:()=>e.focus()})}const oy={address1:!0,address2:!0,city:!0,company:!0,countryCode:!0,district:!0,firstName:!0,lastName:!0,line2:!0,neighborhood:!0,phone:!0,postalCode:!0,streetName:!0,streetNumber:!0,subdistrict:!0,zoneCode:!0},sy=new Set(Object.values(zt).flat());function ly(e){return Object.hasOwn(oy,e)}function cy({address:e,addressSettings:t,countryDetails:n}){if(!e)return!1;const{isRequired:r}=t,a=e.countryCode,i=n&&n.code===a&&!n.isFallback?n:void 0,o=i?new Set(Bt({country:i,editFormat:i.formatting.edit,addressSettings:t})):void 0;for(const s of Object.keys(e))if(ly(s)&&!sy.has(s)&&(!o||o.has(s))&&("postalCode"===s&&i?i.postalCodeRequired:r(s,{countryCode:a}))&&(null==e[s]||0===e[s]?.length))return!1;return!0}const uy=re("RequestContext");function dy(){return ae(uy)}const py=["AE","HK","IE","ZA","ES","KR","PA","PT","ID","TH","CN","JP"],my=["JP"];function hy(e,{hiddenFields:t,multiline:n,countryFormat:r,displayName:a}={}){const i=fy(e,a);if(!i)return;const{addr:o,details:s,zoneFormat:l}=i;return Vt(o,s,t,n,r,l)}function gy(e,{hiddenFields:t,countryFormat:n,displayName:r}={}){const a=fy(e,r);if(!a)return;const{addr:i,details:o,zoneFormat:s}=a;return Ut(i,o,t,n,s)}function fy(e,t){const{i18n:n}=ie(),{details:r}=Mt(e?.countryCode);if(!e)return;if(!r&&e.countryCode)return;const a=r??Ft(void 0,n),i=e.countryCode&&py.includes(e.countryCode)?"explicit":"short";return{addr:t??!0?e:{...e,firstName:void 0,lastName:void 0},details:a,zoneFormat:i}}function yy(e){const{details:t,loading:n}=Mt(e?.countryCode);if(!t||!e||n)return{countryName:void 0,zoneName:void 0,loading:n};const r=t.zones.find(t=>t.code===e.zoneCode)?.name;return{countryName:t.name,zoneName:r,loading:n}}function vy(e){return n(t=>{e.value={coordinates:t.coordinates,address1:t.address1??"",address2:t.address2??"",city:t.city,zoneCode:t.zoneCode,countryCode:t.countryCode,postalCode:t.postalCode,district:t.district,subdistrict:t.subdistrict,streetName:t.streetName,streetNumber:t.streetNumber,line2:t.line2,neighborhood:t.neighborhood}},[e])}const _y=e=>{const t=n((t,n)=>{e[t].value=n},[e]),r=n(()=>{A(()=>{e.address1.value=void 0,e.streetName.value=void 0,e.streetNumber.value=void 0,e.address2.value=void 0,e.line2.value=void 0,e.neighborhood.value=void 0,e.city.value=void 0,e.company.value=void 0,e.coordinates.value=void 0,e.countryCode.value=void 0,e.firstName.value=void 0,e.lastName.value=void 0,e.name.value=void 0,e.phone.value=void 0,e.postalCode.value=void 0,e.zoneCode.value=void 0,e.district.value=void 0,e.subdistrict.value=void 0})},[e]),a=n(t=>{e[t].value=void 0},[e]);return{addressErrors:e,setAddressError:t,resetAddressErrors:r,resetAddressFieldErrors:a}},by=(e,t)=>({resetAddressSuggestions:function(){Object.entries(t).forEach(([n])=>{Object.keys(e).includes(n)&&void 0!==e[n].peek()&&(t[n].value=void 0)}),A(()=>{e.address1.value=void 0,e.streetName.value=void 0,e.streetNumber.value=void 0,e.address2.value=void 0,e.line2.value=void 0,e.neighborhood.value=void 0,e.city.value=void 0,e.countryCode.value=void 0,e.postalCode.value=void 0,e.zoneCode.value=void 0})},resetAddressFieldSuggestions:function(n){t[n].value=void 0,e[n].value=void 0}});function ky(e,t,a,i){const{i18n:o,checkout:s}=ie(),{geolocation:l}=dy(),c=s.configuration.addressSettings.nonBillingAddressSettings.value,u=s.negotiator.current.fields.deliveryNext,{details:d}=Mt(e),{getIsMobilePhoneFieldVisible:p}=Py(),m=s.address.extendedAddressMode.get(e),h=void 0===i?m:i,g=r(()=>d??l.country,[d,l.country]),f=r(()=>s.address.extendedAddressMode.getFormatFromCountry(g,h),[s.address.extendedAddressMode,h,g]),y=r(()=>a??c,[a,c]),v=r(()=>t??[{value:g.code,label:g.name}],[t,g]);return n((e,t)=>qt(e,t,{addressSettings:y,countryDetails:d,fallbackCountry:l.country,editFormat:f,availableCountries:v,deliveryNextValue:u.value,isMobilePhoneFieldVisible:p(t),additionalFieldsEnabled:null!==h,i18n:o}),[y,d,f,l.country,h,v,u,p,o])}const Py=()=>{const{checkout:{identity:e},shopPay:t}=ie(),r="shopPay"===e.current.value,a=t.user.isAuthenticatedUser;return{getIsMobilePhoneFieldVisible:n(e=>r&&!a.value&&"shipping"===e,[r,a])}};function Sy(){const{i18n:e,checkout:{negotiator:n}}=ie(),{shippingAddress:r}=n.parts;return t(()=>{const t=r.fields.firstName.value,n=r.fields.lastName.value,a=r.value.oneTimeUse;return Ht(t)&&Ht(n)&&!a?e.formatName(t,n,!0):null})}function wy(e,t,n,r){const{i18n:a}=ie();
2return function(i){if(e&&n.has(e)){if("label"===i)return a.translate("contact",{scope:r?`optional_${e}`:e});const t=`${n.get(e)}_${i}`;return a.translate("contact",{scope:r?`optional_${t}`:t})}return t}}function Cy({address:e,nameLinePosition:t,addressDisplayName:n,showPhone:r}){const{countryCode:a=""}=e,{details:i,loading:o}=Mt(a),{i18n:s}=ie();return function(e,t,n,r,a,i=!1){const{firstName:o="",lastName:s="",address1:l="",address2:c="",city:u="",postalCode:d="",company:p="",zoneCode:m="",countryCode:h=""}=e,g=p;let f=Ay([o,s]),y=Ay([l,c]),v=Ay([u,m??"",d,h],", ");if(r){const t=my.includes(h),n={countryFormat:t?"explicit":"short",zoneFormat:t?"explicit":"short"};f=function({firstName:e,lastName:t,countryDetails:n,locale:r}){const a=n?.formatting.show;if(!a)return Ay([e,t]);let i="";const o=a.split("_").find(e=>e.includes("{firstName}")||e.includes("{lastName}"));if(o){let n=o.replace("{lastName}",t).replace("{firstName}",e);if(r){const e=r.toLowerCase(),t=e.startsWith("ja")||e.startsWith("zh")||e.startsWith("ko");n.includes("æ§")&&!e.startsWith("ja")&&(n=n.replace("æ§","")),i=t?n.trim().replace(/\s+/g,""):n.trim().replace(/\s\s+/g," ")}}else i=Ay([e,t]);return i}({firstName:o,lastName:s,countryDetails:r,locale:a});const l=["address1","address2","firstName","lastName","company",...i?[]:["phone"]];y=Vt(e,r,["city","zoneCode","postalCode","countryCode","firstName","lastName","company","phone"],!1,n.countryFormat,n.zoneFormat).replace(/\s+/g," "),v=Vt(e,r,l,!1,n.countryFormat,n.zoneFormat).replace(/\s+/g," ")}return n?{nameLine:f,companyLine:g,primary:n,secondary:Ay([y,v])}:{nameLine:f,companyLine:g,primary:Ay(["inline"===t?f:"",g,y],", "),secondary:v}}(e,t,n,o?void 0:i,s.locale,r)}function Ey(e){const{checkout:{negotiator:t}}=ie(),n=`${e}Address`,r=t.parts[n].value,{primary:a,secondary:i}=Cy({address:r,nameLinePosition:"inline"});return`${a} ${i}`}function xy(e,t){const{checkout:n}=ie(),a=t??n.configuration.addressSettings.nonBillingAddressSettings.value,{details:i}=Mt(e),o=i?n.address.extendedAddressMode.getFormatFromCountry(i):void 0;return r(()=>$t({countryDetails:i,format:o,addressSettings:a}),[i,o,a])}function Iy(e,t){const{checkout:r}=ie(),a=t??r.configuration.addressSettings.nonBillingAddressSettings.value,{details:i}=Mt(e);return n((e,t)=>jt({addressType:e,violations:t,countryDetails:i,format:i?r.address.extendedAddressMode.getFormatFromCountry(i):void 0,addressSettings:a}),[i,a,r.address.extendedAddressMode])}function Ay(e,t=" "){return e.filter(Boolean).join(t)}function Ty(e){return"string"==typeof e?""!==e.trim():null!=e}function Ly(e){return Object.entries(e).filter(([e,t])=>ly(e)&&Ty(t)).map(([e])=>e)}function Ny(e){return Ty(e.address1)||Ty(e.streetName)}function Ry(e){const t=Object.fromEntries(Object.entries(e).filter(([t,n])=>ly(t)&&Ty(n)&&!function(e,t,n){if("string"!=typeof n)return!1;if("address1"===t){const t=Qt({countryCode:e.countryCode,address1:void 0,address2:void 0,line2:void 0,streetName:e.streetName,streetNumber:e.streetNumber});return Ty(t)&&n.trim()===t?.trim()}if("address2"===t){const t=Xt({countryCode:e.countryCode,address1:void 0,address2:void 0,line2:e.line2,neighborhood:e.neighborhood});return Ty(t)&&n.trim()===t?.trim()}return!1}(e,t,n)).map(([e,t])=>[e,"string"==typeof t?t.trim():t]).sort(([e],[t])=>e.localeCompare(t)));return Kt(JSON.stringify(t))}function My(e,t,n,r,a,i,o){o.monorailEvent({schemaId:"checkout_address_completion/1.0",payload:{shopId:parseInt(le(r),10),checkoutToken:a||"unknown",country:e||"unknown",section:n,completedFields:t,isBillingDefaultToShippingAddress:i}})}function Dy(){const{checkout:{negotiator:e}}=ie(),t=e.parts.shippingAddress.value,n=!Zt(t),r=hy(t,{hiddenFields:["phone"]});return!n&&r?r:null}function Oy(e){return"failed"===e.status}function zy(e){return"payment"===e.type}function By(e,t){return e&&t&&e.id===t.id&&e.status===t.status}function Vy(e){return"action_required"===e.status&&"complete_payment_challenge"===e.action.type}function Fy(e){return"action_required"===e.status&&"complete_payment_challenge_v2"===e.action.type}function Uy(e){return"complete_payment_challenge"===e.type}function qy(e){return"complete_payment_challenge_v2"===e.type}function jy(e){return{receiptId:e?.id?de(e.id)??e.id:void 0,status:e?.
2status}}function Hy(e=[]){return e?.flatMap(e=>"submitted"===e.status?e.remotePurchaseOrder.deliveryLines?.map(t=>({...t,shopId:e.shopId}))??[]:[])??[]}function $y(e){return e.some(({code:e})=>new Set([...en,...tn]).has(e))}function Yy(e){return e.some(({code:e})=>nn.has(e))}function Wy(e){return e.some(e=>rn.has(e.code)&&"RemoveTermViolation"===e.__typename)}function Gy(e){return e.some(e=>an.has(e.code)&&"RemoveTermViolation"===e.__typename)}function Jy(e){const t=Zy({subscribedViolations:e,onlySubscribeToProgression:!0}),{violations:n,negotiationStage:r}=t.snapshot.value;return{hasViolations:n.size>0,violations:n,negotiationStage:r,clearViolations:t.clearViolations}}function Ky(e){return Zy({subscribedViolations:e,onlySubscribeToProgression:!1})}function Qy(e){return Zy({subscribedViolations:e,onlySubscribeToProgression:!0,skipProgressionNegotiations:!0})}function Xy(e){const{checkout:{wallets:t}}=ie(),n=Ky(e);return P(()=>{t.activeSession.value&&n.violations.value.size>0&&o(()=>{n.clearViolations()})}),n}function Zy({subscribedViolations:e,onlySubscribeToProgression:r,skipProgressionNegotiations:i}){const{observability:o,checkout:{wallets:s,negotiator:l}}=ie(),{lastJourneyProgression:c,lastNegotiation:u}=l,d=r?c:u,p=m({violations:new Set}),h=t(()=>p.value.violations),g=n(()=>{p.value={violations:new Set}},[p]),f=T(e);return a(()=>d.subscribe(e=>{if(s.activeSession.value)return;if("invalid"===e.type)return void o.log("violations_subscription_invalid_result_detected","Not updating violation subscription because of invalid result",{reasons:e.reasons,beforeViolations:h.value});if("error"!==e.type&&"success"!==e.type)return;if(i&&"progression"!==e.negotiationStage&&"completion"!==e.negotiationStage)return;const t=f.value.size>0,n=e.violations.filter(e=>!t||f.value.has(e.code));p.value={violations:new Set(n),negotiationStage:e.negotiationStage}}),[f,o,s,d,i,p,h]),{snapshot:p,violations:h,clearViolations:g}}function ev(e){const{checkout:t,embed:r}=ie(),o=t.wallets.activeSession.value,l=t.latestReceipt.value,{delegatedPaymentInstrument:c}=t.negotiator.context,[u,d]=s(),p=i(c.peek()),m=n(()=>{d(void 0)},[]),h=n(t=>{e.has(t.code)?d(t.code):d(void 0)},[e]);return a(()=>{o||"failed"===l?.status&&"payment"===l.failure?.type&&h(l.failure)},[o,h,l]),a(()=>{if(!r)return;const e=c.value;e!==p.current&&(p.current=e,e&&d(void 0))},[r,c.value]),{error:u,hasError:Boolean(u),clearError:m}}function tv(e){if("failed"===e?.status&&"hsa_qualification"===e.failure.type&&"SURVEY_EXITED"!==e.failure.code)return e.failure}function nv(){const{checkout:e}=ie(),t=e.wallets.activeSession.value,n=e.latestReceipt.value,[r,i]=s(()=>t?void 0:tv(n));return a(()=>{t||i(tv(n))},[t,n]),{error:r,hasError:void 0!==r}}function rv(){const{checkout:e}=ie(),t=e.wallets.activeSession.value,n=e.latestReceipt.value,[r,i]=s(!1);return a(()=>{t||("failed"===n?.status&&"inventory"===n.failure?.type?i(!0):i(!1))},[t,n]),{hasError:r}}function av(){const{checkout:e}=ie(),t=e.wallets.activeSession.value,n=e.latestReceipt.value,[r,i]=s(!1);return a(()=>{t||("failed"===n?.status&&"order"===n.failure?.type?i(!0):i(!1))},[t,n]),{hasError:r}}function iv(e){const{checkout:{negotiator:n}}=ie(),{allViolations:r}=n.current.fields;return t(()=>Boolean(r.value?.some(t=>t.code===e)))}function ov(e){return e?"object"==typeof e&&"value"in e?e.value&&"string"==typeof e.value?e.value:e.textValue?e.textValue:"":"string"==typeof e?e:"":""}function sv(){const e=Og(),{message:t,code:n}=function(){const{checkout:e}=ie(),t=e.wallets.activeSession.value,n=e.latestReceipt.value,[r,i]=s(null),[o,l]=s("");return a(()=>{t||n&&Oy(n)&&("payment"===n.failure.type?(i(n.failure.code??null),l("payment_receipt_error")):l(`${n.failure.type}_receipt_error`))},[n,t]),{hasError:Boolean(o),message:o,code:r}}();a(()=>{(t||n)&&e("receiptError",{error:{message:t,code:n||"",silencedViolation:!1,origin:"server",type:"submit-violation"},timestamp:new Date})},[e,t,n]);const{checkout:{negotiator:r}}=ie(),{directPaymentErrors:i,generalPaymentError:l}=r.parts;P(()=>{const t=i.name.value;t&&o(()=>{const{message:n,origin:r}=t;
2e("paymentError",{error:{message:n,code:"payment_name_error",silencedViolation:!1,origin:r,type:"client"===r?"inline-validation":"submit-violation"},timestamp:new Date})})}),P(()=>{const t=i.verificationValue.value;t&&o(()=>{const{message:n,origin:r}=t;e("paymentError",{error:{message:n,code:"payment_cvv_error",silencedViolation:!1,origin:r,type:"client"===r?"inline-validation":"submit-violation"},timestamp:new Date})})}),P(()=>{const t=i.number.value;t&&o(()=>{const{message:n,origin:r}=t;e("paymentError",{error:{message:n,code:"payment_number_error",silencedViolation:!1,origin:r,type:"client"===r?"inline-validation":"submit-violation"},timestamp:new Date})})}),P(()=>{const t=i.expiry.value;t&&o(()=>{const{message:n,origin:r}=t;e("paymentError",{error:{message:n,code:"payment_expiry_error",silencedViolation:!1,origin:r,type:"client"===r?"inline-validation":"submit-violation"},timestamp:new Date})})}),P(()=>{const t=l.value;t&&o(()=>{e("paymentError",{error:{message:t,code:"general_payment_error"},timestamp:new Date})})});const c=function(){const[e,t]=s([]),[n,r]=s(null),{violations:i}=Jy(new Set);return ac(e=>{"invalid"===e.type?r(e):r(null)}),a(()=>{let e=null;if(n){const t=n.reasons.filter(e=>e!==Wt.InvalidAddress)[0];t&&(e={message:t,origin:"server",type:"negotiation"})}const r=[];Array.from(i).forEach(e=>{r.push({message:e?.localizedMessage??"",code:e?.code,origin:"server",type:"negotiation"})});const a=[...r];e&&a.push(e),t(a.filter(e=>Boolean(e)))},[n,i]),e}();a(()=>{c?.forEach(({message:t,code:n,field:r,origin:a,type:i})=>{e("violationError",{error:{message:ov(t),code:n,field:r,origin:a,type:i},timestamp:new Date})})},[e,c]);const{deliveryMethodsAddressErrors:u}=r.context,d=function(e){const[t,n]=s(null),[r,i]=s([]);return P(()=>{Object.entries(e).forEach(([e,t])=>{const r=t.value;n(t=>{let n=null===t?{}:{...t};return r?n={...n,[e]:r}:delete n[e],0===Object.keys(n).length?null:n})})}),a(()=>{if(t){const e=[];Object.keys(t).forEach(n=>{const{message:r,origin:a,type:i}=t[n];e.push({message:r,code:void 0,field:n,origin:a,type:i})}),i(e)}},[t]),r}(u);return a(()=>{d?.forEach(({message:t,code:n,field:r,origin:a,type:i})=>{(t||n||r||a||i)&&e("addressError",{error:{message:ov(t),code:n,field:r,origin:a,type:i,silencedViolation:!1},timestamp:new Date})})},[e,d]),null}function lv(e){return e}function cv(e,t){if(t)return e.find(e=>e.deliveryStrategyHandle===t)}var uv=(e=>(e.TaxExemption="TaxExemption",e.SellingPlanDigest="SellingPlanDigest",e.CompanyLocationChanged="CompanyLocationChanged",e.ShippingAddressIsMissing="ShippingAddressIsMissing",e.PaymentsViolations="PaymentViolations",e.DeliveryViolations="DeliveryViolations",e.DeliveryAddressValidationErrors="DeliveryAddressValidationErrors",e.ReductionViolations="ReductionViolations",e.ContactInformationViolations="ContactInformationViolations",e.TipsViolations="TipsViolations",e.OtherViolations="OtherViolations",e.PaymentSheetViolations="PaymentSheetViolations",e.MerchandiseQuantityRulesNotMet="MerchandiseQuantityRulesNotMet",e.PaymentMethodIncompatibleWithPaymentTerms="PaymentMethodIncompatibleWithPaymentTerms",e))(uv||{});function dv(){const{client:e,shop:t}=ie();if(!t.hasFlagEnabled(un))return null;const n=e.unstable_getSerialization("experiments");return dn(n)}function pv(e){return"thankYou"===e?.type||"postPurchase"===e?.type}function mv(e,t){return void 0!==e.greenPath.find(e=>e.route===t)}const hv=()=>{const{i18n:e,checkout:{negotiator:n}}=ie(),r=n.current.fields.paymentFlexibilityPaymentTermsTemplate,a=ct();return t(()=>{const t=r.value;return a.value&&!t?e.translate("notice_banner.payment_method_not_available_with_review_requirement"):t?"FULFILLMENT"===t.type?e.translate("notice_banner.payment_method_not_available_with_fulfillment_terms"):"NET"===t.type?e.translate("notice_banner.payment_method_not_available_with_payment_terms",{paymentTerms:t.translatedName}):e.translate("notice_banner.payment_method_not_available_with_fixed_terms"):void 0})},gv=re("ShellContext");function fv({children:e,shell:t}){return d(gv.Provider,{value:t,children:e})}function yv(){return ae(gv)}function vv(){const e=yv(),t=i();if(null!=t.current&&t.current.shell!==e&&(t.current=void 0),null==t.current){const n=new Map,r={};for(const t of Object.keys(e.configuration))Object.defineProperty(r,t,{enumerable:!0,get:()=>(n.has(t)||n.set(t,k(()=>e.configurationSignal.value[t])),n.get(t).value)});
2t.current={shell:e,watchedKeysSignals:n,reactiveConfiguration:r}}return t.current.reactiveConfiguration}function _v(){const{checkout:{configuration:e}}=ie(),{orderSummary:t}=vv(),n=e.orderSummary?.currencyBadgeVisibility??t.currencyBadgeVisibility;return!n||"VISIBLE"===n}function bv(e){const{checkout:t,observability:a,router:i,shop:o}=ie(),s=void 0===e||(Array.isArray(e)?e:[e]).some(e=>o.hasFlagEnabled(e)),l=n(e=>{s&&(t.unstable_forceCheckoutLayoutToOnePage(),kv(a,{...e,result:"success"}))},[t,s,a]),c=n((e={wallet:null})=>{if(!s)return;if(!t.isCheckoutLayoutForcedToOnePage.value)return;const n={wallet:e.wallet};a.counter({name:"wallet_3page_vaulted_review_exited",value:1,attributes:n}),a.log("wallet_3page_vaulted_review_exited","Exited the forced one-page wallet vaulted review",n),i.navigate("/information",{replace:!0}),t.unstable_clearForcedCheckoutLayout()},[t,s,a,i]);return r(()=>({forceOnePageCheckoutLayout:l,clearForcedCheckoutLayout:c}),[c,l])}function kv(e,t){e.counter({name:"wallet_3page_vaulted_review_layout_switch_attempt",value:1,attributes:t}),e.log("wallet_3page_vaulted_review_layout_switch_attempt","Attempted to force wallet from three-page checkout to one-page vaulted review",t)}function Pv(){const{i18n:e}=ie(),n=function(){const{checkout:{negotiator:e}}=ie(),n=e.current.fields.paymentMethods,r=vn("paymentMethods");return t(()=>!(r.value||!n.value||0===n.value?.length)&&Boolean(n.value?.every(e=>"wallet"===e.type||"walletsPlatform"===e.type||"giftCard"===e.type)))}(),{availableWallets:r}=gn(),a=T(r);return t(()=>{if(!(a.value.length>0)&&n.value)return{code:uv.PaymentSheetViolations,tone:"critical",localizedMessage:e.translate("payment.no_working_method_error"),nonLocalizedMessage:e.translate("payment.no_working_method_error")}})}function Sv(){const e=Hm(),n=yv(),r=Yp();return t(()=>{const t=e.configurationSignal.value.colors,a=n.configurationSignal.value.main,{current:i,parent:o}=r,s=[i,o].map(e=>e?t.schemes?.[e]?.base?.background:void 0).find(e=>e&&!hn(e));if(s)return s.l<50?"light":"dark";const l=a.colorScheme?t.schemes?.[a.colorScheme]?.base?.background:void 0;return l&&!hn(l)&&l.l<50?"light":"dark"}).value}function wv(){const{shop:{customerAccountRequirement:e},checkout:{negotiator:n}}=ie(),r=n.current.fields.buyerIdentity,{email:a}=n.parts;return t(()=>{const t=Boolean(!!r.value?.customerProfile&&(r.value.customerProfile.email||a.value));return!("REQUIRED"===e||t)})}function Cv(){const{shop:e,checkout:{negotiator:n}}=ie(),{deliveryNext:r}=n.current.fields,{deliveryLines:a}=n.parts,i=nc(),o=xt("ONE_TIME_PURCHASE");return t(()=>{if(e.shipPickupInOneOrderEnabled){if(pv(i.value.currentDetour))return pn(r.value);const e=a.value.filter(e=>!e.value.deliveryMethodTypes.includes("NONE"));return e.length>0&&e.every(e=>e.value.deliveryMethodTypes.some(mn))}const t=It(o.value);return mn(t?.methodType)})}function Ev(){const{checkout:e}=ie(),n=Cv();return t(()=>!n.value&&e.isShippingRequired.value)}function xv(e){const{checkout:{negotiator:n}}=ie(),r=n.current.fields.paymentMethods;return t(()=>r.value?.find(t=>"wallet"===t.type&&t.name===e))}function Iv(){const{client:e,shop:t,source:r,observability:a}=ie(),i=e.unstable_getSerialization("sessionToken");return n(({postalCode:e,countryCode:n,city:o,zoneCode:s},l)=>{const c={wallet:l,postalCode:e,countryCode:n,city:o,zoneCode:s,shopId:t.id,sourceId:r.sourceId,sourceType:r.type,checkoutSessionIdentifier:r.checkoutSessionIdentifier,sessionToken:i};jl(e,n)||a.log("wallets_hooks_incomplete_postal_code_detected","Detected incomplete shipping postal code during wallet payment submission",c),kn(e,n)&&a.log("wallets_shipping_address_invalid_postal_code_detected","Detected padded postal code from wallet payment submission",c)},[a,t.id,r.sourceId,r.type,r.checkoutSessionIdentifier,i])}function Av(){try{const e=window.__WALLET_TIMEOUT_MULTIPLIER;if(null==e)return 1;const t=Number(e);return!Number.isFinite(t)||t<1?1:Math.min(t,10)}catch{return 1}}function Tv(){return 1e4*Av()}function Lv(){return 45e3*Av()}function Nv(e){const n=e.inMemoryApplePayParts.paymentSheetError,r=e.inMemoryGooglePayParts.paymentSheetError;return t(()=>{const e=n.value;if("unusable_partial_address"===e?.type)return"APPLE_PAY";const t=r.value;return"unusable_partial_address"===t?.type?"GOOGLE_PAY":null})}function Rv({applePayPaymentSheetError:e,applePaySubscriptionReviewTransition:t,isApplePaySubscriptionReviewLayoutSupported:n}={}){const{checkout:i,router:o,shop:s}=ie(),l=o.currentUrl.value,c=s.hasFlagEnabled(un),u=_n(),d=s.hasFlagEnabled(fn),p=i.configuration.layout.isOnePage.value,{forceOnePageCheckoutLayout:m}=bv(fn),{queryParam:h,errorMessage:g,errorTitle:f,tone:y}=function(e){const{i18n:t}=ie(),n=hv().value,r=[{queryParam:"wallet_unsupported_apple_pay_payment_method",errorMessage:t.translate("wallets.errors.unavailable_terminal.instructions"),tone:"critical"},{queryParam:"wallet_unsupported_google_pay_payment_method",errorMessage:t.translate("wallets.errors.unavailable_terminal.instructions"),tone:"critical"},{queryParam:"wallets_payment_invalid_country",errorMessage:t.translate("wallets.errors.generic"),tone:"critical"},{queryParam:"wallet_shipping_country_unavailable",errorMessage:t.translate("shipping_errors.unavailable_address_country"),tone:"critical"},{queryParam:"wallet_currency_change",errorMessage:t.translate("change_country.cart_updated_based_on_country"),tone:"info"},{queryParam:"wallet_captcha_required",errorMessage:t.translate("captcha.errors.not_solved"),tone:"info"},{queryParam:"wallet_payment_method_not_applicable",errorMessage:n||"",tone:"info",condition:()=>Boolean(n)},{queryParam:"wallet_invalid_payment_deferred_payment_required",errorMessage:t.translate("notice_banner.company_location_changed"),tone:"info"},{queryParam:"wallet_not_enough_stock",errorMessage:t.translate("stock.price_and_quantity_update.description"),tone:"info"},{queryParam:"wallet_price_increased",errorMessage:t.translate("payment_errors.order_total_changed"),tone:"info"},{queryParam:yn,errorMessage:t.translate("wallets.errors.subscription_review_required"),tone:"warning"},...["wallet_cart_not_ready","localization_extension_field_error","wallet_processing_failed"].map(e=>({queryParam:e,errorTitle:t.translate("notice_banner.generic_processing_error.title"),errorMessage:t.translate("notice_banner.generic_processing_error.body"),tone:"critical"}))];for(const a of r)if(e.searchParams.has(a.queryParam)){if(a.condition&&!a.condition())continue;return{queryParam:a.queryParam,errorMessage:a.errorMessage||"",errorTitle:a.errorTitle,tone:a.tone}}return{queryParam:"",errorMessage:"",tone:"info"}}(l),v=dv(),_=h===yn&&void 0!==t&&(n??Hl({applePayThreePageVaultedReviewEnabled:d,isOnePageCheckout:p})),b=_;return a(()=>
2{if(h){_&&t&&!i.wallets.hasConsumedApplePaySubscriptionReviewParam.value&&bn({isABTestActive:c,variant:v,isCaliforniaBillingOrShippingAddress:u.value})?(p||m({wallet:"APPLE_PAY",reason:"subscriptions",asPaymentMethod:!0}),i.wallets.consumeApplePaySubscriptionReviewParam(),e&&(e.value=void 0),t.value="storefront_redirect",i.wallets.setHasActiveApplePaySubscriptionReview(!0)):_&&void 0!==t?.value&&!i.wallets.hasConsumedApplePaySubscriptionReviewParam.value&&(t.value=void 0,i.wallets.setIsDecelerating(!1));const n=new URL(l);n.searchParams.delete(h),history.replaceState(null,"",n.href)}},[e,t,v,l,m,c,u,p,h,b,_,n,i.wallets]),r(()=>({queryParam:h,errorMessage:g,errorTitle:f,tone:y,shouldSuppressNotice:b}),[h,g,f,y,b])}const Mv=()=>n(e=>{const t=e.current;if(t){const e=t.getBoundingClientRect(),n=e.left+e.width/2,r=e.top+e.height/2;t.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!1,clientX:n,clientY:r,screenX:window.screenX+n,screenY:window.screenY+r}))}},[]);Pn.portableWallets.url;const Dv="guest";function Ov(e){const{checkout:{negotiator:n}}=ie(),r=n.current.fields.paymentMethods;return t(()=>r.value?.find(t=>"walletsPlatform"===t.type&&t.name===e))}function zv(e){const{checkout:{negotiator:n}}=ie(),r=n.current.fields.paymentLines;return t(()=>r.value?.lines.find(t=>"walletsPlatformPaymentMethod"===t.method.type&&t.method.name===e))}function Bv(){const{checkout:{negotiator:e}}=ie(),{email:t,shippingAddress:r,billingAddress:a,billingAddressOption:i,paymentLines:o}=e.parts,s=function(){const{checkout:e}=ie(),t=e.configuration.addressSettings.nonBillingAddressSettings;return n(function({addressSignal:e,buyerDetailsAddress:n}){A(()=>{for(const[r,a]of Object.entries(n)){if("__typename"===r||void 0===a)continue;if("InvalidWalletPrefillingAddress"===n.__typename&&!t.value.isVisible(r))continue;const i=e.fields[r];i&&(i.value=a)}})},[t])}();return n((e,n)=>{n.email&&(t.value=n.email),n.prefillingShippingAddress&&s({addressSignal:r,buyerDetailsAddress:n.prefillingShippingAddress}),n.prefillingBillingAddress&&(i.value="custom",s({addressSignal:a,buyerDetailsAddress:n.prefillingBillingAddress})),n.walletParams&&function({paymentLineSignal:e,walletName:t,walletParams:n,email:r}){const a={method:{name:t,type:"walletsPlatformPaymentMethod",walletParams:n}},i=e.peek();switch(t){case wn.AmazonPay:case wn.BuyWithPrime:{const[e]=cn(i,[t]),o=n;if(!e||!e.method.walletParams){a.method.walletParams={...o,...r?{email:r}:{}};break}const s=e.method.walletParams;a.method.walletParams={...s,...o,...r?{email:r}:{}}}}e.value=Cn(i,a)}({paymentLineSignal:o,walletName:e,walletParams:n.walletParams,email:n.email??void 0})},[a,i,t,s,o,r])}function Vv(e=["phone"]){const{checkout:{negotiator:t}}=ie(),{shippingAddress:n}=t.parts,r=n.value;return{formattedAddress:hy(r,{hiddenFields:e}),address:r}}function Fv(){const e=Ov(wn.BuyWithPrime);return t(()=>{const{configurationParams:t}=e.value??{configurationParams:{}},{checkoutSupportsSplitCart:n}=t;return Boolean(n)})}var Uv=(e=>(e.Api="ApplePay::Exception::API",e))(Uv||{}),qv=(e=>(e.Api="PayPal::Exception::API",e.Sdk="PayPal::Exception::SDK",e.Button="PayPal::Exception::Button",e))(qv||{}),jv=(e=>(e.Available="available",e.Loading="loading",e.Error="error",e))(jv||{});function Hv(e,t,n){return!("SHOP_PAY"===e&&!n)&&(t?.includes("ACCELERATED_CHECKOUT")??!1)}function $v(e){const{embed:t}=ie(),n=Boolean(t?.isFlagshipPartner)&&!En(t?.embedder),a=e.buttonStatus.value;return r(()=>"error"!==a.status&&"not_eligible"!==a.status&&(!n||"not_rendered"!==a.status),[a.status,n])}function Yv(e,t,n){try{return n()}catch(r){if(r instanceof Error&&"InvalidAccessError"===r.name)return e.log(`apple_pay_session_${t}_error`,`Apple Pay ${t} check failed from insecure context`,{errorName:"InvalidAccessError"}),!1;throw r}}function Wv(e,t=0){const n="undefined"==typeof window?0:window.innerWidth;return n<=279?2:n<=375?e||3===t?3:2:4}function Gv(){const{shop:{shopPayEnabledForPrimarySellerOfRecord:e},checkout:{negotiator:n}}=ie(),{shopPayEnabledForSellerOfRecord:r}=n.current.fields;return t(()=>r.value??e)}function Jv(){const{shop:{hasMultipleLegalEntities:e},checkout:{identity:n,negotiator:r}}=ie(),a=Gv(),i=Ln(),{deferredTotal:o}=r.current.fields,s=n.current;return t(()=>i.value&&o.value?"deferred_payment":"shopPay"===s.value&&e||a.value?void 0:"shop_pay_disabled")}function Kv(){const e=Jv();return t(()=>void 0===e.value)}function Qv(e){const{inMemoryGooglePayParts:o,inMemoryPayPalParts:s,inMemoryAmazonPayParts:l,inMemoryApplePayParts:c,inMemoryVenmoParts:u}=e,{client:{userAgent:d},checkout:{negotiator:p}}=ie(),{value:m}=p.current.fields.paymentMethods,h=m?.some(e=>"wallet"===e.type&&"APPLE_PAY"===e.name)??!1,g=function(e){const n=Nv(e);return t(()=>null!==n.value)}(e);
2!function(e){const t=Nv(e),n=e.didIncrementUnusablePartialAddressMetric,{observability:r}=ie();a(()=>{const e=t.value;n.value||null===e||(r.leaveErrorBreadcrumb("Hiding some wallets due to unusable partial address",{wallet:e}),r.counter({name:"wallets_unusable_partial_address",value:1,attributes:{wallet:e.toString()}}),n.value=!0)},[t.value,r,n])}(e);const f=g.value,y=function({inMemoryGooglePayParts:e,hasUnusablePartialAddress:t}){const{checkout:n,shop:a}=ie(),{shippingCountries:i}=a,o=n.configuration.addressSettings.nonBillingAddressSettings.value.isRequired("company"),s=e.sdkStatus.value,l=e.buttonStatus.value,c=n.configuration.layout.isOnePage.value,u=a.hasFlagEnabled(xn);return r(()=>!(o&&!c&&!u||"error"===s.status||"error"===l.status||"not_eligible"===l.status||n.isShippingRequired.value&&0===i?.length||t&&!c),[o,l.status,s.status,n.isShippingRequired,i?.length,c,u,t])}({hasUnusablePartialAddress:f,inMemoryGooglePayParts:o}),v=function({hasApplePayPaymentMethod:e,hasUnusablePartialAddress:t,inMemoryApplePayParts:n}){const a=dy().geolocation.country.code,{shop:o,observability:s,client:{userAgent:l},embed:c}=ie(),u=o.hasFlagEnabled(In)?c?.client?.embedderHostname:void 0,d=i(),p=gf(),m=Tt().value,[h]=Oh(),g=h.includes("PICKUP_POINT");return r(()=>!!e&&!t&&!n.sessionLoadFailed.value&&!!m&&!g&&function({geolocatedCountryCode:e,observability:t,slowCanMakePaymentCache:n,isCheckoutEditor:r,userAgent:a,embedderHostname:i}){if(Boolean("undefined"==typeof window||window.self!==window.top)){const e=r||Boolean(i),t=function(e){const t=An(e);return Boolean("Safari"===t?.name&&t.version&&Number(t.version)>=17)}(a);if(!e||!t)return!1}
2const o=Boolean(window.ApplePaySession)&&Yv(t,"hasOwnProperty",()=>ApplePaySession.hasOwnProperty("canMakePayments"))&&function(e){return"function"==typeof ApplePaySession.supportsVersion&&Yv(e,"supportsVersion",()=>ApplePaySession.supportsVersion(Tn))}(t);if(!o)return!1;const s=function(e,t){return void 0!==t.current?t.current:t.current=e.measureSync({name:"apple_pay_can_make_payments_complete",functionToMeasure:ApplePaySession.canMakePayments})}(t,n);return!!s&&("CN"!==e||function(e){const t=e.match(/(\((iPhone|iPad); CPU (iPhone )?OS ((\d+(_?)){1,3}))/g);if(!t)return!1;const n=t[0].match(/(\d+(_?)){1,3}/);if(!n)return!1;const[r,a]=n[0].split("_").map(e=>Number(e));return void 0!==r&&(r>11||11===r&&void 0!==a&&a>=2)}(a))}({geolocatedCountryCode:a,observability:s,slowCanMakePaymentCache:d,isCheckoutEditor:p,userAgent:l,embedderHostname:u}),[e,t,n.sessionLoadFailed.value,m,g,a,s,d,p,l,u])}({hasApplePayPaymentMethod:h,hasUnusablePartialAddress:f,inMemoryApplePayParts:c}),_=function(e){const n=e.sdkStatus,r=e.buttonStatus;return t(()=>n.value.status!==jv.Error&&"error"!==r.value.status)}(l),b=_.value,k=function({inMemoryAmazonPayParts:e}){const n=function(){const{checkout:{negotiator:e}}=ie(),n=e.current.fields.deliveryNext;return t(()=>{const e=n.value;if(!e||"unavailable"===e.status)return!1;const t=e.lines.filter(qe);if(1!==t.length)return!1;const[r]=t;return!!r&&r.methods.some(e=>"LOCAL"===e.methodType)})}(),r=Fv(),a=e.sdkStatus,i=e.buyWithPrimeButtonStatus;return t(()=>r.value&&!n.value&&a.value.status!==jv.Error&&"error"!==i.value.status)}({inMemoryAmazonPayParts:l}).value,P=t(()=>function(e){const{status:t}=e;return"error"!==t&&"not_eligible"!==t}(u.buttonStatus.value)).value,S=function(e){const t=e.buttonStatus.value.status;return n(e=>{if("APPLE_PAY"!==e.name||"error"!==t)return e;const n=e.placements?.filter(e=>"ACCELERATED_CHECKOUT"!==e);return n?.length?{...e,placements:n}:void 0},[t])}(c),w=function(e){const t=e.acceleratedCheckoutButtonStatus.value,r=e.payWithPayPalButtonStatus.value;return n(e=>{if("PAYPAL_EXPRESS"!==e.name)return e;if(!e.placements||0===e.placements.length)return;const n=e.placements.filter(e=>!("ACCELERATED_CHECKOUT"===e&&"error"===t.status||"PAYMENT_METHOD"===e&&"error"===r.status));return 0!==n.length?{...e,placements:n}:void 0},[t.status,r.status])}(s),C=Kv().value,E=r(()=>{const e=function(){const e=m?.filter(e=>("wallet"===e.type||"walletsPlatform"===e.type)&&function(e){const t=e.name;switch(t){case"PAYPAL_EXPRESS":return!0;case"APPLE_PAY":return v;case"GOOGLE_PAY":return y;case wn.BuyWithPrime:return k;case wn.AmazonPay:return b;case"SHOP_PAY":return C;case"SHOPIFY_INSTALLMENTS":return!1;case"VENMO":return P;default:return L(t)}}(e))??[];return Xv(e)}().flatMap(e=>w(e)??[]).flatMap(e=>S(e)??[]),t=function({maxWalletButtonCount:e,userAgent:t}){if(""===t)return Nn;function n(t=[]){const n=t.indexOf(wn.BuyWithPrime);-1!==n&&(n<e||(t.splice(n,1),t.splice(e-1,0,wn.BuyWithPrime)))}if(t.match(/Apple Mail|Chromium|Crosswalk|Dragon|Electron|; MSIE xyz;|Trident 7.0|.\*rv|Pale Moon|Puffin|QQ Browser|SeaMonkey|Sogou Explorer|UC Browser|Vivaldi/i))return["SHOP_PAY","PAYPAL_EXPRESS",wn.BuyWithPrime,wn.AmazonPay,"APPLE_PAY","GOOGLE_PAY","VENMO"];if(t.match(/Edge|Firefox Mobile|Iron|OPR|Yandex Browser/i)||t.match(/Firefox/i)&&!t.match(/Firefox iOS/i))return["SHOP_PAY","PAYPAL_EXPRESS",wn.BuyWithPrime,wn.AmazonPay,"GOOGLE_PAY","APPLE_PAY","VENMO"];if(t.match(/Android/i)){const e=["SHOP_PAY","PAYPAL_EXPRESS","GOOGLE_PAY",wn.BuyWithPrime,wn.AmazonPay,"VENMO"];return n(e),e}if(t.match(/CFNetwork|Chrome Mobile iOS|Coc Coc|Googlebot|Maxthon|Safari|Mobile Safari|Mobile Safari UI\/WKWebView|Oper Mini|Pinterest|Shopify Mobile/i)||t.match(/Safari/i)&&!t.match(/Chrome/i)){const e=["SHOP_PAY","PAYPAL_EXPRESS","APPLE_PAY",wn.BuyWithPrime,wn.AmazonPay,"GOOGLE_PAY","VENMO"];return n(e),e}if(t.match(/Amazon Silk|Chrome|Chrome Mobile WebView|Chrome Mobile|Opera|Opera Mobile|Samsung Internet/i))return["SHOP_PAY","PAYPAL_EXPRESS",wn.BuyWithPrime,wn.AmazonPay,"GOOGLE_PAY","APPLE_PAY","VENMO"];if(t.match(/Facebook|Instagram|Firefox iOS/)){const e=["SHOP_PAY","PAYPAL_EXPRESS","APPLE_PAY",wn.BuyWithPrime,wn.AmazonPay,"GOOGLE_PAY","VENMO"];return n(e),e}return t.match(/IE/),["SHOP_PAY","PAYPAL_EXPRESS",wn.BuyWithPrime,wn.AmazonPay,"APPLE_PAY","GOOGLE_PAY","VENMO"]}({maxWalletButtonCount:Wv(C,e.length),userAgent:d});return e.sort((e,n)=>t.indexOf(e.name)-t.indexOf(n.name))},[m,v,y,k,b,P,S,w,C,d]);return E}const Xv=e=>e.find(e=>e.name===wn.BuyWithPrime)?e.filter(e=>e.name!==wn.AmazonPay):e;function Zv(){const{checkout:{negotiator:e}}=ie(),n=e.current.fields.paymentMethods,r=vn("paymentMethods");return t(()=>!(r.value||!n.value||0===n.value?.length)&&Boolean(n.value?.some(e=>"wallet"===e.type||"walletsPlatform"===e.type)))}function e_(){const{checkout:e,source:n}
2=ie(),{didIncrementUnusablePartialAddressMetric:r,inMemoryGooglePayParts:a,inMemoryPayPalParts:i,inMemoryVenmoParts:o,inMemoryApplePayParts:s,inMemoryAmazonPayParts:l,inMemoryShopPayParts:c}=gn(),u=T(Qv({inMemoryGooglePayParts:a,inMemoryPayPalParts:i,inMemoryVenmoParts:o,inMemoryApplePayParts:s,inMemoryAmazonPayParts:l,didIncrementUnusablePartialAddressMetric:r})),d=T($v(c)),p=t(()=>u.value?.filter(({placements:e,name:t})=>Hv(t,e,d.value)).length),m=Zv();return t(()=>e.configuration.visibility.showExpressCheckout.value&&(p.value>0||"simulated"===n.type&&!p.value&&m.value))}const t_=f({swappable:new Set,fixed:new Set,supported:new Set,disabled:new Set});function n_({children:e}){const t=r_();return d(t_.Provider,{value:t,children:e})}function r_(){const e=e_(),{shop:{acceptTipPayments:t},checkout:n}=ie(),a=n.configuration.layout.isOnePage.value,i=On(n.identity.current.value),o=!vn("isShippingRequired").value&&!n.isShippingRequired.value;return r(()=>function({showExpressCheckout:e,isOnePageCheckout:t,acceptTipPayments:n,disableDeliveryExtensions:r,isVaultedWalletIdentity:a}){const i=new Set(Dn),o=new Set([...Rn,...Mn]),s=new Set;return e&&!a||s.add("WALLETS1"),r&&s.add("DELIVERY1"),(r||t)&&s.add("DELIVERY2"),t&&(s.add("INFORMATION3"),n||r||(s.add("PAYMENT3"),s.add("PAYMENT4")),(!n&&r||n&&!r)&&s.add("PAYMENT4")),{swappable:i,fixed:o,disabled:s,supported:new Set([...o,...i])}}({showExpressCheckout:e.value,isOnePageCheckout:a,acceptTipPayments:t,disableDeliveryExtensions:o,isVaultedWalletIdentity:i}),[t,o,i,a,e.value])}const a_=new Map([["thankYou",[...Rn,...Mn]]]),i_=w({suspenseName:"extensions",id:()=>"ExtensionsInner",displayName:"ExtensionsInner",load:()=>ul(()=>import("./33682ee7.6ZE8nEnS.js"),__vite__mapDeps([14,2,9,1,3,4,5,15,16,17,8,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,7,10,11]))});function o_(e){const{checkout:{extensibility:{ui:t}}}=ie();return d(n_,{children:d(x,{when:t.enabled,fallback:e.children,children:d(i_,{...e})})})}const s_=re("PostPurchaseContext");function l_({children:e}){const{shop:{postPurchase:{extensionAvailable:t,developmentModeAvailable:n}},router:a}=ie(),i=a.currentUrl.value,o=r(()=>{const e=new URLSearchParams(i.search),t=e.get("script_url"),r=e.get("api_key")||e.get("post_purchase_dev_api_key"),a=e.get("config")??void 0;return n&&t&&r?{scriptUrl:t,apiKey:r,config:a}:void 0},[n,i.search]),s=n&&Boolean(o),l=r(()=>{const e=new URLSearchParams(i.search),t=e.get("uuid"),r=e.get("socket_url");return n&&t&&r?{uuid:t,socketUrl:r}:void 0},[n,i.search]),c=r(()=>{const e=`https://${i.host}/checkouts/unstable/changesets`;return{extensionAvailable:t,postPurchaseEnabled:t||s,developmentMode:s,developmentOptions:o,liveReload:l,changesetsUrl:e}},[t,s,o,l,i.host]);return d(s_.Provider,{value:c,children:e})}const c_=N,u_=c_(({checkout:e,graphql:{coreGraphql:t}},{queueToken:n,serializedReceipt:r,sessionFinished:a})=>{const i=t.query(zn,{variables:{checkpointData:e.checkpointToken.peek()??null,queueToken:n??null},skip:Bn(a,r)});return{context:k(()=>({data:i.data.value??void 0,loading:i.loading.value})),data:i.data,error:i.error}});class d_ extends Error{constructor(){super(...arguments),this.name="InitialNegotiationError"}}const p_=re("NegotiatorContext"),m_=re("InitialNegotiationContext");function h_({children:e}){const{client:t,observability:r,url:a,router:i}=ie(),o=t.unstable_getSerialization("sessionFinished"),s=t.unstable_getSerialization("receipt"),l=t.unstable_getSerialization("queueToken"),{context:c,data:u,error:p}=Vn(u_,{queueToken:l,serializedReceipt:s,sessionFinished:o}),m=function(){const{observability:e}=ie();return n((t,n)=>{const r=Fn(t,n);return r&&(e.counter({name:"negotiation_session_source_missing",value:1}),e.log("negotiation_session_source_missing","An error occurred fetching negotation result due to missing source")),r},[e])}();if(p.value)throw r.leaveErrorBreadcrumb("InitialNegotiation: serialized data",{sessionFinished:o,receiptExist:Boolean(s?.exists),receiptInProgress:Boolean(s?.inProgress),receiptStatus:s?.status}),new d_(`Error loading cart from negotiateFromSessionQuery: ${p.value.message}`);return m(s,u.value?.session?.negotiate)?("undefined"==typeof window?i.redirect(a.c
2art()):window.location.replace(a.cart()),null):d(m_.Provider,{value:c.value,children:e})}function g_(){return ae(m_)}function f_({children:e}){const{router:t,checkout:{negotiator:n}}=ie(),r=n.initializationError.value,{data:i,loading:o}=g_();if(r)throw r;const s=i?.session?.negotiate?.result,c="CheckpointDenied"===s?.__typename;if(l(()=>{n.prepareStartup()},[n]),a(()=>{n.runStartup()},[n]),null==i&&o)return null;if(c){const e=Un(s.redirectUrl,"undefined"==typeof window?t.currentUrl.value.toString():void 0);return"undefined"==typeof window?t.redirect(e):window.location.assign(e.href),null}return d(p_.Provider,{value:n,children:e})}function y_({checkout:e}){if(!e.configuration.layout.isOnePage.value)return!1;const t=e.unstable_graphqlDataRequestInfo?.checkoutSheetProtocolConfig?.schema;return Boolean(t&&qn.has(t))}function v_({checkout:e,mobileCheckoutSdk:t}){if(!e.configuration.layout.isOnePage.value)return!1;const{version:n,schema:r}=t.config;return Boolean(n&&r||t.variant.recovery)}function __({children:e}){return d(y,{children:e})}const b_={"checkout-sheet":w({displayName:"CheckoutSheetProtocolProvider",renderError:S_,renderLoading:__,load:()=>C(()=>ul(async()=>{const{CheckoutSheetProtocolProvider:e}=await(import("./0fb2c600.CzoUzb6z.js"));return{CheckoutSheetProtocolProvider:e}},__vite__mapDeps([54,2,1,3,4,5,11,55,56,57,49,8,7,9,10])).then(({CheckoutSheetProtocolProvider:e})=>({default:e})))}),"mobile-sdk":w({displayName:"MobileCheckoutSdkProvider",renderError:S_,renderLoading:__,load:()=>C(()=>ul(async()=>{const{MobileCheckoutSdkProvider:e}=await(import("./dd9b68fc.DSjJnvwG.js"));return{MobileCheckoutSdkProvider:e}},__vite__mapDeps([58,2,1,3,4,5,55,56,57,49,8,7,9,10,11])).then(({MobileCheckoutSdkProvider:e})=>({default:e})))})};function k_(e){const t=function(e){return y_(e)?"checkout-sheet":v_(e)?"mobile-sdk":null}(e);return t?b_[t]:null}function P_({children:e}){const t=k_(ie());return d(t||y,{children:e})}function S_(e){throw e}const w_=["closeAnnouncement","announcementAfterCollapsed","announcementAfterExpanded","announcementClosed","announcementExpanded","announcementCollapsed"],C_=re("AnnouncementEmitterContext");function E_({children:e}){const t=i(new Map),a=n((e,n)=>{t.current.has(e)||t.current.set(e,new Set);const r=t.current.get(e);r.has(n)||(R(n),r.add(n))},[t]),o=n((e,n)=>{const r=t.current.get(e);if(r)for(const t of r)t(n)},[t]),s=n((e,n)=>{const r=t.current.get(e);r?.has(n)&&(M(n),r.delete(n))},[t]),l=n(e=>{const n=e?[e]:w_;for(const r of n){const e=t.current.get(r);if(e){for(const t of e)M(t);e.clear()}}},[t]),c=r(()=>({on:a,emit:o,off:s,removeAllListeners:l}),[a,o,s,l]);return d(C_.Provider,{value:c,children:e})}function x_(){return ae(C_)}const I_=f(null),A_=re("PendingComponentContext");function T_({children:e}){const t=r(()=>{const e=S(new Set);return{registerComponent:t=>(e.value=new Set([...e.peek(),t]),()=>{e.value=new Set([...e.peek()].filter(e=>e!==t))}),pendingComponentsSignal:e}},[]);return d(I_.Provider,{value:t,children:e})}function L_(){return h(I_)}const N_=re("ExtensionPointContext"),R_=re("ExtensionContext"),M_=re("CheckoutEditorBridgeContext");function D_({children:e}){const t=gf(),n=function(){const{client:e}=ie(),{isCheckoutEditor:t,isServerRendered:n}=e.initialRequest;return!0===t&&!0===n}(),[r,a]=s(null),i=Tt();return t?d(M_.Provider,{value:r,children:[n||r?e:null,d(x,{when:i,children:d(O_,{setContext:a})})]}):e}const O_=w({load:()=>ul(()=>import("./adeb5fdb.DtgMdVgN.js"),__vite__mapDeps([59,2,37,17,1,3,4,5,60,61,57,62,63,7,8,9,10,11]))}),z_=f({loading:!1}),B_="dev";function V_(){return h(z_)}function F_(e){return!(!e?.version||parseInt(e.version,10)<3)}const U_="dev_mode";function q_({children:e}){const t=function(){const e=function(){const{client:e}=ie();return r(()=>{return t=e.cookies,{get:()=>t.get(U_),set:e=>{const n=(new Date).getTime(),r=new Date(n+18144e5);t.set(U_,e,{expiry:r})},remove:()=>{t.delete(U_)}};var t},[e.cookies])}(),{router:t,shop:n}=ie(),i=r(()=>t.currentUrl.value.searchParams.get("dev")??e.get(),[t,e]),o=null!=i&&(n.allowExtensionDevelopment||!1),[s,l]=D((e,t)=>{switch(t.type){case"fetched":{const e=F_(t.workspace)?{...t.workspace,extensions:(n=t.workspace.extensions,n.filter(e=>"checkout"===e.surface||!!Array.isArray(e.extensionPoints)&&(e.extensionPoints=e.extensionPoints.filter(e=>"object"==typeof e&&"surface"in e&&"checkout"===e?.surface)).length>0).map(e=>({...e,extensionPoints:e.extensionPoints.map(t=>"object"==typeof t?t:{target:t,metafields:e.metafields,surface:"checkout"})})))}:{...t.workspace,extensions:t.workspace.extensions.map(({extensionPoint:e,...t})=>({version:null,...t,extensionPoints:e?[e]:t.extensionPoints}))};return e.appId&&(e.appId=function(e){const t=e.trim();return t.startsWith("gid://shopify/App/")?t:jn("App",t)}(e.appId)),{loading:!1,workspace:e}}case"error":return{loading:!1}}var n},{loading:o});return a(()=>
2{if(!o)return;let t=!0;return(async()=>{try{const n=await fetch(i),r=await n.json();if(!t)return;e.set(i),l({type:"fetched",workspace:r})}catch{if(!t)return;l({type:"error"})}})(),()=>{t=!1}},[i,e,o]),s}();return d(z_.Provider,{value:t,children:e})}function j_(e,t){return{type:"throttle",label:e.translate("throttle.title"),...t?{behavior:t}:{},route:"/throttle"}}function H_(e){return{type:"processing",label:e.translate("processing.title"),route:"/processing"}}function $_(e){return{type:"thankYou",label:e.translate("thank_you.title"),route:"/thank-you"}}function Y_(e){return{type:"noAddressLocation",label:e.translate("no_address_location.title"),route:"/no-address-location"}}function W_(e){return{type:"stockProblems",label:e.translate("stock.title"),route:"/stock-problems"}}function G_(e,t){return{type:"terminalError",route:"/error",label:e.translate("general.title",{shopName:t})}}function J_(e){return{type:"postPurchase",label:e.translate("post_purchase.title"),route:"/post-purchase"}}function K_(e){return{type:"offsitePaymentFailed",label:e.translate("offsite_payment_failed.title"),route:"/offsite-payment-failed"}}function Q_(e){return{type:"shopPayLogin",label:e.translate("brand.shop_pay"),route:"/shoppay_login"}}function X_(e,{beforeStock:t=[],afterStock:n=[J_(e)]}={}){return[j_(e),H_(e),$_(e),...t,W_(e),...n]}function Z_(e){return{id:"review",label:e.translate("review.title"),route:"/review",features:[]}}function eb(e,t,n){if(!e)return!1;const r=t?.[0]?.method;if("wallet"!==r?.type)return!1;const a=Wl(n);return"APPLE_PAY"===r.name||"PAYPAL_EXPRESS"===r.name&&a}function tb(){const{checkout:e,shop:n,i18n:r}=ie(),{buyerIdentity:a,deliveryNext:i}=e.negotiator.current.fields,o=t(()=>$n(a.value?.purchasingCompany?.location.shippingAddress)?.countryCode),{details:s}=Mt(o.value),l=T(s),c=n.additionalAddressFieldsEnabled;return t(()=>Yn({purchasingCompany:a.value?.purchasingCompany,shippingCountries:n.shippingCountries,addressSettings:e.configuration.addressSettings.nonBillingAddressSettings.value,countryDetails:l.value,editFormat:e.address.extendedAddressMode.getFormat(o.value,null),deliveryNextValue:i.value,additionalFieldsEnabled:c,i18n:r}))}function nb(){const{checkout:{negotiator:e}}=ie(),{buyerIdentity:n}=e.current.fields,r=Be();return t(()=>r.value.enabledDeliveryMethods.includes("PICK_UP")&&Boolean(n.value?.purchasingCompany))}function rb({checkout:e,source:t}){const n=e.proposal.facts.delivery??[];if(Hn(t)&&n.length>0)return n[0]}function ab(){const e=nb(),{checkout:n}=ie(),r=n.negotiator.current.fields.deliveryNext;return t(()=>{const t=n.proposal.facts.delivery??[],a=t.length>0&&t.every(e=>null!==e.pickupAddress);return e.value&&(pn(r.value)||a)})}function ib(){const e=ct(),{checkout:n,source:r}=ie(),{buyerIdentity:a,shippingAddress:i}=n.negotiator.current.fields,o=ab(),s=nb(),l=Uc();return t(()=>!(l.value||!s.value&&!e.value||o.value||Zt(rb({checkout:n,source:r})?.deliveryAddress??i.value)||a.value?.purchasingCompany?.location.shippingAddress))}function ob(){const e=Uc(),n=nb(),{checkout:r,source:a}=ie(),i=r.negotiator.current.fields.buyerIdentity,o=r.proposal.negotiated.fields.mustSelectProvidedShippingRate;return t(()=>{const t=i.value?.purchasingCompany,s=(o.value??!1)||Boolean(rb({checkout:r,source:a}));return Boolean(t)&&(e.value||n.value&&!s)&&r.isShippingRequired.value})}const sb=["contact-information","shipping-address"],lb=["delivery-method"],cb=["payment-methods","billing-address","localization-extension"];function ub(e,t){return e?.id===t?.id&&e?.route===t?.route}function db(e){e.parts.email.value.trim()&&e.parts.acceptEmailMarketing.value&&(e.context.emailMarketingConsentGrantReachedSignal.value=!0)}function pb(){const e=nc(),{checkout:t}=ie(),n=t.negotiator,r=t.configuration.layout.isOnePage.value;return ic(async(t,a)=>{if("completion"===t)return void db(n);if("progression"!==t||a?.prefetch||r)return;const{currentDetour:i,currentPage:o,plan:s}=e.value;if(i||null==o)return;const l=n.current.value,c=s.greenPath.findIndex(e=>ub(e,o)),u=function(e,t,n){return e.slice(t+1).find(e=>null==e.skipOverPage||!e.skipOverPage(n))}(s.greenPath,c,l);("shipping"===o.id||"information"===o.id&&"shipping"===u?.id)&&db(n)}),null}function mb(e){const t="string"==typeof e?e:e.type;return Hn(e)||"draftOrder"===t}function hb(e){if(!("target"in e))return;const[t,n]=(r=e.target,r.split("$.")[1]?.split(".").map(e=>e.replace(/\[\d+\]/g,""))??[]);var r;switch(t){case"payment":return"billingAddress"===n?"billing-address":"payment-methods";case"tip":return"payment-methods";case"buyerIdentity":return"contact-information";case"delivery":return Gn.has(e.code)?"shipping-address":"delivery-method";case"cart":switch(n){case"buyerIdentity":return"contact-information";case"deliveryGroups":return"shipping-address"}}}function gb(e,t=[]){return Boolean(e?.email??e?.phone)&&t.every(e=>
2"contact-information"!==hb(e))}class fb extends dl{constructor(){super(...arguments),this.name="JourneyError"}}class yb extends cl{constructor(){super(...arguments),this.name="SubmitForCompletionNetworkError"}}function vb(e){return Jn(e)&&!e.some(e=>Kn.has(e.code))}function _b(e){return e.some(e=>"UnprocessableTermViolation"===e.__typename&&Qn.has(e.code))}class bb extends cl{constructor(){super(...arguments),this.name="InfiniteRedirectError",this.defaultGroupingHash="InfiniteRedirectError"}}class kb{#O={};#z=null;#B=!1;detectInfiniteRedirect(e,t,n){const r=e.pathname;if(this.#z&&clearTimeout(this.#z),this.#O[r]=(this.#O[r]||0)+1,this.#O[r]>=10&&!this.#B){const a=new bb(`Detected potential infinite redirect: ${this.#O[r]} navigations to ${r} within 200ms`),i=t.value;n.error(a,{severity:"error",metadata:{redirectDetails:{navigationCounts:JSON.stringify(this.#O),currentUrl:e.toString(),path:r,threshold:10,timeframe:200},journeyState:{redirectTo:i.redirectTo?.route}}}),this.#B=!0,this.#O={}}this.#z=setTimeout(()=>{this.#O={},this.#z=null},200)}cleanup(){this.#z&&(clearTimeout(this.#z),this.#z=null)}}function Pb(e){const{router:t,checkout:o,observability:s,source:l}=ie(),c=o.proposal.facts.delivery??[],u=o.negotiator,d=Boolean(o.proposal.facts.requiresShipping),p=Hn(l)?d:o.isShippingRequired.value,m=o.configuration.layout.isOnePage.value,h=function(){const{data:e}=g_();return"NegotiationResultAvailable"===e?.session?.negotiate.result.__typename&&"PendingTerms"===e.session.negotiate.result.sellerProposal.delivery.__typename}(),g=function(){const{data:e}=g_(),{checkout:t}
2=ie(),n=e?.session?.negotiate.result;let r;if("NegotiationResultAvailable"===n?.__typename&&"PendingTerms"===n.sellerProposal.delivery.__typename){const{sellerProposal:e,buyerProposal:t}=n;r=Zn({delivery:e.delivery,buyerDelivery:t.delivery,remoteDelivery:er(e.remote).remoteDelivery})}const{details:a}=Mt(r?.countryCode);return null!=r&&cy({address:r,addressSettings:t.configuration.addressSettings.nonBillingAddressSettings.value,countryDetails:a})}(),f=ab(),y=function(){const e=i(null);return e.current||(e.current=new kb),a(()=>()=>{e.current?.cleanup()},[]),e.current}();!function({observability:e,negotiated:t,plan:n,identity:r,isOnePageLayout:o,initialPath:s,sessionType:l}){a(()=>{const a=t.current.value,i=t.parts.email.value,c=t.current.fields.allViolations.value??[];e.log("journey_init_contact_state","Initial contact-info state captured at journey initialization",{layout:o?"onePage":"threePage",planPages:n.greenPath.map(e=>e.id).join(","),initialPath:s,sessionType:l,identity:r,customerProfileType:a?.buyerIdentity?.customerProfile?.__typename,hasNegotiatedContactEmail:Boolean(a?.contactInfo?.email),hasNegotiatedCustomerProfileEmail:Boolean(a?.buyerIdentity?.customerProfile?.email),hasProposedEmail:Boolean(i),hasMissingContactViolation:c.some(e=>"BUYER_IDENTITY_MISSING_CONTACT_METHOD"===e.code)})},[]);const c=i(!0);P(()=>{const n=t.current.fields.allViolations.value??[];c.current?c.current=!1:n.some(e=>"BUYER_IDENTITY_MISSING_CONTACT_METHOD"===e.code)&&e.log("negotiated_missing_contact_violation_observed","Subsequent negotiation surfaced a missing-contact violation",{hasNegotiatedContactEmail:Boolean(t.current.fields.contactInfo.peek()?.email),hadProposedEmailFallback:Boolean(t.parts.email.peek()),customerProfileType:t.current.peek().buyerIdentity?.customerProfile?.__typename,identity:r,sessionType:l,layout:o?"onePage":"threePage"})})}({observability:s,negotiated:u,plan:e,identity:o.identity.current.value,isOnePageLayout:m,initialPath:t.currentUrl.value.normalizedPath,sessionType:l.type});const{postPurchaseInquiryStatus:v,paymentLines:_}=o.negotiator.parts,b=v.value,k=()=>function({purchasingCompanyHasNegotiatedLocalPickupSelected:e,negotiatedDeliveryPending:t,buyerProposalHasDestination:n,deliveryFact:r,observability:a,negotiatedState:i,plan:o,postPurchaseInquiryStatus:s,proposedPaymentLines:l,receipt:c,sessionType:u,shippingRequired:d,throttle:p,url:m}){const h=o.greenPath.findIndex(e=>{if(e.skipOverPage?.(i))return!1;const t=Dl(e.features,i);return!e.fastForwardThroughPage||!e.fastForwardThroughPage(i,t)}),g=o.greenPath[h],f=[];a.leaveErrorBreadcrumb("Journey:initializeJourney: initial firstPage",{firstPageIndex:h,firstPage:String(g?.id),plan:JSON.stringify(o.greenPath)}),o.greenPath.slice(0,h).forEach(e=>{if("information"===e.id){const t=gb(i?.contactInfo,i.allViolations??[]);a.leaveErrorBreadcrumb("Journey:initializeJourney: revalidating information page",{pageComplete:t,contactInfo:JSON.stringify(i?.contactInfo),violations:i.allViolations??[]}),f.push({id:e.id,skipped:!1,complete:t})}else f.push({id:e.id,skipped:!1,complete:!0})}),f.push({id:g.id,skipped:!1,complete:!1});const y=o.greenPath.findIndex(e=>!(e.route!==m.normalizedPath||e.skipOverPage&&e.skipOverPage(i))),v=l?.some(e=>"direct"===e.method.type&&e.method.sessionId),_=0===i.runningTotal?.amount||v,b="review"===o.greenPath[y]?.id&&!_,k=b?y-1:y,P=Boolean(o.greenPath[k]?.skipOverPage?.(i));if(t&&n&&!P&&k>h&&g?.blockedOnlyByShippingAddress?.(i,Dl(g.features,i))){for(let e=h;e<k;e++){const t=f[e];f[e]=t?{...t,complete:!0}:{id:o.greenPath[e].id,skipped:!0,complete:!0}}f[k]={id:o.greenPath[k].id,skipped:!1,complete:!1},a.log("journey_history_advanced","History advanced past a page blocked only by an unpriced address",{sessionType:u,firstPageIndex:h,currentPageFromUrlIndex:y,advanceTo:k,clamped:b})}const S=f.find(e=>!e.complete&&!e.skipped),w=o.greenPath.findIndex(e=>S?.id===e.id),C=o.greenPath[w],E=o.greenPath[y],x=function({plan:e,isSimulated:t,currentPageFromUrlIndex:n,currentPageFromHistoryIndex:r,canLoadReview:a}){const i=e.greenPath[n];if(t&&i)return i;if(n>=0&&n<=r)return i;const o=e.greenPath[r];if("review"===o?.id&&!a){const t=e.greenPath.findIndex(e=>"review"===e.id);return e.greenPath[t-1]||e.greenPath[0]}return o}({plan:o,isSimulated:"simulated"===u,currentPageFromUrlIndex:y,currentPageFromHistoryIndex:w,canLoadReview:_}),I=o.detours.find(e=>"route"in e&&e.route===m.normalizedPath),A=vb(i.allViolations??[]),T=i.shippingAddress,L=r.length>0&&r[0].deliveryAddress?r[0].deliveryAddress:T,N="BusinessCustomerProfile"===i?.buyerIdentity?.customerProfile?.__typename&&!e&&Xn(L)&&mb(u)&&d,R=new URLSearchParams(m.search),M="processing"===I?.type&&"true"===R.get("post_purchase"),D=("postPurchase"===I?.type||M)&&"success"===s&&"processed"===c?.status&&"created"===c.orderCreationStatus.status,O=("shopPayLogin"===I?.type?o.detours.find(e=>"shopPayLogin"===e.type):void 0)??("offsitePaymentFailed"===I?.type?o.detours.find(e=>"offsitePaymentFailed"===e.type):void 0)??(D?o.detours.find(e=>"postPurchase"===e.type):void 0)??("queued"===p.status?o.detours.find(e=>"throttle"===e.type):void 0)??(A?o.detours.find(e=>"stockProblems"===e.type):void 0)??(N?o.detours.find(e=>"noAddressLocation"===e.type):void 0)??("action_required"===c?.status||"processing"===c?.status||"processing_remote_checkouts"===c?.status?o.detours.find(e=>"processing"===e.type):void 0)??("processed"===c?.status&&c.redirectUrl?o.detours.find(e=>"processing"===e.type):void 0)??("processed"===c?.status?o.detours.find(e=>"thankYou"===e.type):void 0)??("thankYou"===I?.type&&"simulated"===u?o.detours.find(e=>"thankYou"===e.type):void 0);if(a.leaveErrorBreadcrumb("Journey:initializeJourney: resulting currentPage and expectedDetourFromState",{history:JSON.stringify(f.map(e=>e&&{id:e.id,complete:e.complete,skipped:e.skipped})),normalizedUrlPath:m.normalizedPath,currentPageFromHistory:String(C?.id),currentPage:String(x?.id),expectedDetourFromState:O?.route,receipt:JSON.stringify(c)}),null==O&&null==x)throw new fb("Failed to initialize Journey: no detour or current page available",{groupingHash:"JourneyError::InitializeJourneyFailure"});return O?{plan:o,history:f,redirectTo:(z=I,B=O,z?.type===B?.type&&z?.route===B?.route?void 0:O)}:{plan:o,history:f,redirectTo:ub(E,x)?void 0:x};var z,B}({purchasingCompanyHasNegotiatedLocalPickupSelected:f.value,negotiatedDeliveryPending:h,buyerProposalHasDestination:g,deliveryFact:c,observability:s,negotiatedState:u.current.peek(),plan:e,postPurchaseInquiryStatus:b,proposedPaymentLines:_.value,receipt:o.latestReceipt.value,sessionType:l.type,shippingRequired:p,throttle:o.negotiator.throttleState.peek(),url:t.currentUrl.value}),S=r(()=>De((e,n)=>function(e,t,n,r,a){n.leaveErrorBreadcrumb("Journey:updateJourney: initiated with action",{actionType:t.type});const{plan:i}=e,o=e.redirectTo?{...e,redirectTo:void 0}:e,s=r.currentUrl.value.normalizedPath,l=i.greenPath.find(e=>e.route===s),c=i.detours.find(e=>e.route===s);switch(t.type){case"reinitialize":return t.state;case"clearRedirect":return o;case"skipRemainingPages":{const{plan:t,history:r}=e;if(!l){if("thankYou"===c?.type)return e;const t="undefined"!=typeof window&&window.location?window.location.href:"SSR: no location available";throw n.leaveErrorBreadcrumb("Skipping to completion, but no current page",{currentDetour:c,currentUrl:t}),new fb("Missing current page",{groupingHash:"JourneyError::SkipToCompletionNoCurrentPage"})}const a=t.greenPath.findIndex(e=>ub(e,l)),i=r.slice(0,a+1),s=i.pop();i.push({...s,complete:!0});for(let e=a+1;e<t.greenPath.length;e++){const n=i[e];i[e]=n?{...n,skipped:!0}:{id:t.greenPath[e].id,skipped:!0,complete:!1}}return n.leaveErrorBreadcrumb("Journey:updateJourney: on progress, skip to completion",{history:i.map(e=>({id:e?.id,complete:e?.complete,skipped:e?.skipped})),currentDetourRoute:c?.route}),{...o,history:i}}case"progress":{const{plan:r,history:a}=e,{page:i}=t;if(null==i)throw n.leaveErrorBreadcrumb("Journey:updateJourney: progress failed, no next page",{currentPage:l?.id,currentDetour:c?.type,actionType:t.type}),new fb(`Fail to update journey with "${t.type}": attempted to progress without a next page.`,{groupingHash:"JourneyError::UpdateJourneyProgressNoNextPage"});const s=r.greenPath.findIndex(e=>
2ub(e,i)),u=a.slice(0,s);for(let e=0;e<s;e++){const t=u[e];null==t?u[e]={id:r.greenPath[e].id,skipped:!0,complete:!0}:t.complete||(u[e]={...t,complete:!0})}return u.push({id:i.id,skipped:!1,complete:!1}),n.leaveErrorBreadcrumb("Journey:updateJourney: on progress",{history:u.map(e=>({id:e?.id,complete:e?.complete,skipped:e?.skipped})),currentPageRoute:i.route}),{...o,history:u}}case"complete":{const{history:t}=e,r=[...t],a=r.pop();return r.push({...a,complete:!0}),n.leaveErrorBreadcrumb("Journey:updateJourney: on complete, set currentPage to undefined",{history:JSON.stringify(r.map(e=>e&&{id:e.id,complete:e.complete,skipped:e.skipped}))}),{...o,history:r}}case"error":{const{plan:r,history:i}=e,{page:s=l}=t;if(null==s)return n.leaveErrorBreadcrumb("Journey:updateJourney: currentPage from state",{history:JSON.stringify(i.map(e=>e?.id)),currentPage:String(l?.id)}),n.error(new fb(`Fail to update journey with "${t.type}": no next page.`,{groupingHash:"JourneyError::UpdateJourneyErrorCaseNoNextPage"})),{...o,redirectTo:r.greenPath[0]};const u=a?function(e,t,n,r){const a=t.greenPath.findIndex(t=>ub(t,e));if(-1===a)return r.leaveErrorBreadcrumb("validatePrerequisitesForPage: target page not found in plan",{targetPageId:e.id,targetPageRoute:e.route}),t.greenPath[0];if(!n)return r.leaveErrorBreadcrumb("validatePrerequisitesForPage: no negotiated context available",{targetPageId:e.id}),t.greenPath[0];for(let i=0;i<a;i++){const a=t.greenPath[i];let o=!1;if(o="information"!==a.id||gb(n.contactInfo,n.allViolations??[]),!o)return r.leaveErrorBreadcrumb("validatePrerequisitesForPage: prerequisite page not satisfied, redirecting",{targetPageId:e.id,targetPageRoute:e.route,unsatisfiedPrerequisitePageId:a.id,unsatisfiedPrerequisitePageRoute:a.route}),a}return e}(s,r,a.current.peek(),n):s,d=!ub(s,u);a&&d&&n.leaveErrorBreadcrumb("Journey:updateJourney: prerequisite validation redirected",{requestedPage:s.id,redirectedToPage:u.id});const p=r.greenPath.findIndex(e=>ub(e,u));return n.leaveErrorBreadcrumb("Journey:updateJourney: on error",{history:i.map(e=>({id:e?.id,complete:e?.complete,skipped:e?.skipped})),originalTargetPageRoute:s.route,finalTargetPageRoute:u.route,currentDetourRoute:c?.route}),{...o,history:[...i.slice(0,p),{id:u.id,skipped:!1,complete:!1}]}}default:L(t)}}(e,n,s,t,u),k()),[]),w=n(e=>{S.value=e},[S]),C=i(m);C.current!==m&&(C.current=m,w({type:"reinitialize",state:k()}));const E=oe(t.currentUrl.value);return a(()=>t.currentUrl.subscribe(e=>{E.current!==e&&(E.current=e,w({type:"clearRedirect"}),y.detectInfiniteRedirect(e,S,s))}),[t,w,y,S,s,E]),a(()=>t.block(e=>{const n=t.currentUrl.value,r=function(e,t){const n=new URLSearchParams(e.searchParams),r=new URLSearchParams(t.searchParams);return n.sort(),r.sort(),e.pathname===t.pathname&&n.toString()===r.toString()&&JSON.stringify(e.state)===JSON.stringify(t.state)}(n,e);return r&&s.leaveErrorBreadcrumb("[useJourneyTracking] Blocked navigating to same route",{current:{path:n.pathname,search:n.search},requested:{path:e.pathname,search:e.search}}),r}),[t,s]),[S,w]}function Sb(e){return"complete"===e.status||"inactive"===e.status}function wb(e){return"failed"===e?.status||"processed"===e?.status}const Cb="checkout_queue_token",Eb="departure_page";function xb({violations:e,greenPath:t,negotiated:n,currentPage:r}){const a=new Set(e.map(hb)),i=t.filter(e=>!e.skipOverPage||!e.skipOverPage(n)),o=i.findIndex(e=>e.id===r?.id);return(-1===o?i:i.slice(0,o)).find(e=>("function"==typeof e.features?e.features(n):e.features).some(e=>a.has(e)))}function Ib(){const{router:e}=ie(),t=Ab();return n((n,r)=>{const a={pathname:t(n).route,search:e.currentUrl.value.search};r?.replace?e.navigate(a,r):e.navigate(a)},[t,e])}function Ab(){const{observability:e,checkout:{negotiator:t}}=ie(),{history:r,plan:a}=nc().value;return n(n=>function({feature:e,greenPath:t,history:n,negotiated:r,observability:a}){let i=Tb(t,r,e);const o=n.find(e=>!e.complete&&!e.skipped),s=t.findIndex(e=>e.id===i?.id),l=t.findIndex(e=>o?.id===e.id);if(!i||!(s>=0&&s<=l)){const n=t[l]??t[0];a.leaveErrorBreadcrumb(`useNavigateToLastPageWithFeature - chosen page with feature ${e} was not visited by user, defaulting to ${n?.id}`),i=n}return i}({feature:n,greenPath:a.greenPath,history:r,negotiated:t,observability:e}),[a.greenPath,t,r,e])}function Tb(e,t,n){return[...e].reverse().find(e=>("function"==typeof e.features?e.features(t.current.peek()):e.features).includes(n))}const Lb=1500,Nb=450,Rb=64,Mb=14;function Db(e){return"customOnsite"===e.method.type&&1===e.method.paymentBrands?.length&&e.method.paymentBrands.includes("usdc")}function Ob(e){return"customOnsite"===e.type&&1===e.paymentBrands?.length&&e.paymentBrands.includes("usdc")}const zb={id:"9817d119ceb8600c1bba8c69001c927df2599997fe6fd53ca55a3a620881dfe4",type:"query",name:"PollForReceipt",source:""};function Bb(){const{checkout:{negotiator:e}}=ie(),n=e.current.fields.paymentMethods,r=e.parts.paymentLines;return t(()=>{const e=r.value.at(0);return!!e&&(Db(e)||function(e,t){if(!t||0===t.length)return!1;if(!("walletContent"in e.method)||"SHOP_PAY"!==e.method.name)return!1;const n=e.method.walletContent?.paymentMethodIdentifier,r=t.find(e=>Ob(e)&&e.paymentMethodIdentifier===n);return Boolean(r)}(e,n.value))})}const Vb=["post-purchase-e2e-tests.myshopify.com","e2e-post-purchase-testing.myshopify.com"];function Fb(e){const t=location.hostname;return Vb.includes(t)}const Ub=3e3,qb=15e3,jb="hsa_survey_completed";function Hb(e){if(!e)return"";try{return new URL($b(e)).hostname.replace(/^www\./,"")}catch{return e.replace(/^https?:\/\/(www\.)?/,"")}}const $b=e=>e.replace(/^(?:(.*:)?\/\/)?(.*)/i,(e,t,n)=>t?e:`https://${n}`),Yb="3ds_completed",Wb=6e5;function Gb(e){if(!e)return"none";try{const t=new URL($b(e)).hostname.toLowerCase().replace(/^www\./,"");return"hooks.stripe.com"===t?"hooks.stripe.com":"uk.affirm.com"===t?"uk.affirm.com":"sandbox.uk.affirm.com"===t?"sandbox.uk.affirm.com":"affirm.com"===t?"affirm.com":"sandbox.affirm.com"===t?"sandbox.affirm.com":t.endsWith(".affirm.com")?"affirm_subdomain":t.endsWith(".stripe.com")?"
2stripe_subdomain":"other"}catch{return"invalid"}}const Jb=Symbol("pollRequestTimedOut");async function Kb(e,t){let n;const r=new Promise(e=>{n=setTimeout(()=>e(Jb),t)});try{return await Promise.race([e,r])}finally{clearTimeout(n)}}function Qb(e){return"action_required"===e.status&&"complete_payment_challenge"===e.action.type&&e.action.offsiteRedirect}function Xb(e){if(void 0===e)return"";try{const t=new URL(e);return`${t.protocol}//${t.host}`}catch{return""}}const Zb=["failed","processed"];function ek(){const{currentPage:e,currentDetour:r}=nc().value,{observability:o,checkout:{offsitePopupController:s},mobileCheckoutSdk:l,embed:c}=ie(),u=i(),d=function(){const e=z({maxAttempts:120}),{client:t,checkout:r,persistence:o,observability:s,embed:l,source:c,graphql:{coreGraphql:u}}=ie(),d=t.unstable_getSerialization("sessionToken"),p=i(),m=Bb();return a(()=>()=>{p.current=void 0},[]),n(async t=>{const n=Symbol("receipt-poll");p.current=n;const a=r.latestReceipt.value?.id,i=()=>p.current===n&&y&&!(a!==r.latestReceipt.value?.id),h=r.latestReceipt.value;if(null==h?.id||null==h)return;t?.(h),s.log("receipt_polling_detected","[Receipt Polling] Receipt polling started with initial receipt",jy(h));let g,f,y=!0,v=0,_=!1,b=Date.now(),k=!1,P=!1,S=!1;switch(h.status){case"processing":case"processing_remote_checkouts":f=h.pollAt;break;case"action_required":f=await w(h);break;case"polling_for_order":f=sr+Date.now()}async function w(e){return new Promise(t=>{if(r.configuration.isUniversalCheckoutFinalizer&&"complete_payment_challenge"===e.action.type&&!1===e.action.offsiteRedirect&&!m.value||k||(k=!0,rr(l,`action_required_receipt - ${e.action.type}`)),"complete_payment_challenge"===e.action.type){if(m.value)return t(Date.now()+Ub);if(e.action.offsiteRedirect)return t(void 0)}else{if("pre_payment_buyer_action_required"===e.action.type){if(S)return t(Date.now()+Ub);const n=Date.now(),r={...jy(e),actionType:e.action.type,listenerType:"receipt_polling_hsa_survey_listener",modalSourceType:"receipt_action",surface:"checkout-web"},a=({data:e})=>{e?.type===jb&&(window.removeEventListener("message",a),S=!0,v=0,b=Date.now(),s.log("hsa_survey_postmessage_received","[Receipt Polling] HSA survey completed postMessage received",{...r,dataType:jb,elapsedTimeMs:Date.now()-n}),t(Date.now()))};return s.log("hsa_survey_postmessage_listener_started","[Receipt Polling] HSA survey completed postMessage listener started",r),void window.addEventListener("message",a)}if("complete_payment_challenge_v2"===e.action.type){const n=e.timeout?.millisecondsRemaining;return _&&0===n&&(v=0,b=Date.now()),_=Boolean(n),t(_?Date.now()+Ub:Date.now()+ar)}}const n=Date.now(),a="complete_payment_challenge"===e.action.type?e.action:void 0,u={...jy(e),actionType:e.action.type,listenerType:"receipt_polling_three_ds_listener",modalSourceType:"receipt_action",offsiteRedirect:a?.offsiteRedirect,sourceHostCategory:Gb(a?.url),surface:"checkout-web"},d=({data:a,origin:o})=>{if(a.type===Yb){if(clearTimeout(p),window.removeEventListener("message",d),!i()||!By(r.latestReceipt.value,e))return void t(void 0);v=0,b=Date.now();const a=Date.now()-n;s.log("receipt_polling_detected","[Receipt Polling] 3DS challenge event received",{dataType:Yb}),s.log("three_ds_postmessage_received","[Receipt Polling] 3DS postMessage received",{...u,dataType:Yb,elapsedTimeMs:a,originHostCategory:Gb(o)}),t(Date.now())}},p=setTimeout(()=>{window.removeEventListener("message",d),i()&&By(r.latestReceipt.value,e)?(r.unstable_overwriteLatestReceipt({status:"failed",id:e.id,failure:{type:"payment",code:"GENERIC_ERROR"}}),o&&ir(o,c),s.counter({name:"three_d_secure_challenge_timeout",value:1}),s.log("use_receipt_polling_three_ds_challenge_timed_out","3DS challenge timed out",jy(e)),s.log("three_ds_postmessage_timed_out","[Receipt Polling] 3DS postMessage listener timed out",{...u,elapsedTimeMs:Date.now()-n}),t(void 0)):t(void 0)},e.timeout?.millisecondsRemaining??Wb);s.log("receipt_polling_detected","[Receipt Polling] Adding event listener for 3DS challenge event"),s.log("three_ds_postmessage_listener_started","[Receipt Polling] 3DS postMessage listener started",u),window.addEventListener("message",d)})}async function C(){const e={receiptId:r.latestReceipt.value?.id,sessionToken:d},t=await Kb(u.staticQuery(zb,{cache:!1,variables:e}),qb);if(t!==Jb)return t;if(E(1),!i())return;const n=u.query(zb,{cache:!1,variables:e});try{const e=await Kb(Promise.resolve(n.refetch()),qb);if(e!==Jb)return e}finally{n[Symbol.dispose]()}E(2)}function E(e){s.log("receipt_polling_request_timed_out","[Receipt Polling] Receipt poll request timed out",{...jy(r.latestReceipt.value),attempt:e,timeout:qb})}for(;null!=f;){await B(f-Date.now());const n=Date.now()-b;if(++v,!_&&v>120&&n>12e4&&(y=!1,s.leaveErrorBreadcrumb("[ReceiptPolling] Receipt polling timeout",{...jy(h),pollAttempts:v}),s.counter({name:"receipt_polling_timeout",value:1}),s.log("use_receipt_polling_polling_timed_out","Receipt polling timed out",{...jy(r.latestReceipt.value),timePolling:n,pollAttempts:v})),!i())break;const a=await C(),l=a?.data,u=a?.error;if(u||null==l||"ReceiptNotFound"===l.receipt.__typename){if(!i())break;f=Date.now()+(e.next().value||6e4);continue}if(!i())break;const d=g?Date.now()-g:0,p=Fb()?3e4:1e4,k=!!g&&d>=p;let S;if(!P)try{S=await or()}
2catch(x){if(!i())break;P=!0,s.leaveErrorBreadcrumb("[ReceiptPolling] Receipt mapper failed to load during polling",{error:String(x),receiptType:l.receipt.__typename})}if(P){if("ProcessingReceipt"===l.receipt.__typename||"WaitingReceipt"===l.receipt.__typename){e.reset(),f=Date.now()+l.receipt.pollDelay;continue}if("ProcessedReceipt"!==l.receipt.__typename)break;if(e.reset(),l.receipt.redirectUrl){window.location.replace(l.receipt.redirectUrl);break}if(l.receipt.orderStatusPageUrl){window.location.replace(l.receipt.orderStatusPageUrl);break}f=sr+Date.now();continue}if(!i())break;if(!S)break;e.reset();const E=S(l.receipt,{pollingTimeoutReached:k});"polling_for_order"===r.latestReceipt.value?.status&&"processed"===E?.status&&(k?s.counter({name:"PostPurchase_order_polling_timeout",value:1}):s.histogram({name:"PostPurchase_order_polling_duration",value:d}));const I=!(!m.value&&Qb(E)||By(E,h)),A=jy(h),T=jy(E),L={receiptId:T.receiptId,status:T.status,prevReceiptId:A.receiptId,prevReceiptStatus:A.status};if(I?(s.log("receipt_polling_detected","[Receipt Polling] Overwriting receipt with latest update",L),r.unstable_overwriteLatestReceipt(E)):By(E,h)&&s.log("receipt_polling_detected","[Receipt Polling] Skipped overwriting receipt with same receipt",L),!i())break;if(t?.(E),"processing"===E.status||"processing_remote_checkouts"===E.status)f=E.pollAt;else if("action_required"===E.status)f=await w(E);else{if("polling_for_order"!==E.status){o&&ir(o,c);break}f=sr+Date.now(),g||(g=f)}if(!i())break}},[r,o,u,d,s,e,l,m,c])}(),p=function(){const e=Bb();return n((t,n)=>{e.value||Vy(t)&&Uy(t.action)&&t.action.offsiteRedirect&&n(t.action.url)},[e])}(),m=function(){const{checkout:{negotiator:e}}=ie(),n=e.current.fields.paymentMethods,r=e.parts.paymentLines;return t(()=>{const e=r.value.at(0);return!!e&&("customOnsite"===(t=e).method.type&&(t.method.paymentBrands??[]).some(e=>"wechatpay"===e.toLowerCase())||function(e,t){if(!t||0===t.length)return!1;if(!("walletContent"in e.method)||"SHOP_PAY"!==e.method.name)return!1;const n=e.method.walletContent?.paymentMethodIdentifier,r=t.find(e=>{return"customOnsite"===(t=e).type&&(t.paymentBrands??[]).some(e=>"wechatpay"===e.toLowerCase())&&e.paymentMethodIdentifier===n;var t});return Boolean(r)}(e,n.value));var t})}(),h=l.variant.isStandard()||Boolean(c?.isCheckoutKit()),g=n(()=>{document.hidden||(document.removeEventListener("visibilitychange",g),o.log("processing_user_return_to_checkout_initiated","[Processing] User navigated back to checkout after offsite payment",{provider:Xb(u.current)},{exportImmediately:!0}),d(e=>{p(e,()=>{document.addEventListener("visibilitychange",g)})}))},[p,d,o]),f=n(()=>{d(t=>{Zb.includes(t.status)&&s.isOpen.value&&s.close({}),p(t,n=>{o.leaveErrorBreadcrumb("Redirecting to offsite payment",{receipt:t,currentPage:e,currentDetour:r}),o.log("processing_offsite_payment_redirect_initiated","[Processing] Redirecting to offsite payment",{provider:Xb(n),providerUrl:n},{exportImmediately:!0}),s.isOpen.value?s.redirect(n):(m.value?function(e){const t=document.createElement("a");t.href=e,t.rel="noopener",t.referrerPolicy="strict-origin",document.body.appendChild(t),t.click(),t.remove()}(n):window.location.assign(n),u.current=n,h&&document.addEventListener("visibilitychange",g))})})},[p,m,d,h,r,e,g,o,s]);return a(()=>()=>document.removeEventListener("visibilitychange",g),[]),f}function tk(){const{shop:{id:e}}=ie();return r(()=>{const t=e.split("/").pop();if(!t)return;const n=parseInt(t,10);return isNaN(n)?void 0:n},[e])}function nk({mode:e="set",include:t={}}={}){const{shopClientUuid:r=!1,shopId:a=!1}=t,i=ie().embed?.shopClientUuid,o=tk();return n((t,n)=>{a&&void 0!==o&&("set"===e||!t.has("shop_id"))&&t.set("shop_id",String(o));const{embedParam:s,ecAuthParam:l,ecVersionParam:c,ecColorSchemeParam:u,ecDelegateParam:d,checkoutKitBrandingParam:p,checkoutKitVersionParam:m,shopifyEssential:h,skipInterstitial:g,shopClientUuid:f}=function(e,t){return{embedParam:e.get("embed"),ecAuthParam:e.get(ur),ecVersionParam:e.get(lr),ecColorSchemeParam:e.get(cr),ecDelegateParam:e.get(dr),checkoutKitBrandingParam:e.get(mr),checkoutKitVersionParam:e.get(pr),shopifyEsse
2ntial:e.get("shopify_essential"),skipInterstitial:e.get(hr),shopClientUuid:e.get("shop_client_uuid")??t}}(n,i),y=t.has("embed")||t.has("ec_version");("set"===e||!y)&&(s&&t.set("embed",s),c&&(t.set(lr,c),u&&t.set(cr,u),l&&t.set(ur,l),d&&t.set(dr,d),m&&t.set(pr,m),p&&t.set(mr,p)));const v="set"===e||!t.has("shopify_essential");h&&v&&t.set("shopify_essential",h);const _="set"===e||!t.has(hr);if(g&&_&&t.set(hr,g),r){const n="set"===e||!t.has("shop_client_uuid");f&&n&&t.set("shop_client_uuid",f)}},[i,r,a,e,o])}function rk(e,t,n,r,a){const i=e.some(e=>"BUYER_IDENTITY_PERSONAL_ORDER_NOT_ALLOWED"===e.code),o=e.some(e=>"BUYER_IDENTITY_COMPANY_LOCATION_REQUIRED"===e.code);i&&t&&(a.log("redirect_to_storefront","[B2B] Buyer identity violation: personal order not allowed, redirecting to storefront",{redirectSuccess:Boolean(t)}),window.location.replace(t)),o&&window.location.replace(n??r)}function ak(){const{client:e,shop:n,checkout:{negotiator:r,configuration:a}}=ie(),i=r.current.fields.buyerIdentity;return t(()=>Boolean(n.loginLinkVisible)&&n.hasStorefront&&a.allowRedirectToStorefront&&Boolean(e.unstable_getSerialization("loginUrl"))&&"OPTIONAL"===n.customerAccountRequirement&&!i.value?.customerProfile)}function ik(){const{shop:e,checkout:{identity:n,configuration:r,negotiator:a},mobileCheckoutSdk:i,source:o}=ie(),s=a.current.fields.buyerIdentity,l="shopPay"===n.current.value;return t(()=>{const t="OPTIONAL"===e.customerAccountRequirement,n="REQUIRED"===e.customerAccountRequirement,a="DISABLED"===e.customerAccountRequirement;return"draftOrder"!==o.type&&e.hasStorefront&&!i.variant.isPartner()&&r.allowRedirectToStorefront&&!l&&(t||n||a&&Boolean(s.value?.customerProfile))})}function ok(){const{checkout:{negotiator:e}}=ie(),t=e.current.fields.buyerIdentity;return n(e=>{const n=t.value?.customerProfile,r=t.value?.purchasingCompany;if(n)return"billing"===e?"CustomerProfile"===n.__typename?n.billingAddresses[0]?.address:r?r.location.billingAddress:void 0:"shipping"===e?"CustomerProfile"===n.__typename?n.shippingAddresses[0]?.address:r?r.location.shippingAddress:void 0:void 0},[t])}function sk(){const{embed:e,mobileCheckoutSdk:n,shop:r,source:a,checkout:{negotiator:i,configuration:o}}=ie(),s=nc(),l=i.current.fields.buyerIdentity,c=Hh(),u=Boolean(e)||n.enabled,d=Boolean(r.remoteShopsConfigMap?.size);return t(()=>{const e=l.value,t=Boolean(r.loginLinkVisible)&&Boolean(e?.customerProfile)&&(e?.purchasingCompany?!u:r.hasStorefront&&o.allowRedirectToStorefront&&"draftOrder"!==a.type);return c&&"thankYou"===s.value.currentDetour?.type&&!d&&t})}function lk(e=!1){const{i18n:n,router:r,shop:a,checkout:{negotiator:i}}=ie(),{buyerIdentity:o}=i.current.fields;return t(()=>{const t=o.value?.purchasingCompany;if(!a.customerAccountLocationsUrl)return;const i=new URL(a.customerAccountLocationsUrl);return i.searchParams.set("return_to",r.currentUrl.value.pathname),t&&!e&&i.searchParams.set("current_location",t.location.id),i.searchParams.set("locale",n.locale),String(i)})}function ck(){const e=i(!0);return l(()=>()=>{e.current=!1},[]),e}const uk=["discountLines","totalSavings","merchandiseLines","deliveryNext"],dk=new Set(["PAYMENTS_GIFT_CARD_DISABLED"]),pk=new Set(["PAYMENTS_GIFT_CARD_CURRENCY_MISMATCH","REDUCTION_GIFT_CARD_ALREADY_APPLIED","PAYMENTS_GIFT_CARD_NOT_FOUND","DISCOUNTS_NOT_FOUND","REDUCTION_INVALID_CODE","REDUCTION_INVALID_DISCOUNT_CODE","PAYMENTS_GIFT_CARD_NON_SUFFICIENT_FUNDS","PAYMENTS_GIFT_CARD_ALREADY_APPLIED","PAYMENTS_GIFT_CARD_BUYING_GIFT_CARD","PAYMENTS_GIFT_CARD_EXPIRED","REDUCTION_INVALID_GIFT_CARD_CODE","PAYMENT_GIFT_CARDS_NOT_ALLOWED_FOR_FIXED_SELLING_PLANS","DISCOUNTS_DISCOUNTS_NOT_ALLOWED_FOR_B2B","PAYMENT_GIFT_CARDS_NOT_ALLOWED_FOR_B2B"]),mk=new Set([...rl,...pk]),hk=new Set(["DISCOUNTS_CURRENTLY_INACTIVE"]),gk=new Set(["DISCOUNTS_HIGHER_VALUE_DISCOUNT_APPLIED"]),fk=new Set([...gk,...mk]);function yk(){const{checkout:{negotiator:e}}=ie(),{paymentLines:t}=e.parts,{voidedGiftCardsSignal:r}=e.context,a=n((e,t)=>{if(t.length<e.length)return[];const n=[];return t.forEach(t=>{const r=t.method;"giftCard"===r.type&&"code"in r&&!e.some(e=>"giftCard"===e.method.type&&"code"in e.method&&r.code===e.method.code)&&n.push(r.code)}),n},[]);return n(({violations:e,remotePaymentLines:n})=>{if(e.some(e=>dk.has(e.code))){const e=a(n,t.value);r.value=e,t.value=n}},[a,t,r])}function*vk(e,t=[]){const{customFields:n,placementReferences:r}=e,a=br(t,r);for(const[i,o]of n.entries())a(kr(o))||(yield`${Pr}[${i}]`)}function _k({violations:e,currentPageId:t,isOnePageCheckout:n}){return e.some(e=>function({violation:e,currentPageId:t,isOnePageCheckout:n}){return!!n||"payment"===t||!(Sr.has(e.code)||wr.has(e.code)||tn.has(e.code))}({violation:e,currentPageId:t,isOnePageCheckout:n}))}function bk(){const{observability:e}=ie();return n(()=>{e.log("stock_problems_page_viewed","Stock Problems page viewed")},[e])}
2class kk extends Error{constructor(){super(...arguments),this.name="ProposalNegotiationError"}}function Pk(){const e=(()=>{const{source:{checkoutSessionIdentifier:e},checkout:{negotiator:n}}=ie(),{email:r}=n.parts;return t(()=>`guest-${e}-${r.value.replace(/[^a-zA-Z0-9]/g,"")}`)})();return{isDismissedGuestModal:n(()=>{try{return Boolean(sessionStorage.getItem(e.value))}catch{return!1}},[e]),setDismissedGuestModal:n(()=>{try{sessionStorage.setItem(e.value,"true")}catch{}},[e])}}const Sk="EU_REVERSE_CHARGE_EXEMPTION_RULE";function wk(){const{checkout:{negotiator:e}}=ie(),r=e.current.fields.taxExemptions,a=function(e){const{checkout:{negotiator:n}}=ie(),{taxExemptions:r}=n.parts,a=T(e);return t(()=>r.value.find(e=>e.handle===a.value))}(Sk).value,i=function(e){const{checkout:{negotiator:t}}=ie(),{taxExemptions:r}=t.parts;return n(t=>{const n=r.value.filter(t=>t.handle!==e);r.value=[...n,{handle:e,details:t}]},[e,r])}(Sk),o=vn("taxExemptions").value,s=vn("shippingAddress").value;if("unavailable"===r.value?.status||!r.value?.available||0===r.value?.available.length)return null;const{available:l}=r.value,c=l.find(e=>xr(e.handle));if(!c?.details)return null;const u=a?.details?.taxId??"",{registrationFormats:d,warnings:p}=c.details,m=e=>Ir(e,d),h=o?{type:"pending"}:u?m(u)?u===c.details.taxId&&c.details.status?{type:"resolved",validationStatus:c.details.status}:{type:"resolved",validationStatus:null}:{type:"invalid_format"}:{type:"resolved",validationStatus:null};return{applied:c.applied,taxId:{warnings:p,value:u,loading:o||s,set:e=>{i({taxId:e.toUpperCase()})},status:h,reset:()=>i({taxId:""}),validated:{status:c.details.status,taxId:c.details.taxId},format:{valid:!!u&&m(u),validate:m}}}}function Ck(){const{userEvents:e}=ie(),t=Ek();return({vatId:n})=>{const r=t.build({eventType:"NEGOTIATE",vatId:n});e.monorailEvent(r)}}function Ek(){const{client:e,shop:t,source:n,checkout:{negotiator:r}}=ie(),a=e.unstable_getSerialization("requestId"),i=r.current.fields.buyerIdentity.value?.customerProfile,{shippingAddress:o,billingAddress:s,email:l}=r.parts,c=wk();return{build:({eventType:e,vatId:r})=>{return{schemaId:"taxes_vat_id_checkout_lifecycle_event/1.0",payload:{eventType:e,shopId:Number(le(t.id)),customerId:Tk(i),checkoutToken:n.
2checkoutSessionIdentifier,requestId:a,vatId:r,vatIdValidationStatus:xk({taxId:c?.taxId,eventType:e}),applied:c?.applied,email:l.value,userAgent:(u=navigator,void 0===u?void 0:u.userAgent),...Ik(o.value),...Ak(s.value)}};var u}}}function xk({taxId:e,eventType:t}){if("NEGOTIATE"!==t&&e){if("invalid_format"===e.status.type)return"INVALID_FORMAT";if("pending"===e.status.type)return"PENDING";if(e.status.validationStatus)return String(e.status.validationStatus)}}function Ik(e){return e?{shippingCompanyName:e.company,shippingAddress1:e.address1,shippingAddress2:e.address2,shippingCity:e.city,shippingZipcode:e.postalCode,shippingProvinceCode:e.zoneCode,shippingCountryCode:e.countryCode}:{}}function Ak(e){return e?{billingCompanyName:e.company,billingAddress1:e.address1,billingAddress2:e.address2,billingCity:e.city,billingZipcode:e.postalCode,billingProvinceCode:e.zoneCode,billingCountryCode:e.countryCode}:{}}function Tk(e){if(!e)return;const t=Number(le(e.id));return isNaN(t)?void 0:t}function Lk(e,t){const{checkout:r,shop:a,observability:i,url:o,router:s}=ie(),l=function(){const{checkout:{negotiator:e}}=ie(),t=ck(),{setGuestDismissedModalKey:r}=function(){const{setDismissedGuestModal:e}=Pk(),{shopPay:t}=ie();return{setGuestDismissedModalKey:n(()=>{t.userIdentified.value&&e()},[e,t.userIdentified])}}();return n(async({onComplete:n,setSubmitting:a,...i})=>{r(),a(!0);const o=await e.complete({...i});t.current&&(a(!1),await(n?.(o)))},[t,e,r])}(),{plan:c}=nc().value,u=r.negotiator,d=r.negotiator,p=Ib(),m=lk(!0),h=yk();return function(){const{userEvents:e}=ie(),t=Ek(),n=wk();ic(async(r,a)=>{if("completion"!==r)return;if(a?.retry)return;if(!n)return;const{value:i}=n.taxId,o=t.build({eventType:"PAY_NOW_CLICKED",vatId:i});e.monorailEvent(o)})}(),n(async(n,g,f,y)=>{const{skipToCompletion:v,..._}=y??{};"processing"!==g?.type&&v&&(i.leaveErrorBreadcrumb("Journey:updateJourney: updating journey HistoryMark onSubmitForCompletion if skipToCompletion is true and detourType is not processing",{skipToCompletion:!0,detourType:g?.type}),e({type:"skipRemainingPages"}));let b=1;const k=async()=>{let y=!1;await d.waitForPendingNegotiations({setProgressing:t});const P=b<1;await u.runBeforeNegotiationListeners("completion",P?{retry:!0}:void 0),await l({..._,setSubmitting:e=>u.setSubmitting(e),setProgressing:t,onValidationSuccess:()=>{_.onValidationSuccess?.(),t(!0)},async onComplete(l){if("stale"===l.status&&"interceptors"===l.phase&&b>0)return b-=1,y=!0,t(!0),void i.log("submit_for_completion_stale_retried","Stale completion retried automatically");switch("stale"===l.status&&b<1&&i.log("submit_for_completion_stale_retry_exhausted","Completion still stale after automatic retry"),await(f?.(l)),l.status){case"success":{r.unstable_overwriteLatestReceipt(l.receipt);const e={type:"complete"};u.recordProgression(e),await u.runListeners(e);break}case"alreadyCompleted":r.unstable_overwriteLatestReceipt(l.receipt);break;case"throttled":{const e=c.detours.find(e=>"throttle"===e.type);if(!e?.route)throw new fb("Throttled, but no detour",{groupingHash:"JourneyError::ThrottledNoDetour"});s.navigate(e.route);break}case"rejected":{if(n||i.leaveErrorBreadcrumb("Journey:updateJourney handled rejected submission with an empty currentPage",{resultStatus:String(l.status)}),e({type:"error",page:n}),_b(l.violations))return window.location.replace(o.login(window.location.href));if(rk(l.violations,a.storefrontUrl,m.value,s.currentUrl.value,i),Jn(l.violations)){s.currentUrl.peek().searchParams.delete(Eb);const e=c.detours.find(e=>"stockProblems"===e.type);if(null==e)throw new fb("Stock problems, but no matching detour",{groupingHash:"JourneyError::StockProblemsNoMatchingDetour"});s.navigate(e.route);break}h({violations:l.violations,remotePaymentLines:l.negotiated?.paymentLines?.lines??[]});const t={type:"error",violations:l.violations,errors:l.errors,negotiationStage:"completion"};if(u.recordProgression(t),await u.runListeners(t),v)break;const r=xb({violations:l.violations,greenPath:c.greenPath,negotiated:l.negotiated,currentPage:n});r&&(s.currentUrl.peek().searchParams.delete(Eb),s.navigate(r.route));break}
2case"invalid":t(!1),await u.runListeners({type:"invalid",reasons:l.reasons});break;case"fetch_failed":case"failed":{const t={type:"failed",reason:l.reason,negotiationStage:"completion",fetchFailed:"fetch_failed"===l.status};if("fetch_failed"===l.status)if(al(l.reason)||!l.isActionable)i.log("use_page_complete_network_error_emitted","submit for completion network error",{reason:l.reason}),i.counter({name:"submit_for_completion_network_error",value:1,attributes:{reason:il(l.reason)}});else{const e=l.reason;i.error(new yb(e,{groupingHash:`Journey::SubmitForCompletion::NetworkError: ${e}`}),{errorClass:"Journey::SubmitForCompletion::NetworkError"})}u.recordProgression(t),await u.runListeners(t),e({type:"error",page:n}),s.currentUrl.peek().searchParams.delete(Eb),p("payment-methods",{replace:void 0!==g});break}default:t(!1),n||i.leaveErrorBreadcrumb("Journey:updateJourney got unexpected submission result with an empty currentPage",{resultStatus:String(l.status)}),e({type:"error",page:n})}"success"===l.status&&"processing"===l.receipt.status||t(!1)}}),y&&await k()};await k()},[t,u,d,l,a,e,r,c.detours,c.greenPath,s,h,o,m,p,i])}const Nk=new Map([["billing-address",["billingAddress"]],["contact-information",["contactInfo"]],["payment-methods",["paymentMethods","captcha"]],["shipping-address",["shippingAddress"]],["delivery-method",["deliveryNext"]]]);function Rk(e,t){const n=Dl(e.features,t),r=new Set(["merchandiseLines"]);for(const a of n){const e=Nk.get(a)??[];for(const t of e)r.add(t)}return r}function Mk({children:e,dispatch:s,progressing:l,onProgressionChange:c}){const u=nc(),{plan:p,currentPage:h,currentDetour:g}=u.value,{observability:f,checkout:y,router:v}=ie(),{postPurchaseInquiryStatus:_}=y.negotiator.parts,b=function(e,t){const{client:r,router:a,checkout:i,shop:o,observability:s,url:l}=ie(),c=i.negotiator,u=r_(),{plan:d,currentPage:p,currentDetour:m}=nc().value,h=i.negotiator,g=r.unstable_legacyNavigationPerformance,f=lk(!0),y=yk(),v=ck(),_=i.configuration.layout.isOnePage,{inMemoryApplePayParts:{asPaymentMethod:b}}=gn(),k=bk();return n(async({onComplete:n,walletValidationAttemptId:r,prefetch:P=!1,negotiationStage:S,...w})=>{const C=p,E=S??"negotiation",x=e=>{if(r)try{s.log("wallet_validation_phase","Wallet validation phase",{attemptId:r,phase:e,negotiationStage:E,prefetch:P,mounted:v.current,hasOnComplete:Boolean(n)})}catch{}};x("entered"),"progression"!==E||P||t(!0),s.debug("negotiation_triggered","Negotiation triggered",{negotiationStage:E}),"progression"===E&&await h.runBeforeNegotiationListeners(E,{prefetch:P});const I=C?Dl(C.features,c.current.value):void 0,A=[...new Set([...w.silenceViolations??[],...vk({customFields:c.current.value.customFields??[],placementReferences:u},I)])];try{x("core_started");const r=await h.negotiate({...w,silenceViolations:A,skipStateUpdates:P,negotiationStage:E});if(x("core_returned"),s.log("negotiation_result_completed","Negotiation result completed",{negotiationStatus:r.status,negotiationStage:E,violations:"violations"in r?Cr(r.violations):void 0}),v.current){if(P)return void x("callback_skipped_prefetch");try{const n="success"===r.status||"error"===r.status;if(n&&Jn(r.violations)){const e=d.detours.find(e=>"stockProblems"===e.type);if(null==e)throw new fb("Stock problems, but no matching detour",{groupingHash:"JourneyError::StockProblemsNoMatchingDetourNegotiate"});return k(),void a.navigate(e.route)}if(n&&_b(r.violations))return s.log("login_failure_triggered","Buyer identity login failure detected, redirecting to login"),window.location.replace(l.login(window.location.href));switch(n&&rk(r.violations,o.storefrontUrl,f.value,a.currentUrl.value,s),n&&y({violations:r.violations,remotePaymentLines:r.negotiated?.paymentLines?.lines??[]}),r.status){case"success":{const e={type:"success",violations:r.violations,errors:r.errors,negotiationStage:E};h.recordNegotiation(e,{progression:!0}),x("listeners_started"),await h.runListeners(e),x("listeners_returned");break}case"alreadyCompleted":i.unstable_overwriteLatestReceipt(r.receipt);break;case"error":{g?.cancelNavigation();const t={type:"error",violations:r.violations,errors:r.errors,negotiationStage:E};h.recordNegotiation(t),("progression"===E||w.runListenersOnError)&&(h.recordProgression(t),x("listeners_started"),await h.runListeners(t),x("listeners_returned")),C&&_k({violations:r.violations,currentPageId:C.id,isOnePageCheckout:_.value})&&e({type:"error",page:C});break}case"throttled":{const e=d.detours.find(e=>"throttle"===e.type);if(!e?.route)throw new fb("Throttled, but no matching detour",{groupingHash:"JourneyError::ThrottledNoMatchingDetour"});a.navigate(e.route);break}
2case"invalid":h.runListeners({type:"invalid",reasons:r.reasons}),C&&e({type:"error",page:C});break;case"denied":case"fetch_failed":C&&e({type:"error",page:C});break;case"stale":case"tooManyRequests":s.log("negotiate_result_no_dispatch","Handling negotiation result without explicit dispatch",{status:r.status,currentPage:C,currentDetour:m,negotiationStage:E});break;default:L(r)}"progression"===E&&t(!1)}finally{x("callback_delivering"),n?.(r),x("callback_returned");const e=b.value&&i.wallets.activeSession.value;if("success"!==r.status&&"violations"in r&&C&&!e){const e=xb({currentPage:C,greenPath:d.greenPath,negotiated:r.negotiated,violations:r.violations});e&&a.navigate(e.route)}}}else x("callback_skipped_unmounted")}catch(T){if(T instanceof Er)return void x("rejected_request_swallowed");x("wrapper_threw");const e=T instanceof Error?T:new kk;if(e)throw e}},[b,i,p,f,e,_,v,c,t,g,u,d,h,y,a,o?.storefrontUrl,k,l,s,m])}(s,c),k=y.negotiator,S=function(e,t,r){const{router:a,observability:i,checkout:o}=ie(),{plan:s}=nc().value,l=o.negotiator,c=o.configuration.layout.isOnePage,u=n((e,n)=>{const r=s.greenPath.slice(n+1).find(t=>null==t.skipOverPage||!t.skipOverPage(e.negotiated));if(!r)throw new fb("Negotiated, but no next page",{groupingHash:"JourneyError::NegotiatedNoNextPage"});t({type:"progress",page:r}),a.navigate(r.route)},[s.greenPath,t,a]);return n(async(t,n)=>{r(!0);const a=s.greenPath.findIndex(e=>ub(e,t)),o=l.current.value,d=Rk(t,o),p=new Set;for(const e of s.greenPath.slice(0,a+1))for(const t of Dl(e.features,o))p.add(t);const m=function(e=[]){const t=[];return e.includes("delivery-method")||t.push("delivery-method"),t.push("payment-terms-changed"),t.push("payment-session"),e.includes("billing-address")||t.push("payment-address"),e.includes("payment-methods")||t.push("captcha"),e?.includes("localization-extension")||t.push("localization-extension"),t}([...p]);try{await e({negotiationStage:"progression",silenceViolations:m,fieldsToResolve:Array.from(d),onComplete(e){switch(i.leaveErrorBreadcrumb("Negotiation completed",{status:e.status,violations:"violations"in e?e.violations.map(e=>e.code):[]}),n?.(e),e.status){case"success":u(e,a);break;case"error":_k({violations:e.violations,currentPageId:s.greenPath[a].id,isOnePageCheckout:c.value})||u(e,a);break;case"fetch_failed":case"invalid":case"stale":case"denied":case"throttled":case"tooManyRequests":case"alreadyCompleted":break;default:L(e)}}})}finally{r(!1)}},[r,s.greenPath,l,e,u,c,i])}(b,s,c),w=Lk(s,c),C=function(e,t,r){const{checkout:a,client:i,shop:o,source:s,observability:l,url:c,router:u}=ie(),d=a.negotiator,p=a.proposal.negotiated.fields.canUpdateMerchandise.value??!0;return n(async(n,m,h)=>{switch(n.type){case"thankYou":case"postPurchase":return void l.log("use_exit_detour_detected",`Tried to progress out of a ${n.type} detour`,{currentPage:m?.route,currentDetour:n.type});case"throttle":r(!0),await new Promise(e=>{if(Sb(a.negotiator.throttleState.peek()))return void e();const t=a.negotiator.listenThrottle(n=>{Sb(n)&&(t(),e())})}),await e({force:!0,silenceViolations:"redirectToCart"===n.behavior?["non-stock",...nr]:["all"],negotiationStage:"progression",onComplete(e){switch(h?.(e),e.status){case"success":if(!m)throw new fb("Exited throttle, but no next page",{groupingHash:"JourneyError::ExitedThrottleNoNextPage"});{t({type:"progress",page:m});const e=`${m.route}${m.queryParams||""}`;u.navigate(e,{replace:!0})}break;case"fetch_failed":case"error":case"invalid":case"stale":case"denied":case"throttled":case"alreadyCompleted":case"tooManyRequests":l.log("use_exit_detour_throttle_negotiation_non_success","Throttle negotiation completed with non-success result",{status:e.status,currentPage:m?.route});break;default:L(e)}}}),r(!1);break;case"stockProblems":if(r(!0),0!==d.parts.merchandiseLines.value.length&&p)await e({force:!0,silenceViolations:["non-stock",...nr],onComplete(e){switch(e.status){case"success":if(!m)throw new fb("Exited stock problems, but no next page",{groupingHash:"JourneyError::ExitedStockProblemsNoNextPage"});t({type:"progress",page:m}),u.navigate(m.route,{replace:!0});break;
2case"fetch_failed":case"error":case"invalid":case"stale":case"denied":case"throttled":case"tooManyRequests":case"alreadyCompleted":l.log("use_exit_detour_stock_problems_negotiation_non_success","[Journey] Exiting stock problems detour with non-success result",{resultStatus:e.status,currentPage:m?.route});break;default:L(e)}}});else{if(!a.configuration.allowRedirectToStorefront){l.log("blocked_redirect_to_storefront","[Journey] Unresolvable stock problems: redirect to storefront was blocked",{hasStorefront:o.hasStorefront,currentPage:m?.route,canUpdateMerchandise:p,merchandiseLinesCount:d.parts.merchandiseLines.value.length});break}l.log("redirect_to_storefront","[Journey] Stock problems exit detour: redirecting to storefront",{redirectSuccess:o.hasStorefront,currentPage:m?.route,canUpdateMerchandise:p,merchandiseLinesCount:d.parts.merchandiseLines.value.length}),tr({client:i,url:c,source:s,configuration:a.configuration})}r(!1);break;case"processing":r(!0),l.log("use_exit_detour_processing_detected","[Journey] Exiting processing detour"),await new Promise(e=>{if(wb(a.latestReceipt.value))return void e();const t=O(()=>{wb(a.latestReceipt.value)&&(t(),e())})}),r(!1);break;case"shopPayLogin":if(r(!0),!m)throw new fb("Exited shop pay login, but no next page",{groupingHash:"JourneyError::ExitedShopPayLoginNoNextPage"});{t({type:"progress",page:m});const e=`${m.route}${m.queryParams||""}`;u.navigate(e,{replace:!0})}r(!1);break;case"offsitePaymentFailed":r(!1);break;case"noAddressLocation":case"terminalError":throw new fb(`Can't progress out of a ${n.type} detour`,{groupingHash:"JourneyError::CantProgressOutOfDetour"});default:L(n)}},[l,r,e,t,u,d.parts.merchandiseLines,p,i,c,s,o.hasStorefront,a])}(b,s,c),E=function({plan:e,currentDetour:t,dispatch:r,onProgressionChange:o,negotiate:s,negotiated:l,proposedPostPurchaseInquiryStatus:c}){const u=ie(),{checkout:d,embed:p,persistence:m,source:h,observability:g,client:f,mobileCheckoutSdk:y,router:v}=u,{configuration:_}=d,b=d.latestReceipt.value,{hasExternalReceiptHandling:k}=_,P="shopPay"===d.identity.current.value,S=Ab(),w=gf(),C=gr(),E=ek(),x=b?.id,I=u.checkout.negotiator,T=u.checkout.configuration.layout.isOnePage,N=$h()&&!fr(v.currentUrl.value.search),R=d.negotiator.throttleState.peek().token,M=nc(),D=qc(),O=function({redirectProgressEnabled:e=!1}={}){const t=i(!1),{checkout:r,client:a,observability:o}=ie(),s=nk({mode:"copy-if-missing"});return n(n=>{if(t.current)return void o.counter({name:"thank_you_page_already_redirected",value:1});t.current=!0;const i=new URL(n,window.location.href),l=new URLSearchParams(a.initialRequest.url.search);return s(i.searchParams,l),e&&r.checkoutExit.startRedirectProgress(),window.location.replace(i.toString())},[s,r.checkoutExit,a.initialRequest.url.search,o,e])}({redirectProgressEnabled:P&&!_.isUniversalCheckoutFinalizer&&N&&!t&&!D});a(()=>{k||E()},[x]);const z=n((e,t)=>{setTimeout(()=>{t()},function(e){return 1500*e+450}(e))},[]);return n(n=>{if(!n||w)return;g.leaveErrorBreadcrumb("[Journey] handleReceipt callback triggered with",jy(n));const a=c.value;if("processed"===n.status&&n.waitingForPostPurchaseDone&&"done"!==a)return;const i=(e,t)=>e&&e>0?z(e,t):t();switch(n.status){case"abandoned":o(!1),m&&ir(m,h),C();break;case"failed":{o(!1),m&&ir(m,h);const a=new URL(window.location.href);if(a.searchParams.get("completed")&&a.searchParams.get("reload_receipt")){g.log("use_handle_receipt_progression_update","[Journey] Reloading processing page after failed receipt",{receiptId:n.id}),g.counter({name:"refresh_processing_step",value:1}),a.searchParams.delete("reload_receipt"),window.location.replace(a.toString());break}if("inventory"===n.failure.type){if(null==e.detours.find(e=>"stockProblems"===e.type))throw new fb("Stock problems receipt, but no matching detour",{groupingHash:"JourneyError::StockProblemsReceiptNoMatchingDetour"});const t=I.lastNegotiation.value;s({force:!0,silenceViolations:["payment-session","payment-terms-changed"],onComplete(e){switch(e.status){case"success":{const e=I.lastJourneyProgression.value,a=I.lastNegotiation.value;if(d.latestReceipt.value?.id!==n.id||a!==t&&"error"===a.type||("failed"===e.type||"error"===e.type)&&"completion"===e.negotiationStage)break;g.leaveErrorBreadcrumb("[Journey] Performed successful negotiation with a failed receipt"),g.log("use_handle_receipt_progression_update","[Journey] Performed successful negotiation with a failed receipt");const i=S("payment-methods");A(()=>
2{I.context.inventoryRecoverySignal.value={receiptId:n.id},function(e){const{paymentMethodIdentifier:t,...n}=e.directPaymentErrors;A(()=>{e.generalPaymentError.value=void 0,e.generalPaymentErrorCode.value=void 0;for(const e of Object.values(n))"server"===e.value?.origin&&(e.value=void 0)})}(I.parts)}),r({type:"error",page:i}),v.navigate({pathname:i.route,search:v.currentUrl.value.search});break}case"fetch_failed":case"error":case"invalid":case"stale":case"denied":case"throttled":case"tooManyRequests":case"alreadyCompleted":break;default:L(e)}}});break}if("payment"===n.failure.type&&(vr.has(n.failure.code)?s({silenceViolations:Fe(["captcha"]),skipStateUpdates:!0}):("CUSTOM_REDEEMABLE_NO_LONGER_AVAILABLE"===n.failure.code&&s({force:!0,fieldsToResolve:["shopPromotion"]}),C())),"offsitePaymentFailed"===t?.type){v.navigate(t.route,{replace:!0});break}const i=function({departurePageId:e,greenPath:t,history:n,negotiated:r,observability:a,receipt:i}){const o=Tb(t,r,"payment-methods");if(function(e){return"payment"===e?.failure.type&&!0===e.failure.hasOffsitePaymentMethod}(i)&&o)return o;const s=function(e,t){return t?e.find(({id:e})=>e===t):void 0}(t,e);if(s)return"review"===s.id?(o||a.leaveErrorBreadcrumb("[Journey] computePageToRedirect: no last page with payment methods found, falling back to first page "),o??t[0]):s;const l=n.find(e=>!e.complete&&!e.skipped),c=t.findIndex(e=>l?.id===e.id);if(!o){const e=t[c]??t[0];return a.leaveErrorBreadcrumb("[Journey] computePageToRedirect: no page with payment methods found, falling back to first incomplete page",{fallbackPageId:e?.id}),e}const u=t.findIndex(e=>e.id===o.id);if(c>=0&&u>c){const e=t[c];return a.leaveErrorBreadcrumb("[Journey] computePageToRedirect: payment methods page is not available from current history, falling back to first incomplete page",{paymentMethodsPageId:o.id,fallbackPageId:e.id}),e}return o}({departurePageId:v.currentUrl.value.searchParams.get(Eb),greenPath:e.greenPath,history:M.value.history,observability:g,negotiated:l,receipt:n});r({type:"error",page:i}),v.navigate(i.route,{replace:!0});break}case"processed":{g.log("use_handle_receipt_progression_update","[Journey] Received processed receipt with redirectUrl",{redirectUrl:n.redirectUrl,receiptId:n.id});const s=e.detours.find(e=>"postPurchase"===e.type),l=Boolean(s)&&Boolean(n.postPurchasePageRequested)&&"ready"===n.postPurchaseVaultingStatus&&"success"===a,c=!p?.isFlagshipPartner&&l;if(p?.isFlagshipPartner&&l&&"thankYou"!==t?.type&&g.log("use_handle_receipt_progression_update","[Journey] Skipped post-purchase flow for flagship partner",{receiptId:n.id}),c&&"thankYou"!==t?.type){if(g.leaveErrorBreadcrumb("[Journey] Navigated to post purchase page",{receipt:JSON.stringify({id:n.id,postPurchasePageUrl:n.postPurchasePageUrl,postPurchasePageRequested:n.postPurchasePageRequested,postPurchaseVaultingStatus:n.postPurchaseVaultingStatus}),shopAppDomain:P}),P&&n.postPurchasePageUrl)window.location.replace(n.postPurchasePageUrl);else{const e=s;v.currentUrl.value.searchParams.delete("post_purchase");const t=`${e.route}${v.currentUrl.value.search}`;I.applyProcessedReceipt(n),v.navigate(t,{replace:!0})}break}if(p?.client?.complete(),!_.isUniversalCheckoutFinalizer&&yr(p?.embedder))break;if(!_.isUniversalCheckoutFinalizer&&n.redirectUrl){const e=n.redirectUrl;n.skipToThankYouPage?(g.leaveErrorBreadcrumb("[Journey] Forwarded duplicate checkout session to Thank you page",{skipToThankYouPage:!0,receipt:JSON.stringify({id:n.id,redirectUrl:e,postPurchasePageRequested:n.postPurchasePageRequested,postPurchasePageUrl:n.postPurchasePageUrl})}),r({type:"skipRemainingPages"})):r({type:"complete"}),g.counter({name:"thank_you_page_redirected",value:1,attributes:{shopPay:P,checkoutDesign:T.value?"ONE_STEP":"THREE_STEP",typType:"classic",visibility_state:document.visibilityState}}),g.log("use_handle_receipt_progression_update","[Journey] Redirecting to thank you page with redirectUrl",{redirectUrl:e});const a=new URL(e);return R&&a.searchParams.set(Cb,R),i(n?.completedRemoteCheckouts?.length,()=>{return e=a.toString(),!N||t||D||ll(()=>{d.checkoutExit.exit()},["checkout-exit"],{replace:!0,interrupt:!0}),void O(e);var e})}const m=e.detours.find(e=>"thankYou"===e.type);if(!m?.route)throw new fb("On thank-you, but no matching detour!",{groupingHash:"JourneyError::OnThankYouNoMatchingDetour"});{const e="prevent_order_redirect",a=new URLSearchParams(v.currentUrl.value.search);let s=a.has(e)&&"false"!==a.get(e)?`${m.route}?${e}=true`:m.route;y.variant.recovery&&(s=function(e,t){const n=new URL(e,window.location.href);return n.searchParams.set("order_id",t),n.toString()}(s,n.id));const l=()=>{if(g.log("use_handle_receipt_progression_update","[Journey] thankYouDetour route identified",{thankYouDetourRoute:m.route}),n.skipToThankYouPage){g.leaveErrorBreadcrumb("[Journey] Forwarded duplicate checkout session to Thank you page",{skipToThankYouPage:!0,receipt:JSON.stringify({id:n.id,redirectUrl:n.redirectUrl,postPurchasePageRequested:n.postPurchasePageRequested,postPurchasePageUrl:n.postPurchasePageUrl})}),r({type:"skipRemainingPages"});const e=f.cookies.get(_r);e&&h.sourceId===e.split("%3F")[0]&&f.cookies.delete(_r)}else f.cookies.delete(_r),r({type:"complete"});I.applyProcessedReceipt(n)},c=e=>{g.log("use_handle_receipt_progression_update","[Journey] Redirecting to thank you page with thankYouDetourUrl",{thankYouDetourUrl:s}),i(n?.completedRemoteCheckouts?.length,()=>function(e,n){const r=()=>{v.navigate(e,{replace:!0,state:{...v.currentUrl.value.state,redirectingToThankYou:!0}})};N&&!t?(n?.(),ll(r,["checkout-exit"],{replace:!0,interrupt:!0})):ll(()=>{n?.(),r()}),g.counter({name:"thank_you_page_redirected",value:1,attributes:{shopPay:P,checkoutDesign:T.value?"ONE_STEP":"THREE_STEP",typType:"c1",visibility_state:document.visibilityState}}),o(!1)}(s,e))},d=_.deferredProfileChangeId;if(d||_.profileKey.peek()?.requireBusinessCriticalOnly){_.update({deferredProfileChangeId:void 0});const e=d??_.profileId.peek();Zs(l,{trigger:"completion",profileRequest:e?{id:e,requireBusinessCriticalOnly:!1}:void 0,graphql:u.graphql.coreGraphql,extensibility:u.checkout.extensibility,configuration:_,observability:g,userEvents:u.userEvents,telemetryContext:{source:h,shop:u.shop,sessionToken:f.unstable_getSerialization("sessionToken"),current:I.current}}).then(c).catch(()=>{})}else l(),c()}break}case"polling_for_order":case"action_required":case"processing":{if("processing"===t?.type)break;if("polling_for_order"===n.status&&"thankYou"===t?.type){g.leaveErrorBreadcrumb("[Journey] Skipped navigating to processing page since already on the thank-you page",{receipt:JSON.stringify(n),routerCurrentUrl:v.currentUrl.value.toString()});break}const r=e.detours.find(e=>"processing"===e.type);r?.route&&o(!0);break}case"processing_remote_checkouts":{if("processing"===t?.type)break;const n=e.detours.find(e=>"processing"===e.type);if(!n?.route)break;ll(()=>{const e=v.currentUrl.value.search;v.navigate(e?{pathname:n.route,search:e}:n.route,{replace:!0})});break}default:L(n)}},[f,p?.client,p?.embedder,p?.isFlagshipPartner,y,C,t,d,r,w,T,N,P,M,S,u,_,s,l,I,o,m,e.detours,e.greenPath,D,c,R,O,v,h,g,z])}({plan:p,currentDetour:g,dispatch:s,onProgressionChange:c,negotiate:b,negotiated:k,proposedPostPurchaseInquiryStatus:_});a(()=>{const{negotiator:e}=y,t=e=>{if("queued"!==e.status)return;const t=p.detours.find(e=>"throttle"===e.type);if(t?.route)v.navigate(t.route);else if(h)throw new fb(`Throttled, but no matching detour from ${h&&JSON.stringify(h,["id","label","route"])}`,{groupingHash:"JourneyError::ThrottledNoMatchingDetourFromPage"})};return t(e.throttleState.peek()),e.listenThrottle(t)},[y,v,h,p.detours,s]),P(()=>{const e=y.latestReceipt.value;f.leaveErrorBreadcrumb("[JourneyProgressionInternal] Signal effect for latestReceipt",jy(e)),o(()=>E(e))});const x=i(_.peek());P(()=>{const e="thankYou"===g?.type||"postPurchase"===g?.type,t=_.value,n=x.current;if(e&&t!==n){x.current=t;const e=y.latestReceipt.value;f.leaveErrorBreadcrumb("[JourneyProgressionInternal] Signal effect for proposedPostPurchaseInquiryStatus",{...jy(e),previousStatus:n}),o(()=>E(e))}});const{progress:I,completing:T}=function({journey:e,exitDetour:a,pageComplete:i,pageNegotiate:o}){const{client:s,observability:l,router:c}=ie(),u=m(0),d=t(()=>u.value>0),p=s.unstable_legacyNavigationPerformance,{handleOffsitePopupOpen:h,handleClosingPopup:g}=function(){const e=ek(),t=Tf(),n=Hm(),{i18n:a,observability:i,userEvents:o,checkout:{offsitePopupController:s,negotiator:l},shop:{id:c}}=ie(),{paymentLines:u}=l.parts;return r(()=>({handleOffsitePopupOpen:()=>{const r=u.value.at(0);let d=!1;if("customOnsite"===r?.method.type)d=Db(r);else if(r&&"walletContent"in r.method&&"SHOP_PAY"===r.method.name){const e=r.method.walletContent?.paymentMethodIdentifier,t=(l.current?.fields?.paymentMethods?.value||[]).find(t=>Ob(t)&&t.paymentMethodIdentifier===e);d=Boolean(t)}if(t.value){if(d){i.counter({name:"offsite_payment_popup_flow_initiated",value:1,attributes:{payment_method_name:"Crypto: USDC",is_shop_pay_wrapped:Boolean(r&&"walletContent"in r.method&&"SHOP_PAY"===r.method.name),is_mobile:Ot()}});const e=de(c);if(e){const t=parseInt(e,10);if(!isNaN(t)){const e=function(e){const t=eg();
2return t?{schemaId:"shopify_wallet_checkout_track/6.3",payload:{event:"spb_instrument_click__sheet__clicked",eventSubtype:"payment_method",appName:"checkout",pageType:"checkout",checkoutToken:t?.checkoutToken,instrumentId:"USDC",shopId:e,checkoutOne:!0,uniqToken:t?.uniqToken,visitToken:t?.visitToken,microSessionId:t?.microSessionId,microSessionCount:t?.microSessionCount??0,screenWidth:window.innerWidth,themeId:t?.themeId,themeCityHash:t?.themeCityHash||"",contentLanguage:t?.contentLanguage,referer:t?.referer}}:null}(t);e&&o&&o.monorailEvent(e)}}}const t={width:600,height:455};s.open({onComplete:()=>e(),onCancel:()=>window.location.reload(),theme:n,popupDimensions:t,isCryptoPayment:d,title:a.translate("general.processing")})}},handleClosingPopup:()=>{t.value&&s.isOpen.value&&s.close({})}}),[t.value,u,i,o,l,s,n,a,e,c])}(),f=oe(a),y=oe(i),v=oe(o),_=oe(h),b=oe(g),k=oe(c);return{progress:n(async(t,n,r)=>{const a=async e=>{try{await(n?.(e))}finally{"success"!==e.status&&b.current()}},i={...r,onProgressBlocked:()=>{try{r?.onProgressBlocked?.()}finally{b.current()}},onValidationSuccess:()=>{try{r?.onValidationSuccess?.()}finally{_.current()}}},{plan:o,currentPage:s,currentDetour:c}=e.value,d=f.current;if(l.leaveErrorBreadcrumb("[Journey] Progress initiated",{id:t,skipToCompletion:i?.skipToCompletion,greenPath:o.greenPath.map(e=>e.route),detours:o.detours.map(e=>e.route),currentPageRoute:s?.route,currentDetourRoute:c?.route}),!i?.skipToCompletion&&c&&s){const e=o.detours.find(e=>"thankYou"===e.type),t="processing"===c.type?e:s;return p?.start({target:t?.route}),l.leaveErrorBreadcrumb(`[Journey] Exiting "${c.route}" detour, moving to "${t?.route}"`,{currentDetourRoute:c.route,exitDetourTargetRoute:t?.route,targetPageRoute:s.route}),d(c,s,a)}if(null==s)return l.debug("journey_progression_blocked","[Journey] Blocked progression because the current page is missing"),void i?.onProgressBlocked?.();const m=ub(s,o.greenPath[o.greenPath.length-1])||i?.skipToCompletion,h=o.greenPath.findIndex(({id:e})=>e===s.id),g=o.detours.find(e=>"processing"===e.type),P=m?g:o.greenPath[h+1];p?.start({target:P?.route});const S=k.current.currentUrl.peek(),w=o.greenPath.find(e=>e.route===S.normalizedPath)??s;if(m?S.searchParams.set(Eb,w.id):S.searchParams.delete(Eb),l.leaveErrorBreadcrumb("[Journey] Progressing",{skipToCompletion:i?.skipToCompletion,greenPath:o.greenPath.map(e=>e.route),isLastPage:m,currentPageRoute:s.route,currentDetourRoute:c?.route,nextPageRoute:P?.route}),!m)return v.current(s,a);u.value+=1;try{await y.current(s,c,a,i)}finally{u.value-=1}},[f,e,y,v,u,p,l,b,_,k]),completing:d}}({journey:u,exitDetour:C,pageComplete:w,pageNegotiate:S}),N=function({plan:e}){const{router:t,observability:r}=ie();return n(async(n,a)=>{const i=e.detours.find(e=>e?.type===n);if(!i)throw r.leaveErrorBreadcrumb("Detour, but no matching detour",{detourType:n,detours:e.detours,currentUrl:t.currentUrl.value.href}),new fb("Detour, but no matching detour",{groupingHash:"JourneyError::DetourNoMatchingDetour"});const o=`${i.route}${e.greenPath[0].queryParams||""}`;t.navigate(o,a?.routerOptions)},[e.detours,e.greenPath,t,r])}({plan:p}),R=function({negotiate:e}){return n(()=>{e({prefetch:!0,negotiationStage:"progression",silenceViolations:["all"]})},[e])}({negotiate:b}),M=bk();a(()=>k.pendingFieldsNegotiation.subscribe(e=>{"success"!==e?.status&&"error"!==e?.status||u.peek().currentDetour||vb(k.current.fields.allViolations.peek()??[])&&(M(),N("stockProblems",{routerOptions:{replace:!0}}))}),[k,u,N,M]);const D=r(()=>({detour:N,progress:I,negotiate:b,progressing:l,completing:T,prefetch:R}),[N,I,l,T,b,R]);return d(tc.Provider,{value:D,children:e})}function Dk({plan:e,children:a}){const o=m(!1),s=n(e=>{o.value=e},[o]),{observability:l,router:c}=ie(),u=c.currentUrl.value,[p,h]=Pb(e);gh(p,({previousState:e,action:t,nextState:n})=>{l.leaveErrorBreadcrumb("Journey state transition",{previousState:{redirectTo:e.redirectTo?.route},action:t,nextState:{redirectTo:n.redirectTo?.route},routerCurrentUrl:u.normalizedPath})});const{redirectTo:g}=p.value,f=m(),{pageBeforeDetour:y,completed:v}=function({router:e,plan:n,journeyStateSignal:r}){const a=i(void 0),o=t(()=>{const t=e.currentUrl.value.normalizedPath;return n.greenPath.find(e=>e.route===t)});return{pageBeforeDetour:t(()=>{const t=o.value;t&&(a.current=t);const i=a.current,s=e.currentUrl.value.normalizedPath,{history:l}=r.value,c=n.detours.find(e=>e.route===s);if(t)return t;if(c&&i)return i;if(c&&!i){const e=n.greenPath[0],t=l.find(e=>!e.complete);return n.greenPath.find(e=>
2e.id===t?.id)??e}}),completed:t(()=>{return t=r.value.plan.detours.find(t=>t.route===e.currentUrl.value.normalizedPath),"thankYou"===t?.type;var t})}}({router:c,plan:e,journeyStateSignal:p}),_=r(()=>({journeyState:p,currentFocus:f,completed:v,pageBeforeDetour:y}),[p,f,v,y]);if(null!=g){const e=u.search?{pathname:g.route,search:u.search}:g.route;return c.redirect(e),null}return d(ec.Provider,{value:_,children:[d(pb,{}),d(Mk,{dispatch:h,progressing:o,onProgressionChange:s,children:a})]})}function Ok({disabled:e,key:t,variants:n}){const{client:r,router:a}=ie(),i=a.currentUrl.value;if(e)return;const o=new URLSearchParams(i.search).get(t);if(o&&n.includes(o))return o;const s=r.cookies.get(t);return s&&n.includes(s)?s:void 0}function zk(){const{shop:e}=ie(),t=function(){const e=Ok({key:"operatziya_y",variants:[Ar.Control,Ar.Treatment]}),{client:t}=ie(),n=t.unstable_getSerialization("experiments"),r=n?.find(e=>e.clientHandle===Tr)?.variant===Ar.Treatment;return e||(r?Ar.Treatment:Ar.Control)}()===Ar.Treatment;return Boolean(e.confirmationPageEnabled)||t}const Bk=["delivery-method"],Vk=new Set(Lr),Fk=new Set(Nr),Uk=new Set(Rr);function qk({i18n:e,sourceType:t,addressSettings:n,billingAddressSettings:r,hasBlockingUiExtensionForFeatures:a,getSellableDeliveryMethods:i,initialNegotiationData:o,isDraftOrderCheckout:s,isPrePopulatedSourceType:l,isShippingRequired:c,proposedPaymentLines:u,reviewEnabled:d,shippingAddress:p,shippingCountryDetails:m,mustSelectProvidedShippingRate:h,shop:g,checkout:f,paymentMethods:y,observability:v,recordFastForward:_}){const b=(e,t)=>a(t,{excludedExtensionTargets:jk(e.deliveryNext)})?{gatedBy:"extension"}:zr(e.paymentLines)?{gatedBy:"paypalExpress",satisfied:Yk(e.paymentLines,e.deliveryNext)&&gb(e.contactInfo,e.allViolations)}:Br(e.paymentLines)?{gatedBy:"googlePay"}:{gatedBy:null,unsatisfied:t.filter(t=>!((e,t)=>{switch(t){case"contact-information":return gb(e.contactInfo,e.allViolations);case"shipping-address":return function({shippingAddress:e,addressSettings:t,countryDetails:n,violations:r=[],isDraftOrder:a,state:i}){return!!e&&!(t.isRequired("phone",{countryCode:e?.countryCode})&&a&&(!i.contactInfo?.email||!i.shippingAddress?.phone))&&!!cy({address:e,addressSettings:t,countryDetails:n})&&r.every(e=>"shipping-address"!==hb(e))}({shippingAddress:p,addressSettings:n,countryDetails:m,violations:e.allViolations,state:e,isDraftOrder:s});case"billing-address":return function(e,t,n=[]){return!!cy({address:t,addressSettings:e})&&n.every(e=>"billing-address"!==hb(e))}(r,e.billingAddress,e.allViolations);case"delivery-method":return function(e,t=[]){return"filled"===e?.status&&!!e.lines.some(e=>"methods"in e&&e.methods.some(e=>"PICK_UP"===e.methodType||"PICKUP_POINT"===e.methodType))&&t.every(e=>"delivery-method"!==hb(e))}(e.deliveryNext,e.allViolations);case"payment-methods":case"localization-extension":return!1;default:return L(t)}})(e,t))};return{greenPath:[{id:"information",label:e.translate("contact.title"),route:"/information",features:({deliveryNext:e})=>Array.from(function*(){yield"contact-information",Or(e)||Mr(e)?yield"delivery-method":c?yield"shipping-address":yield"billing-address"}()),fastForwardThroughPage:(e,t)=>{const n=b(e,t);if("extension"===n.gatedBy)return!1;if("paypalExpress"===n.gatedBy)return!!n.satisfied&&_("information","paypal_express_and_contact_satisfied");if("googlePay"===n.gatedBy)return!1;const[r]=n.unsatisfied;return v.log("journey_page_fast_forward_features_checked","Features evaluated for fast-forward",{pageId:"information",blockingFeature:r??null,isPrePopulatedSourceType:l,allViolations:e.allViolations?.map(e=>e.code)||[]}),l&&void 0===r},blockedOnlyByShippingAddress:(e,t)=>{const r=b(e,t),a=s&&n.isRequired("phone",{countryCode:e.shippingAddress?.countryCode})&&(!e.contactInfo?.email||!e.shippingAddress?.phone);return null===r.gatedBy&&l&&!a&&1===r.unsatisfied.length&&"shipping-address"===r.unsatisfied[0]&&(e.allViolations??[]).every(e=>"shipping-address"!==hb(e))}},{id:"shipping",label:e.translate("shipping.title"),route:"/shipping",features:Bk,fastForwardThroughPage:e=>{return!a(Bk)&&("cartNext"===t?function(e){const t=function(e){return"filled"!==e?.status?[]:Ue(e).filter(e=>"available"===e.status)}(e);return 0!==t.length&&t.every(e=>function(e){return 1===e.methods.length}(e)||function(e){if(e.methods.length<=1)return!1;const t=It(e);return!!t&&e.methods[0]?.handle!==t.handle}(e))}(e.deliveryNext)?_("shipping","cart_next_shipping_selection_determined"):(n=e.paymentLines,!!n?.lines.some(e=>"direct"===e.method.type&&Boolean(e.method.sessionId))&&_("shipping","cart_next_has_direct_payment_session")):!!function({latestNegotiation:e,initialNegotiation:t,isPrePopulatedSourceType:n}){if(!n)return!1;if("filled"!==e?.deliveryNext?.status)return!1;const r=t?.session?.negotiate.result;if("NegotiationResultAvailable"!==r?.__typename||"FilledDeliveryTerms"!==r.buyerProposal.delivery.__typename)return!1;const a=r.buyerProposal.delivery.deliveryLines.map(e=>"DeliveryStrategyReference"===e.selectedDeliveryStrategy?.__typename?e.selectedDeliveryStrategy.handle:void 0).find(e=>void 0!==e);if(void 0===a)return!1;const i=Ue(e?.deliveryNext).find(e=>"available"===e.status);return void 0!==i&&!(a!==It(i)?.handle)}({latestNegotiation:e,initialNegotiation:o,isPrePopulatedSourceType:l})&&_("shipping","initial_delivery_selection_preserved"));var n},skipOverPage:({deliveryNext:e,isShippingRequired:t})=>!t||pn(e)||Mr(e)||h||Dr(i().enabledDeliveryMethods)},{id:"payment",label:e.translate("payment.title"),route:"/payment",features:()=>eb(d,u.peek(),{shop:g,checkout:f,paymentMethods:y})?["payment-methods","localization-extension"]:["payment-methods","billing-address","localization-extension"]},...d?[{id:"review",label:e.translate("review.title"),route:"/review",features:["billing-address"]}]:[]],detours:[{type:"throttle",label:e.translate("throttle.title"),route:"/throttle"}
2,{type:"processing",label:e.translate("processing.title"),route:"/processing"},{type:"thankYou",label:e.translate("thank_you.title"),route:"/thank-you"},{type:"stockProblems",label:e.translate("stock.title"),route:"/stock-problems"},{type:"postPurchase",label:e.translate("post_purchase.title"),route:"/post-purchase"}]}}function jk(e){const t=new Set,n=Hk(e,"PICK_UP"),r=Hk(e,"PICKUP_POINT");return n||$k(t,Vk),r||$k(t,Fk),(n||r)&&$k(t,Uk),t.size>0?t:void 0}function Hk(e,t){return Ue(e).some(e=>"available"===e.status&&It(e)?.methodType===t)}function $k(e,t){t.forEach(t=>e.add(t))}function Yk(e,t){const n=Nt(e?.lines,"PAYPAL_EXPRESS");if(!n)return!1;if("filled"!==t?.status)return!1;const r=n.method.walletContent;return Boolean((r?.email??void 0)&&(r?.token??void 0))}function Wk(e){const{billingAddressSettings:t,nonBillingAddressSettings:n}=e.configuration.addressSettings;return e.isShippingRequired.value?t.value:n.value}const Gk=["checkout","cartNext","draftOrder"];function Jk({children:e}){const{i18n:a,observability:i,router:o,shop:s,source:l,checkout:c}=ie(),u="shopPay"===c.identity.current.value,p=c.configuration.layout.isOnePage.value,{parts:m}=c.negotiator,h=c.negotiator.current.fields.paymentMethods?.value,g=m.paymentLines,f=zk(),y=function(){const{i18n:e,shop:r,source:a,checkout:i,observability:o}=ie(),{buyerIdentity:s}=i.negotiator.current.fields,l=ib(),c=Uc(),u=tb(),d=nb(),p=ob(),m=n((e,t)=>(o.log("journey_page_fast_forwarded","Fast-forwarded through page",{pageId:e,reason:t}),!0),[o]),h=n(e=>{const t=s.value?.purchasingCompany;return!(!t?.location.shippingAddress||!e)&&Boolean(c.value&&u.value&&Wn(t.location.shippingAddress,e))},[s,c,u]);return t(()=>{const t=s.value?.purchasingCompany;if(!t)return;const n=!Hn(a)&&i.isShippingRequired.value&&!l.value,o=p.value,u=()=>({id:"review",label:e.translate("review.title"),route:"/review",features:[]});return i.configuration.layout.isOnePage.value?[{id:"onePage",label:e.translate("general.page_title"),route:"/",features:[...o?sb:[],...n?lb:[],...cb]},...r.confirmationPageEnabled?[u()]:[]]:[...o?[{id:"information",label:e.translate("contact.title"),route:"/information",features:sb,fastForwardThroughPage:({shippingAddress:e})=>!(!h(e)||d.value)&&m("information","business_customer_pre_negotiated_address")}]:[],...n?[{id:"shipping",label:e.translate("shipping.title"),route:"/shipping",features:lb,fastForwardThroughPage:({shippingAddress:e,deliveryNext:t})=>c.value?!!h(e)&&m("shipping","business_customer_pre_negotiated_address"):"unavailable"!==t?.status&&m("shipping","business_customer_no_editable_address_with_delivery"),skipOverPage:({deliveryNext:e})=>pn(e)}]:[],{id:"payment",label:e.translate("payment.title"),route:"/payment",features:cb},u()]}).value}(),v=o.currentUrl.value?.search,_=function(){const{i18n:e,shop:t,source:{type:a},checkout:i,observability:o}=ie(),{extensibility:s}=i,l=Be(),c=r_(),u=Gk.includes(a),{data:d}=g_(),p=function(){const{data:e}=g_();if("NegotiationResultAvailable"!==e?.session?.negotiate.result.__typename)return;const{sellerProposal:t}=e.session.negotiate.result;return Zn({delivery:t.delivery,remoteDelivery:er(t.remote).remoteDelivery})}(),{details:m}=Mt(p?.countryCode),h="draftOrder"===a,g=i.proposal.negotiated.fields.mustSelectProvidedShippingRate.value??!1,f=zk(),{parts:y}=i.negotiator,v=i.negotiator.current.fields.paymentMethods.value,_=y.paymentLines,b=i.configuration.addressSettings.nonBillingAddressSettings.value,k=Wk(i),P=i.negotiator.current.fields.isShippingRequired.value,S=n((e,{excludedExtensionTargets:t}={})=>s.ui.hasBlockingExtensionForFeatures({features:e,placementReferences:c,excludedExtensionTargets:t}),[c,s.ui]),w=n((e,t)=>(o.log("journey_page_fast_forwarded","Fast-forwarded through page",{pageId:e,reason:t}),!0),[o]);return r(()=>qk({i18n:e,sourceType:a,addressSettings:b,billingAddressSettings:k,hasBlockingUiExtensionForFeatures:S,getSellableDeliveryMethods:()=>l.value,initialNegotiationData:d,isDraftOrderCheckout:h,isPrePopulatedSourceType:u,isShippingRequired:P,proposedPaymentLines:_,reviewEnabled:f,shippingAddress:p,shippingCountryDetails:m,mustSelectProvidedShippingRate:g,shop:t,checkout:i,paymentMethods:v,observability:o,recordFastForward:w}),[b,k,S,l.value,d,h,u,P,_,f,p,m,g,a,e,t,i,v,o,w])}(),b=function({businessCustomerJourneyPath:e,isShopPay:t,source:n,isOnePageCheckout:r}){return e?"businessCustomer":t?"shopPay":Hn(n)?"orderEdit":r?"onePage":"threePage"}({businessCustomerJourneyPath:y,isShopPay:u,source:l,isOnePageCheckout:p}),k=r(()=>{switch(b){case"businessCustomer":return i.leaveErrorBreadcrumb("Using business customer journey plan"),function({i18n:e,greenPath:t}){return{greenPath:t,detours:[...X_(e,{beforeStock:[Y_(e)]}),K_(e)]}}({i18n:a,greenPath:y});case"shopPay":return i.leaveErrorBreadcrumb("Using shop pay journey plan"),function({i18n:e,shopName:t,currentUrlSearch:n}){return{greenPath:[{id:"shopPay",label:e.translate("general.page_title"),route:"/shoppay",queryParams:n,features:({isShippingRequired:e})=>[e?"shipping-address":"billing-address","contact-information","delivery-method","payment-methods"]}],detours:[Q_(e),j_(e,"redirectToCart"),H_(e),$_(e),W_(e),G_(e,t),J_(e),K_(e)]}}({i18n:a,shopName:s.name,currentUrlSearch:v});case"orderEdit":return i.leaveErrorBreadcrumb("Using order edit checkout journey plan"),function({i18n:e,isOnePageCheckout:t,reviewEnabled:n}){return{greenPath:[t?{id:"onePage",label:e.translate("general.page_title"),route:"/",features:["payment-methods","billing-address"]}:{id:"payment",label:e.translate("payment.title"),route:"/payment",features:["payment-methods","billing-address"]},...n?[Z_(e)]:[]],detours:[...X_(e,{afterStock:[]}),K_(e)]}}({i18n:a,isOnePageCheckout:p,reviewEnabled:f});case"onePage":return function({i18n:e,reviewEnabled:t,paymentMethods:n,proposedPaymentLines:r,shop:a,checkout:i}){return{greenPath:[{id:"onePage",label:e.translate("general.page_title"),route:"/",features:({isShippingRequired:e})=>{const o=["contact-information","delivery-method","payment-methods","localization-extension"];return e?o.push("shipping-address"):eb(t,r.peek(),{shop:a,checkout:i,paymentMethods:n})||o.push("billing-address"),o}},...t?[Z_(e)]:[]],detours:[...X_(e),K_(e)]}}({i18n:a,reviewEnabled:f,paymentMethods:h,proposedPaymentLines:g,
2shop:s,checkout:c});case"threePage":return _}},[y,c,v,a,p,b,i,h,g,f,s,_]);return d(Dk,{plan:k,children:e})}function Kk(){const{data:e}=g_(),{currentPage:t}=nc().value,{checkout:{negotiator:n}}=ie(),{deliveryMethodsAddressErrors:r}=n.context,[i,o]=s(!0),{setAddressError:l}=_y(r),c=Iy(n.parts.shippingAddress.fields.countryCode.value);return a(()=>{if(!e)return;if(!i||"/information"!==t?.route&&"/"!==t?.route)return void(t&&o(!1));const{current:r}=n,{allViolations:a,paymentLines:s}=r.value;if(Boolean(Vr(s?.lines))&&a?.length){const e=["billing"].flatMap(e=>Array.from(c(e,a)));for(const[t,n]of e)l(t,n)}o(!1)},[void 0!==t,e,n]),null}function Qk({scrollbarGutter:e,children:t}){const n=Hm(),r=n.customProperties.value,a=n.darkModeCustomProperties.value,i=r?.color?.schemes?.scheme1?.base?.background,o=a?.color?.schemes?.scheme1?.base?.background,s=[i&&`html, body { background-color: ${i}; }`,o&&`@media (prefers-color-scheme: dark) { html, body { background-color: ${o}; } }`,e&&`html { scrollbar-gutter: ${e}; }`].filter(Boolean).join("\n");return d(y,{children:[d("style",{children:s}),d("div",{className:"g9gqqf1 g9gqqf0 _1fragemzj _1fragemyu _1fragemy5 _1fragem133",children:t})]})}var Xk="y3r6mh0";const Zk=(eP=e=>Se({colorScheme:e}),be.reduce((e,t)=>({...e,[t]:eP(t)}),{}));var eP;const{surfaceBorder:tP,surfaceControlBorder:nP,...rP}=ye.color.default,aP=E(function({children:e,scoped:t}){const n=Hm(),a=c(),i=n.customProperties.value,o=n.darkModeCustomProperties.value,s=r(()=>{const e=`#CustomProperties-${function(e){if("undefined"!=typeof CSS)return CSS.escape(e);const t=String(e),n=t.length;let r=-1,a="";const i=t.charCodeAt(0);if(1===n&&45===i)return`\\${t}`;for(;++r<n;){const e=t.charCodeAt(r);a+=0!==e?e>=1&&e<=31||127===e||0===r&&e>=48&&e<=57||1===r&&e>=48&&e<=57&&45===i?`\\${e.toString(16)} `:e>=128||45===e||95===e||e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122?t.charAt(r):`\\${t.charAt(r)}`:"�"}return a}(a)}`,n=i?lP(i):null,r=o?lP(o):null,s=sP(iP(i?.color)),l=sP(iP(o?.color)),c=n&&Object.keys(n).length>0,u=r&&Object.keys(r).length>0;if(!(c||u||s||l))return"";const d=`${c?`${e} {${b(n)}}`:""}${s}`,p=`${u?`${e} {${b(r)}}`:""}${l}`,m=`\n ${d}\n ${p?`@media (prefers-color-scheme: dark) { ${p} }`:""}\n `;return t?`@scope { ${m} }`:m},[i,o,a,t]);return d("div",{id:`CustomProperties-${a}`,children:[d("style",{children:s}),e]})});function iP(e){if(e&&"object"==typeof e&&"schemes"in e)return e.schemes}function oP(e,t){return Object.entries(e).reduce((e,[n,r])=>{const a=t[n];if(null==a)return e;const i="object"==typeof r&&null!=r&&!Array.isArray(r),o="object"==typeof a&&null!=a&&!Array.isArray(a);return i&&o?{...e,...oP(r,a)}:i?e:null!=r?{...e,[a]:r}:e},{})}function sP(e){if(!e||"object"!=typeof e)return"";let t="";for(const n of be){const r=e[n];if(!r||"object"!=typeof r)continue;const{surfaceBorderContinuation:a,...i}=r,o=oP(i,rP),s=Zk[n].trim().split(/\s+/).join(".");Object.keys(o).length>0&&(t+=`.${s} {${b(o)}}`),"string"==typeof a&&(t+=`.${s}.${Xk}.${Xk} {${b({[ye.color.default.surfaceBorder]:a,[ye.color.default.surfaceControlBorder]:a})}}`)}return t}function lP(e){return oP(function(e){const t=e.color;if(!t||"object"!=typeof t||Array.isArray(t))return e;const{schemes:n,...r}=t;return{...e,color:r}}(e),ye)}function cP({children:e}){const{typographyPrimary:t,typographySecondary:n}=$m();return a(()=>{const e=[t,n].map(e=>[{fonts:e.fonts,source:e.sourceBase,weight:e.weightBase},{fonts:e.fonts,source:e.sourceBold,weight:e.weightBold}]).reduce((e,t)=>e.concat(t),[]).filter(e=>void 0!==e.fonts&&void 0!==e.source).map(({fonts:e,source:t,weight:n})=>new FontFace(e,t,{weight:n}));!async function(){await Promise.all(e).then(e=>{e.forEach(e=>{document.fonts.add(e)})})}()},[t,n]),d(y,{children:e})}function uP({children:e,condition:t}){return d(t?cP:y,{children:e})}function dP({children:e,theme:t,shouldLoadFonts:n,scoped:r}){const{customProperties:a}=h(vu);return d(Te.Provider,{value:t,children:d(Fr,{children:d(uP,{condition:Boolean(n),children:a?d(aP,{scoped:r,children:e}):e})})})}function pP({children:e}){const{checkout:t,source:n,router:r}=ie(),a=r.currentUrl.value,i="simulated"===n.type,o=fr(a.search),s=t.configuration.branding.shell,l=t.configuration.branding.theme,c=Dt()||i||o;return d(dP,{theme:l,shouldLoadFonts:c,children:d(fv,{shell:s,children:d(mP,{children:e})})})}function mP({children:e}){const{canvas:t}=vv();return d(Qk,{scrollbarGutter:t?.scrollbarGutter,children:e})}function hP(){const{embed:e}=ie(),n=h(Mu)?.isModalOpen,r=t(()=>Boolean(n?.value||e?.presentation?.active.value));return a(()=>{let t=!1;return r.subscribe(n=>{n!==t&&(t=n,e?.client?.dialogChange(n?"open":"close"))})},[r,e]),null}function gP(e){return e.activatedExtensionId&&e.activatedExtensionId.length>0?e.activatedExtensionId:e.id}function fP(e){const t="local"===e.type?void 0:e.publicIdentifier,n="persisted"===e.type?e.targetPublicIdentifier:void 0,r="local"===e.type?void 0:e.registrationId;return{appId:e.appId,appApiKey:e.appApiKey,apiVersion:e.apiVersion,appName:e.appName,extensionId:e.extensionId,extensionPoint:e.extensionPoint.target,id:gP(e),name:e.name,placementReference:e.placementReference,type:e.type,version:e.version,publicIdentifier:t,registrationId:r,targetPublicIdentifier:n}}function yP(e){const t=String(_P(e));return e.stack??t??e.message??""}function vP(e){const t=_P(e);return t?`${t.name}: ${t.message}`:e.message}function _P(e){if(function(e){return"object"==typeof e.cause&&null!=e.cause}(e)&&"stack"in e.cause)return e.cause}var bP=(e=>(e.CheckoutError="CHECKOUT_ERROR",e.ContactError="CONTACT_ERROR",e.DeliveryError="DELIVERY_ERROR",e.DiscountError="DISCOUNT_ERROR",e.InputInvalid="INPUT_INVALID",e.InputRequired="INPUT_REQUIRED",e.InventoryError="INVENTORY_ERROR",e.MerchandiseError="MERCHANDISE_E
2RROR",e.PaymentError="PAYMENT_ERROR",e))(bP||{}),kP=(e=>(e.ExtensionUsageError="EXTENSION_USAGE_ERROR",e))(kP||{});const PP={[Ur.ExtensionCustomerPrivacyApiBrowserError]:{eventName:"extension-customer-privacy-api-browser-error",eventType:"interceptor-execution",errorReason:"extension-customer-privacy-api-browser-error"},[Ur.ExtensionCustomerPrivacyApiError]:{eventName:"extension-customer-privacy-api-error",eventType:"interceptor-execution",errorReason:"extension-customer-privacy-api-error"},[Ur.ExtensionCustomerPrivacyGraphqlError]:{eventName:"extension-customer-privacy-graphql-error",eventType:"interceptor-execution",errorReason:"extension-customer-privacy-graphql-error"},[Ur.ExtensionCustomerPrivacyLikelyBotError]:{eventName:"extension-customer-privacy-likely-bot-error",eventType:"interceptor-execution",errorReason:"extension-customer-privacy-likely-bot-error"},[Ur.ExtensionCustomerPrivacyServerError]:{eventName:"extension-customer-privacy-server-error",eventType:"interceptor-execution",errorReason:"extension-customer-privacy-server-error"},[Ur.ExtensionInterceptorError]:{eventName:"interceptor-execution-broke",eventType:"interceptor-execution",errorReason:"interceptor-execution-broke"},[Ur.ExtensionInteractionError]:{eventName:"extension-component-interacted",eventType:"interceptor-execution",errorReason:"extension-component-interacted"},[Ur.ExtensionRenderError]:{eventName:"extension-rendered",eventType:"interceptor-execution",errorReason:"extension-rendered"},[Ur.ExtensionRunError]:{eventName:"extension-run-error",eventType:"interceptor-execution",errorReason:"extension-run-error"},[Ur.ExtensionTimeoutError]:{eventName:"extension-render-timed-out",eventType:"interceptor-execution",errorReason:"extension-render-timed-out"},[Ur.ExtensionAssetFetchError]:{eventName:"extension-asset-fetch-error",eventType:"interceptor-execution",errorReason:"extension-asset-fetch-error"},[Ur.ExtensionSandboxAssetFetchError]:{eventName:"extension-sandbox-asset-fetch-error",eventType:"interceptor-execution",errorReason:"extension-sandbox-asset-fetch-error"},[Ur.ExtensionSandboxUncaughtError]:{eventName:"extension-sandbox-uncaught-error",eventType:"interceptor-execution",errorReason:"extension-sandbox-uncaught-error"},[Ur.ExtensionUnsupportedFeatureError]:{eventName:"extension-unsupported-feature-error",eventType:"interceptor-execution",errorReason:"extension-unsupported-feature-error"}},SP=({children:e})=>{if("undefined"==typeof window)return d(y,{children:e});const{observability:t,userEvents:n,checkout:r}=ie(),i=Dg(),o=Og(),s=r.configuration.layout.isOnePage.value;return a(()=>{const e=(e,t)=>{if(e.name in Ur&&t?.extension){const{extension:n}=t,{trace:r,message:a}=function(e){return{message:vP(e),trace:yP(e)}}(e);if(!ot(e.name))return;const i={apiVersion:n.apiVersion,appId:n.appId,appApiKey:n.appApiKey,appName:n.appName,appVersion:n.version,code:kP.ExtensionUsageError,errorName:e.name,extensionId:n.extensionId,extensionName:n.name,extensionType:n.type,message:a,placementReference:n.placementReference,extensionTarget:n.extensionPoint,registrationId:n.registrationId,trace:r,type:"uiExtensionError"};o("uiExtensionError",{...i,timestamp:new Date})}},r=(e,t,r)=>{if(e.name in PP&&t?.extension){const{extension:a}=t,{eventName:o,eventType:l,errorReason:c}=PP[e.name],{userToken:u,shopId:d,sessionToken:p,checkoutToken:m,apiClientId:h,sourceId:g,sourceType:f,checkoutSdkVariant:y,checkoutSdkVersion:v,checkoutSdkSchemaVersion:_,pageLoadId:b}=i;n.monorailEvent({schemaId:"checkout_c1_interaction_errors/3.2",payload:{userToken:u,shopId:d,sessionToken:p,pageLoadId:b,checkoutToken:m,apiClientId:h,sourceId:g,sourceType:f,extensionId:gP(a),extensionPoint:a.extensionPoint,extensionPlacementReference:a.placementReference,extensionInstanceId:a.extensionInstanceId,activatedExtensionIds:r?.extensions?.active,eventType:l,eventName:o,errorMessage:e.message,sourceDesign:s?"c1_redesign":"c1_legacy",errorReason:c,silencedViolation:!1,errorOrigin:"client",errorType:"extension",checkoutSdkVariant:y,checkoutSdkVersion:v,checkoutSdkSchemaVersion:_,extensionPublicIdentifier:a.publicIdentifier,extensionTargetPublicIdentifier:a.targetPublicIdentifier}})}};return t.addOnError(r),t.addOnError(e),()=>{t.removeOnError(r),t.removeOnError(e)}},[t,n,i,s,o]),d(y,{children:e})};function wP(){const e=bf(),t=i(new Set);return a(()=>()=>{for(const e of t.current)cancelAnimationFrame(e.handle),clearTimeout(e.timeout),e.resolve();t.current.clear()},[]),ac(n=>{if("error"===n.type||"invalid"===n.type)return new Promise(n=>{const r=()=>{if(!a.settled){a.settled=!0,cancelAnimationFrame(a.handle),clearTimeout(a.timeout);try{e()}finally{t.current.delete(a),n()}}},a={handle:requestAnimationFrame(r),resolve:n,settled:!1,timeout:setTimeout(r,100)};t.current.add(a)})}),null}function CP(){const{checkout:{identity:e,negotiator:n}}=ie(),r=n.current.fields.buyerIdentity,{inMemoryApplePayParts:{asPaymentMethod:a}}=gn();return t(()=>"applePay"===e.current.value&&Boolean(r.value?.purchasingCompany)&&a.value)}function EP(){const{checkout:{wallets:e},embed:t}=ie(),r=function(){const{checkout:{negotiator:e}}=ie(),{deliveryLines:t,email:r,phone:a,shippingAddress:i,billingAddress:o,billingAddressOption:s,paymentLines:l,tipLines:c,discountLines:u,interfaceFlow:d,externalDeliveryIds:p,cartMetafields:m,attributes:h}=e.parts,g=function(){const{checkout:{negotiator:e}}=ie(),t=e.current.fields.buyerIdentity;return n(()=>{const e=t.value?.customerProfile;if(e)return e.email},[t])}(),f=ok(),y=Cv();return n((e,n=!1)=>
2{if(d.value=void 0,p.value=void 0,e)r.value=e.email,a.value=e.phone,i.value=e.shippingAddress,o.value=e.billingAddress,e.billingAddressOption&&(s.value=e.billingAddressOption),l.value=e.paymentLines,c.value=e.tipLines,u.value=e.discountLines,m.value=e.cartMetafields;else{const e=g()??"",t=f("shipping"),s=f("billing");r.value=e,a.value="",n||(i.value=t??$l(i.value)),o.value=s??$l(o.value);const l=h.value;h.value=l?l.filter(e=>e.key!==jr):l}y.value||n||Ih(t,void 0)},[h,s,o,m,t,u,r,p,f,g,d,y,l,a,i,c])}(),a=qr(),i=CP();return n(({shouldResetCustomerInfo:n=!1,shouldRemovePaymentLine:o=!0,isConstrainedAddress:s=!1}={})=>{const l=n&&t?.isFlagshipPartner?t.embedderProposalSnapshot.value??null:null;e.setHasActiveApplePaySubscriptionReview(!1),i.value||e.setEscalatedWallet(null),n&&r(l,s),o&&!l&&a()},[t,r,a,e,i])}function xP({onClick:e,shouldResetCustomerInfo:r,shouldRemovePaymentLine:a,skipRedirect:i}={}){const{negotiate:o,progress:s}=rc(),l=EP(),{dispatch:c}=bh()??{},{client:u,observability:d,persistence:p,router:m,checkout:{identity:{current:h},negotiator:g},i18n:f}=ie(),{buyerIdentity:y}=g.current.fields,{value:v}=t(()=>function({i18n:e,buyerIdentity:t}){return Boolean(t.value?.customerProfile)?e.translate("review.checkout_a_different_way"):e.translate("review.checkout_as_guest")}({i18n:f,buyerIdentity:y})),{currentDetour:_}=nc().value,b=u.unstable_getSerialization("forcedRedesignWallet"),k=function(e){try{const t=new URL(e.href);return t.searchParams.delete(Sn),t.searchParams.append(Dv,"1"),t.toString()}catch{return}}(m.currentUrl.value),P=m.currentUrl.value.searchParams.has(Dv),S=b&&k&&!P&&!i;return{label:v,onClick:n(async t=>{if(d.counter({name:"checkout_return_to_guest_checkout",value:1,attributes:{identity:h.value,redirect:Boolean(S)}}),S)return p?.clearAll(),e?.(),t?.(),void window.location.replace(k);var n;c?.("addressReset"),(n=m.currentUrl.peek()).searchParams.has(Sn)&&(n.searchParams.delete(Sn),history.replaceState(null,"",n.href)),e?.(),l({shouldResetCustomerInfo:r,shouldRemovePaymentLine:a}),c?.("reset"),_&&s("checkout-as-guest-action"),t?.(),await o({silenceViolations:["non-stock"]})},[_,c,k,h,o,e,p,s,l,S,d,m,r,a])}}function IP(){return function(){const{router:e}=ie(),t=e.currentUrl.value,{onClick:n}=xP({shouldResetCustomerInfo:!0});a(()=>{t.searchParams.has(Dv)&&(n?.(),function(e){e.searchParams.has(Dv)&&(e.searchParams.delete(Dv),history.replaceState(null,"",e.href))}(t))},[])}(),null}const AP="wallet_deceleration";function TP(){const{walletUsedForSubmissionSignal:e,inMemoryGooglePayParts:{paymentSheetError:t}}=gn(),{clearForcedCheckoutLayout:r}=bv(xn),{checkout:a,router:i}=ie();return xP({onClick:n(async()=>{var n;e.value=void 0,t.value=void 0,r({wallet:"GOOGLE_PAY"}),"true"===(n=i.currentUrl.value).searchParams.get(AP)&&(n.searchParams.delete(AP),history.replaceState(null,"",n.href)),a.unstable_evaluateSupportsSplitShipping(i.currentUrl.value)},[e,t,a,r,i]),shouldResetCustomerInfo:!0,skipRedirect:!0})}function LP({shouldResetCustomerInfo:e}){const t=EP();return n(()=>{t({shouldResetCustomerInfo:e})},[t,e])}const NP="google_pay_legacy_token_bounce";function RP(){return function(){const{checkout:e,embed:t,observability:n,shop:r}=ie(),{inMemoryGooglePayParts:{paymentSheetError:i}}=gn(),{onClick:o}=TP();a(()=>{r.hasFlagEnabled(Hr)&&(t||"GOOGLE_PAY"===e.wallets.escalatedWallet.value&&(e.latestReceipt.value||$r({paymentLines:e.proposal.proposed.paymentLines.value})&&(n.counter({name:NP,value:1}),n.log(NP,"[useBounceLegacyGooglePayToken] Detected a legacy Google Pay token on load and returned the buyer to guest checkout"),o?.(()=>{i.value={type:"recovery_notice"}}))))},[])}(),null}const MP=re("NavigationBlockerContext");class DP extends Error{constructor(){super(...arguments),this.name="NavigationBlockerTimeout"}}function OP({children:e}){const t=i(new Set),a=m(!1),{observability:o}=ie(),s=n(e=>{setTimeout(()=>{t.current.has(e)&&o.error(new DP(`The block associated with the key: ${e} has been blocking for over 30 seconds now. Please check to see you are properly cleaning this up.`))},3e4)},[o]),l=n((e,n)=>{const r=n??"_global",i=t.current;e?(i.add(r),s(r)):i.delete(r),a.value=i.size>0},[a,s]),c=r(()=>({blocking:a,setBlocking:l}),[a,l]);return d(MP.Provider,{value:c,children:e})}const zP=f({registerPayNowButtonElement:()=>()=>{},payNowButtonElement:null,setPayNowButtonSectionMounted:()=>{},payNowButtonSectionMounted:!1}),BP=()=>h(zP);function VP(){const{registerPayNowButtonElement:e}=BP(),t=i(null);return n(n=>{t.current?.(),t.current=n?e(n):null},[e])}function FP({children:e}){const t=i(new Set),[a,o]=s(null),[l,c]=s(0),u=n(e=>(t.current.add(e),o(e),()=>{t.current.delete(e),o(n=>n===e?t.current.values().next().value??null:n)}),[]),p=n(e=>{c(t=>Math.max(0,t+(e?1:-1)))},[]),m=l>0,h=r(()=>({registerPayNowButtonElement:u,payNowButtonElement:a,setPayNowButtonSectionMounted:p,payNowButtonSectionMounted:m}),[u,a,p,m]);return d(zP.Provider,{value:h,children:e})}function UP(){return v_(ie())}function qP(){const{embed:e}=ie(),t=qh(),n=t?.config?.pixelEventsMode,r=e?.configuration?.pixelMode;return"DISABLED"===n||"FORWARD_TO_CLIENT"===n||"DISABLED"===r||"FORWARD_TO_CLIENT"===r}function jP(){const{mobileCheckoutSdk:e}=ie(),t=e.config.version,n=e.config.schema;return Boolean(t)||Boolean(n)}function HP({isFlagshipPartner:e,embedderProposalSnapshotEmail:t,proposedEmail:n}){if(e)return t||n||void 0}function $P(e){const t={totalAmount:{any:!0},paymentLines:[],billingAddress:null};
2return{...e,buyerIdentity:{...e.buyerIdentity,email:"",phone:"",customer:{presentmentCurrency:e.buyerIdentity?.customer?.presentmentCurrency,countryCode:e.buyerIdentity?.customer?.countryCode},marketingConsent:[]},delivery:{deliveryLines:[],noDeliveryRequired:[]},discounts:{lines:(n=e.discounts?.lines??[],n.filter(e=>e.allocationSet.allocatedForTotal?.targets.some(e=>!e.deliveryLineTarget)||e.allocationSet.allocated?.allocations.some(e=>!e.target.deliveryLineTarget)))},...e.payment?{payment:t}:{},...e.remote&&{remote:{...e.remote,remoteNegotiations:e.remote.remoteNegotiations.map(e=>({...e,payment:t}))}}};var n}var YP=(e=>(e.SignUp="sign_up_page",e.Payment="payment_page",e.Login="shop_pay_login_page",e.PaymentErrorState="payment_page_error_state",e.PaymentErrorModalGeneric="payment_page_error_modal_generic",e.PaymentErrorModalSignInFailed="payment_page_error_modal_sign_in_failed",e.PaymentErrorModalContinueWithShopPay="payment_page_error_modal_continue_with_shop_pay",e))(YP||{});class WP extends Error{constructor(){super(...arguments),this.name="MissingGuestCheckoutUrlError"}}function GP(e="payment_page",{markPrefilledGuestArrival:t=!1}={}){const{client:a,i18n:i,observability:o,userEvents:s,source:l,checkout:c,shop:u,persistence:d,shop:{hasStorefront:p},url:m,shopPay:h,embed:g,router:f}=ie(),y=f.currentUrl.value,{checkoutAsGuestUrl:v,profilePreviewToken:_,checkoutProfileContext:b,redirectSource:k}=h.config,P="simulated"===l.type,S=h.user.isAuthenticatedUser,w=u.hasFlagEnabled(Wr),C=c.negotiator.throttleState.peek().token,E=c.checkpointToken.value,x=c.configuration.renderContextToken.token.value,I=nk({mode:"copy-if-missing",include:{shopClientUuid:!0}}),A=HP({isFlagshipPartner:g?.isFlagshipPartner,embedderProposalSnapshotEmail:g?.embedderProposalSnapshot.value?.email,proposedEmail:c.proposal.proposed.email.value}),T=r(()=>{if(P)return"";if(!v)return p?m.storefront():"";const e=new URL(v);e.searchParams.set(Gr,"true"),Jr(e),t&&S.value&&Kr(l.type)&&w&&Qr(e,aa),E&&e.searchParams.set(Xr,E),C&&e.searchParams.set(Cb,C),_&&b&&(e.searchParams.set(Zr,_),e.searchParams.set(ea,b)),fr(y.search)&&e.searchParams.set(ta,"shop_web"),S.value?e.searchParams.set(na,"true"):e.searchParams.delete(na),x?e.searchParams.set("rctx",x):e.searchParams.delete("rctx");const n=new URLSearchParams(a.initialRequest.url.search);return function(e,t){const n=t.get("_mcs");n&&Yr(n)?e.set("_cs",n):e.delete("_cs")}(e.searchParams,n),I(e.searchParams,n),A&&!e.searchParams.get("checkout[email]")&&e.searchParams.set("checkout[email]",A),e.href},[P,v,E,a.initialRequest.url.search,_,b,y.search,S.value,C,p,m,x,I,A,t,l.type,w]);let L=i.translate("unauthenticated_modals.generic.cta");(UP()||g?.isCheckoutKit())&&(L=i.translate("checkout_sdk.use_another_payment_method"));const N=n(()=>(P||(S.value&&d?.clearAll(),o.counter({name:"shop_pay_return_to_guest_checkout",value:1,attributes:{redirect_source:k}}),s.monorailEvent({schemaId:"shopify_pay_payment_page_checkout_as_guest/2.1",payload:{...ra(l,c,u),origin:e}},{exportImmediately:!0})),null),[P,S,d,o,s,l,c,u,e,k]),R=n(e=>{if(c.unstable_setRedirectingExternally(!0),N(),!T)return c.unstable_setRedirectingExternally(!1),void o.error(new WP("redirectToGuestCheckout called without a guest checkout URL"));if(!e)return void window.location.assign(T);const t=new URL(T);!function(e,t){t&&(e.set(ia,t.paymentMethod),t.paymentMethodIdentifier?e.set(oa,t.paymentMethodIdentifier):e.delete(oa))}(t.searchParams,e),window.location.assign(t.href)},[c,N,T,o]);return r(()=>({label:L,href:T,onClick:N,redirectToGuestCheckout:R}),[L,T,N,R])}function JP(e){const{negotiate:t}=rc();return n(n=>t({silenceViolations:["all"],force:!0,customizeNegotiation:$P,negotiationStage:"negotiation",onComplete:t=>e(n,t)}),[t,e])}function KP({clearPii:e}){const{embed:t,checkout:r,userEvents:a,source:i,shop:o}=ie(),s=r.negotiator.parts.shippingAddress.value,{href:l,redirectToGuestCheckout:c}=GP("payment_page",{markPrefilledGuestArrival:!e}),u=HP({isFlagshipPartner:t?.isFlagshipPartner,embedderProposalSnapshotEmail:t?.embedderProposalSnapshot.value?.email,proposedEmail:r.proposal.proposed.email.value}),d=JP(c),p=function(e,t){const{negotiate:r}=rc();return n(n=>r({silenceViolations:["all"],force:!0,customizeNegotiation:e=>{const n=$P(e);return{...n,buyerIdentity:{...n.buyerIdentity,email:t}}},negotiationStage:"negotiation",onComplete:()=>e(n)}),[r,t,e])}(c,u??""),m=r.proposal.negotiated.fields.availableDeliveryAddresses.value,h=Boolean(m?.length&&m.some(e=>sa(s,e.address)));return n(t=>
2{if(r.unstable_setRedirectingExternally(!0),!e||h)return!e&&l&&a.monorailEvent({schemaId:"shopify_pay_payment_page_ui_interaction/1.2",payload:{...ra(i,r,o),action:"payment_step_redirect"}},{exportImmediately:!0}),void c(t);u?p(t).catch(()=>{r.unstable_setRedirectingExternally(!1)}):d(t).catch(()=>{r.unstable_setRedirectingExternally(!1)})},[r,e,l,a,i,o,h,c,u,d,p])}const QP=[3890849,3850711,5198245];function XP(e){return!!e&&QP.includes(e)}function ZP(){const{observability:e}=ie(),t=n(t=>{if("undefined"==typeof window||!window.ReactNativeWebView||"function"!=typeof window.ReactNativeWebView.postMessage)return;const n=JSON.stringify(t);try{window.ReactNativeWebView.postMessage(n)}catch(r){e.log("shop_app_messenger_post_message_failed","Failed to post message to ReactNativeWebView",{error:r})}},[e]);return r(()=>({notify:t}),[t])}function eS({children:e}){const{checkout:t,observability:n,source:r,client:o,environment:s,shopPay:l,shop:c}=ie(),u=t.rememberMe.shouldSetRememberMeCookies.value,p="simulated"===r.type,{href:m}=GP(),h=Jv().value,g=ZP(),f=i(!1),v="shopPay"===t.identity.current.value,_=o.unstable_getSerialization("apiClientId"),b=o.unstable_getSerialization("shopPayConfig"),k=XP(_),S=!0===b.shop_app_referral_shop_pay_eligible&&"shop_pay_disabled"===h&&c.hasFlagEnabled(la),w=!(p||void 0===h||k||t.configuration.isUniversalCheckoutFinalizer||S),C=v&&w,E=v&&!p&&!C&&!0===b.has_remember_me_session&&""!==l.user.shopAccountUuid.value,x=i(!1);return P(()=>{const e=t.latestReceipt.value;if(null!=e)switch(e.status){case"processed":g.notify({checkout_completed:!0});break;case"action_required":"complete_payment_challenge"===e.action.type?g.notify({checkout_error:"threeds_required"}):g.notify({checkout_error:"generic_error"});break;case"failed":"payment"===e.failure.type||"discount"===e.failure.type?g.notify({checkout_in_progress:!1}):g.notify({checkout_error:"generic_error"})}}),a(()=>{!f.current&&u&&(t.rememberMe.setRememberMeCookies(),f.current=!0)},[u,t.rememberMe]),function({enabled:e,observability:t,shopServerUrl:n}){const r=i(!1);a(()=>{e&&!r.current&&(r.current=!0,fetch(function(e){return new URL("/pay/session",e).href}(n),{method:"GET",credentials:"include",keepalive:!0}).then(e=>{e.ok||t.log("shop_pay_remember_me_session_exchange_failed","Failed to exchange Shop Pay remember-me session",{status:e.status})}).catch(e=>{t.log("shop_pay_remember_me_session_exchange_failed","Failed to exchange Shop Pay remember-me session",{errorMessage:e instanceof Error?e.message:String(e)})}))},[e,t,n])}({enabled:E,observability:n,shopServerUrl:s.services.shopServer.url}),a(()=>{C&&!x.current&&(x.current=!0,n.log("shop_pay_wrapper_redirecting_to_guest_checkout","Redirecting to guest checkout",{shopPayUnavailableReason:h}),"deferred_payment"!==h&&n.counter({name:"shop_pay_unavailable_redirecting_to_guest_checkout",value:1}),window.location.assign(m))},[m,n,h,C]),C?null:d(y,{children:e})}function tS(){const{client:e}=ie(),t=e.unstable_getSerialization("experiments"),n=t?.find(e=>e.clientHandle===ca)?.variant,r=Object.values(ua).find(e=>e===n)??ua.Control;return{variant:r,showPaymentTiles:r===ua.VariantA||r===ua.VariantC,useRedesignedChoiceList:r===ua.VariantB||r===ua.VariantC,showSingleCreditCard:r!==ua.Control}}function nS(){const{source:e}=ie(),{useRedesignedChoiceList:t}=tS();return t&&"shopPayExternal"!==e.type?"redesigned":"base"}class rS extends Error{constructor(){super(...arguments),this.name="TranslationError"}}const aS=()=>{const{url:e}=ie();return r(()=>[e.cart(),e.storefront()],[e])};function iS(){const{router:e,shop:n}=ie(),r=Yg(),{cartLink:{visibility:a}}=vv(),i=nc(),o=oS(),s=T("hidden"===a);return t(()=>{const{currentDetour:t}=i.value,a="thankYou"===t?.type;return n.hasStorefront&&!r.value&&!a&&!fr(e.currentUrl.value.search)&&Boolean(o.value)&&!s.value})}function oS(){const{source:e,url:n,checkout:{negotiator:r}}=ie(),a="simulated"===e.type,i=r.current.fields.buyerIdentity;return t(()=>{if(a)return new URL(n.cart());let t;return e.cartReturnUrl&&(t=new URL(e.cartReturnUrl)),Boolean(i.value?.customerProfile)&&t&&t.searchParams.append("logged_in","true"),t})}function sS(e){return e.currentUrlMatches("/thank-you")}const lS=_(function({href:e,target:t="auto",children:n,...r},a){const{i18n:i,router:o,url:s,source:l,checkout:c,embed:u,observability:p}=ie(),m=oS(),h=function(){const{client:e,environment:{services:t},shop:{customerAccounts:n,storefrontDomains:r}}=ie(),a=r?.map(e=>`https://${e}
2`)??[],i=[t.shopServer.url,...a];if(n.domain){const e=`https://${n.domain}`;i.push(e)}const o=e.unstable_getSerialization("loginUrl");return o&&i.push(`https://${new URL(o).host}`),i}(),g=new URL(s.storefront()).origin,f="simulated"===l.type,y=c.configuration.isWindowOpenDelegationEnabled,v=aS();if(c.configuration.isUniversalCheckoutFinalizer&&sS(o))return d("a",{...r,ref:a,"aria-disabled":"true",children:n});let _="_blank"===t,b="_blank"===t,k=Ol(e,{cart:Bl(m.value),checkout:zl()});const P=function(e,t,n,r){let a;try{a=new URL(e,t.currentUrl.value.origin)}catch{return 3}const i=a.protocol.replace(":","");return cS.has(i)?F(a,t.prefix)||!e.startsWith("//")&&!e.startsWith(a.protocol)?0:function(e,t,n,r){return e.origin===t.currentUrl.value.origin||e.origin===n||r.includes(e.origin)}(a,t,n,r)?1:2:uS.has(i)?1:3}(k,o,g,h),S=["/information","/shipping","/review","/payment","/thank-you","/cart","/","","/orders","/profile","/settings"],w=/^\/orders\/.*/;switch(P){case 2:b=!0,_=!0;break;case 1:b=!0;break;case 3:b=!0,k="#";break;case 0:!f||S.includes(Vl(k))||w.test(k)||(k="#");break;default:L(P)}const C=_?"_blank":void 0,E=_?"noopener noreferrer":void 0,x=Su({external:_,native:b});return b?d("a",{...r,href:k,target:C,rel:E,ref:a,"aria-describedby":x,onClick:e=>{if(y&&(1===P||2===P))return e.preventDefault(),u?.client?.windowOpenRequest(k).catch(e=>{p.log("window_open_delegation_error","Window open delegation failed in Link component",{url:k,error:e instanceof Error?e.message:String(e)})}),void r.onClick?.(e);if(f){if(e.preventDefault(),v.includes(k)){const e=new URL(o.currentUrl.value);return e.searchParams.set("ce_redirect",k),void o.navigate(e)}const t=i.translate("simulated_checkout.editor_link_new_tab_confirmation",{resolved_to_link:k});confirm(t)&&open(k)}r.onClick?.(e)},children:n}):d(V,{...r,router:o,href:k,target:C,rel:E,ref:a,"aria-describedby":x,children:n})});lS.displayName="Link";const cS=new Set(["http","https"]),uS=new Set([...cS,"mailto","tel","sms"]);function dS({children:e}){const{geolocation:t}=dy(),{i18n:a,embed:i,checkout:o,observability:s,shop:l}=ie(),c=da({embedder:i?.embedder,shop:l}),u=gf(),p=o.configuration.layout.isOnePage.value,m="redesigned"===nS(),h=n(e=>a.numberFormatter().format(e),[a]),{symbol:g,prefixed:f}=U(a.currency,a),y=r(()=>function(e){const t=new Map([["closeNotification",()=>e.translate("general.close_notice_label")],["expandNotification",()=>e.translate("general.expand_notice_label")],["closeModal",()=>e.translate("general.close_modal_label")],["processing",()=>e.translate("general.processing")],["loading",()=>e.translate("general.loading")],["submit",()=>e.translate("general.submit")],["increase",(t={})=>e.translate("general.stepper.increase",t)],["decrease",(t={})=>e.translate("general.stepper.decrease",t)],["minimumReached",(t={})=>e.translate("general.stepper.minimum_reached",t)],["maximumReached",(t={})=>e.translate("general.stepper.maximum_reached",t)],["january",()=>e.translate("general.dates.months.january")],["february",()=>e.translate("general.dates.months.february")],["march",()=>e.translate("general.dates.months.march")],["april",()=>e.translate("general.dates.months.april")],["may",()=>e.translate("general.dates.months.may")],["june",()=>e.translate("general.dates.months.june")],["july",()=>e.translate("general.dates.months.july")],["august",()=>e.translate("general.dates.months.august")],["september",()=>e.translate("general.dates.months.september")],["october",()=>e.translate("general.dates.months.october")],["november",()=>e.translate("general.dates.months.november")],["december",()=>e.translate("general.dates.months.december")],["monday",()=>e.translate("general.dates.weekdays.monday")],["tuesday",()=>e.translate("general.dates.weekdays.tuesday")],["wednesday",()=>e.translate("general.dates.weekdays.wednesday")],["thursday",()=>e.translate("general.dates.weekdays.thursday")],["friday",()=>e.translate("general.dates.weekdays.friday")],["saturday",()=>e.translate("general.dates.weekdays.saturday")],["sunday",()=>e.translate("general.dates.weekdays.sunday")],["mondayAbbreviation",()=>e.translate("general.dates.weekdays_abbreviation.monday")],["tuesdayAbbreviation",()=>e.translate("general.dates.weekdays_abbreviation.tuesday")],["wednesdayAbbreviation",()=>e.translate("general.dates.weekdays_abbreviation.wednesday")],["thursdayAbbreviation",()=>e.translate("general.dates.weekdays_abbreviation.thursday")],["fridayAbbreviation",()=>e.translate("general.dates.weekdays_abbreviation.friday")],["saturdayAbbreviation",()=>e.translate("general.dates.weekdays_abbreviation.saturday")],["sundayAbbreviation",()=>e.translate("general.dates.weekdays_abbreviation.sunday")],["showNextMonth",(t={})=>e.translate("general.datepicker.show_next_month",t)],["showPreviousMonth",(t={})=>e.translate("general.datepicker.show_previous_month",t)],["rangeStart",()=>e.translate("general.datepicker.range_start")],["inRange",()=>e.translate("general.datepicker.in_range")],["rangeEnd",()=>e.translate("general.datepicker.range_end")],["autocompleteOptionsAvailable",({count:t=0}={})=>0===t?e.translate("general.autocomplete_zero_item"):1===t?e.translate("general.autocomplete_single_item"):e.translate("general.autocomplete_multi_item",{number:t})],["qrCode",()=>e.translate("general.qr_code")],["removeChip",()=>e.translate("general.remove_chip")],["removeItem",(t={})=>e.translate("general.remove_item",t)],["removeTag",()=>e.translate("general.remove_tag")],["mapClusterTitle",({count:t=0}={})=>{const n="number"==typeof t?(r=t,e.numberFormatter().format(r)):t;var r;return 1===t?e.translate("general.map.cluster_title.one",{number:n}):e.translate("general.map.cluster_title.other",{number:n})}],["externalNewWindow",()=>e.translate("general.forwarding_indicator.external_and_new_window")],["newWindow",()=>e.translate("general.forwarding_indicator.new_window")],["external",()=>e.translate("general.forwarding_indicator.external")],["expandSheet",()=>e.translate("general.sheet.expand")],["dropzoneDraggedOver",()=>e.translate("general.dropzone.dragged_over")],["dropzoneInvalidFileType",()=>e.translate("general.dropzone.invalid_file_type")],["addFile",()=>e.translate("general.dropzone.add_file")],["reviewItemHeaderChangeValue",()=>e.translate("review.item_header.change_value")],["reviewItemHeaderSection",()=>e.translate("review.item_header.section")],["reviewItemHeaderValue",()=>e.translate("review.item_header.value")],["moneyLinesHeaderItem",()=>e.translate("order_summary.cost_table_item_column_header")],["moneyLinesHeaderValue",()=>e.translate("order_summary.cost_table_value_column_header")],["clipboardCopied",()=>e.translate("clipboard.copied")],["clipboardFailedToCopy",()=>
2e.translate("clipboard.failed_to_copy")],["productThumbnailQuantityLabel",()=>e.translate("order_summary.product_image_quantity_label")]]);return(e,n)=>{const r=t.get(e)?.(n);if(null==r)throw new rS(`Missing UI library translation: ${e}`);return r}}(a),[a]),v=r(()=>({code:a.currency,symbol:g,symbolPrefixed:f}),[f,g,a.currency]),_=r(()=>i?{embedder:i.embedder,interstitialBrandingEnabled:c}:void 0,[i,c]),b=r(()=>({countryCode:t.country.code}),[t.country.code]),k=r(()=>({direction:a.localeDirection,languageCode:a.locale}),[a.locale,a.localeDirection]),P=x_(),S=r(()=>({...P,close:()=>P.emit("closeAnnouncement")}),[P]);return d(Zu,{currency:v,embed:_,formatNumber:h,geolocation:b,linkComponent:lS,locale:k,onePage:p,editor:u,redesignedChoiceLists:m,translate:y,announcementEmitter:S,logger:s,children:e})}const pS=re("ValidationErrorsContext");function mS(){const e=new Set;return t=>{const n=`${t.message}${t.target}`,r=e.has(n);return e.add(n),!r}}const hS="$.payments",gS="$.cart.buyerIdentity",fS="$.cart.deliveryGroups[0].deliveryAddress",yS="$.cart.localizedField",vS="$.cart.billingAddress";function _S(){const{checkout:{negotiator:e}}=ie(),{allViolations:n}=e.current.fields,r=vn("allViolations"),a=t(()=>r.value?[]:n.value?n.value.filter(e=>"UnprocessableTermViolation"===e.__typename&&pa.has(e.code)).map(e=>({message:e.localizedMessage||e.nonLocalizedMessage,target:e.target})):[]);return t(()=>{const t=[...e.validationErrors.value,...a.value].filter(mS()),n=t.filter(({target:e})=>e?.startsWith(fS)&&Boolean(e.replace(`${fS}.`,""))),r=t.filter(({target:e})=>e?.startsWith(gS)&&Boolean(e.replace(`${gS}.`,""))),i=t.filter(({target:e})=>e?.startsWith(hS)&&Boolean(e.replace(`${hS}.`,""))),o=t.filter(({target:e})=>e?.startsWith(yS)&&Boolean(e.replace(`${yS}.`,""))),s=t.filter(({target:e})=>e?.startsWith(vS)&&Boolean(e.replace(`${vS}.`,""))),l=t.filter(({target:e})=>"$.cart.poNumber"===e),c=t.filter(e=>![...r,...n,...i,...o,...s,...l].includes(e));return{contactErrors:r,deliveryAddressErrors:n,paymentErrors:i,localizedFieldErrors:o,billingAddressErrors:s,poNumberErrors:l,globalErrors:c}})}function bS(e){return e.flatMap(e=>{const t=e.target?.split(".").pop();return t?[{error:e,field:t}]:[]})}function kS({targets:e,addressField:t,firstAdditionalAddressFields:n}){const r=e.find(({field:e})=>e===t);if(r)return r.error;const a=e.find(({field:e})=>"zip"===e?"postalCode"===t:"provinceCode"===e?"zoneCode"===t:("address1"===e||"address2"===e)&&zt[e].includes(t));return a?void 0===("address1"===a.field||"address2"===a.field?a.field:void 0)||n.includes(t)?a.error:{...a.error,message:" "}:void 0}function PS({children:e}){const{checkout:t}=ie(),{validation:o,negotiator:s}=t,{deliveryMethodsAddressErrors:l}=s.context,{billingAddressErrors:c,poNumberError:u}=o,{emailInputError:p,phoneInputError:m}=o.contactErrors,{contactErrors:h,deliveryAddressErrors:g,billingAddressErrors:f,poNumberErrors:y,globalErrors:v}=_S().value,{shippingAddress:_,billingAddress:b}=s.parts,k=_.fields.countryCode.value,P=b.fields.countryCode.value,S=xy(k),w=xy(P,Wk(t)),C=function(){const e=i(new Set),{userEvents:t,shop:{id:r,sameBillingAndShippingAddress:a},source:{checkoutSessionIdentifier:o},checkout:{negotiator:s}}=ie(),{value:l}=s.current.fields.shippingAddress,{value:c}=s.current.fields.billingAddress,{value:u}=s.current.fields.localizationExtensions;return n(({errors:n,reasons:i})=>{if(l&&Ny(l)){const s=`shipping:${Ry(l)}`;e.current.has(s)||n?.some(e=>Yt.has(e.code))||i?.includes(Wt.InvalidAddress)||(My(l.countryCode??"unknown",Ly(l),"shipping_address",r,o,a,t),e.current.add(s))}if(c&&Ny(c)){const s=`billing:${Ry(c)}`;e.current.has(s)||n?.some(e=>Gt.has(e.code))||i?.includes(Wt.InvalidAddress)||(My(c.countryCode??"unknown",Ly(c),"billing_address",r,o,a,t),e.current.add(s))}if(u&&u?.length>0){const{cacheKey:i,keysOnly:s}=function(e){const t=e.filter(e=>e.value&&"string"==typeof e.value&&""!==e.value.trim());return{cacheKey:t.map(e=>`${e.key}:${Kt(e.value.trim())}`).join("|"),keysOnly:t.map(e=>e.key)}}(u);if(s.length>0){const u=`localization:${i}`;e.current.has(u)||n?.some(e=>Jt.has(e.code))||(My(l?.countryCode??c?.countryCode??"unknown",s,"localized_id",r,o,a,t),e.current.add(u))}}},[l,c,u,r,o,a,t])}(),E=r(()=>({}),[]),x=n((e,t,n)=>{const r=e.value,a="string"==typeof r&&E[t]===r;!n||r&&!a?!n&&a&&(e.value=void 0,delete E[t]):(e.value=n.message,E[t]=n.message)},[E]);a(()=>{x(m,"phone",h.find(({target:e})=>"phone"===e?.split(".")?.pop())),x(p,"email",h.find(({target:e})=>"email"===e?.split(".")?.pop()))},[h,p,x,m]),a(()=>{const e=bS(g);Object.entries(l).forEach(([t,n])=>{if(!ly(t))return;const r=kS({targets:e,addressField:t,firstAdditionalAddressFields:S});x(n,t,r)})},[g,l,S,x]),a(()=>{const e=bS(f);
2Object.entries(c).forEach(([t,n])=>{if(!ly(t))return;const r=kS({targets:e,addressField:t,firstAdditionalAddressFields:w});x(n,`billing_${t}`,r)})},[c,f,w,x]),ac(e=>{"success"===e.type||"error"===e.type?C({errors:e.errors}):"invalid"===e.type&&C({reasons:e.reasons})}),a(()=>{x(u,"poNumber",y[0])},[x,u,y]);const I=r(()=>({globalErrors:v}),[v]);return d(pS.Provider,{value:I,children:e})}const SS=w({load:()=>ul(()=>import("./d08a6c7d.BQ54SvAe.js"),__vite__mapDeps([64,2,1,3,4,5,65,66,8,67,24,68,69,10,70,71,72,9,73,74,75,7,11])).then(e=>e.ApplePaySessionLoader),renderLoading:({children:e})=>e,useError:function(e){const{sessionLoadFailed:t}=gn().inMemoryApplePayParts,{observability:n}=ie();a(()=>{e&&(t.value=!0)},[e,n,t])}});function wS(){const e=function(){const e=Tt();return t(()=>!!e.value&&void 0!==window.ApplePaySession)}(),{availableWallets:n}=gn(),r=T(n.some(({name:e})=>"APPLE_PAY"===e)),a=i(!1),o=t(()=>(!a.current&&e.value&&r.value&&(a.current=!0),a.current));return d(x,{when:o,children:d(SS,{})})}function CS(){const{checkout:e}=ie();return!e.configuration.showPayButton}function ES({enabled:e,onTimeout:t,timeout:n=6e4}){const r=i(null),o=oe(t);a(()=>
2{if(e)return r.current=setTimeout(()=>o.current(n),n),()=>{r.current&&clearTimeout(r.current)}},[e,o,n])}var xS={Heading:"n8k95w1 n8k95w0 _1fragemws",textAlignVariant:{start:"n8k95wb n8k95w8 _1fragem126",center:"n8k95wc n8k95w9 _1fragem124",end:"n8k95wd n8k95wa _1fragem125"},displayVariant:{inline:"n8k95wf n8k95we _1fragem69",block:"n8k95wg"},levelVariant:{1:"n8k95w2",2:"n8k95w3",3:"n8k95w4",4:"n8k95w5",5:"n8k95w6",6:"n8k95w7"},visuallyHidden:"n8k95wh _1fragem121"};function IS({id:e,children:t,accessibilityRole:n,level:r,textAlign:o,autoFocus:s,visibility:l,tabIndex:c,display:u="block"}){const p=fu(),m=r??p??0,h=p?`h${p}`:"h1",g="hidden"===l?xS.visuallyHidden:v(xS.Heading,o&&xS.textAlignVariant[o],m?xS.levelVariant[m]:void 0,u&&xS.displayVariant[u]),f=i(null);return a(()=>{s&&f.current?.focus({preventScroll:!0})},[s]),d(h,{id:e,ref:f,tabIndex:s?-1:c,className:g,role:"heading"===n?void 0:n,children:t})}function AS({children:e,dialogLabel:t,renderInlineUntilMounted:n=!1}){const{lock:r}=ey(),i=m(!1);a(()=>{r(),i.value=!0},[i,r]);const o=d("div",{className:"MQqMI",role:"dialog","aria-modal":!0,"aria-label":t,children:[d("div",{className:"Jue6i"}),d("div",{className:"kpec9",children:e})]});return d(y,{children:[n&&!i.value?d("div",{"aria-hidden":"true",children:o}):null,d(eu,{children:d(Qf,{children:o})})]})}function TS({renderInlineUntilMounted:e=!1,useConsentCopy:t=!1}){const{i18n:n}=ie(),r=t?n.translate("wallets.deceleration.one_more_step_to_complete_order"):n.translate("wallets.deceleration.one_more_step");return d(AS,{dialogLabel:r,renderInlineUntilMounted:e,children:d(Jf,{gap:"large-400",alignItems:"center",children:[d(Nf,{children:d(Df,{size:"large"})}),d(IS,{level:2,textAlign:"center",children:r})]})})}function LS({onTransitionComplete:e,useConsentCopy:t=!1}){return d(NS,{onTransitionComplete:e,useConsentCopy:t})}function NS({onTransitionComplete:e,useConsentCopy:t}){const{checkout:r,i18n:o}=ie(),s=CS(),{payNowButtonElement:l,payNowButtonSectionMounted:c}=BP(),u=Boolean(l||s&&c),p=i(!1);u&&(p.current=!0);const m=r.configuration.layout.isOnePage,h=m.value,g=p.current,f=i(null),y=i(!1),v=i(!1),_=n(()=>{m.value&&(y.current||(y.current=!0,ju({content:o.translate("wallets.errors.subscription_review_required"),role:"status"}),r.wallets.setIsDecelerating(!1),e()))},[o,m,e,r.wallets]);return ES({enabled:!0,onTimeout:()=>{v.current=!0,_()},timeout:1e4}),a(()=>{if(null===f.current&&(f.current=Date.now()),v.current)return void _();if(!g)return;const e=Date.now()-f.current,t=Math.max(0,3e3-e);if(0===t)return void _();const n=setTimeout(()=>{_()},t);return()=>clearTimeout(n)},[_,h,g]),d(TS,{renderInlineUntilMounted:!0,useConsentCopy:t})}function RS(e){const{shop:n,checkout:{configuration:r,identity:a}}=ie(),i="shopPay"===a.current.value,o=n.hasFlagEnabled(fn);return t(()=>ma({supportsOnePage:ha({isOnePage:r.layout.isOnePage.value,isApplePay3PageVaultedReviewEnabled:o,asPaymentMethod:e.value}),isShopPayActive:i}))}const MS=["address2","company","phone"];function DS({addressErrors:e}){if(1!==e.size)return;const[t]=e.keys();var n;return void 0!==t?(n=t,MS.includes(n)?t:void 0):void 0}function OS({missingAddressField:e,violations:t}){return"company"===e&&t.some(({code:e})=>"DELIVERY_COMPANY_REQUIRED"===e)}function zS({addressErrors:e,violations:t}){const n=DS({addressErrors:e});if(!OS({missingAddressField:n,violations:t}))return new Map(e);const r=new Map(e);return r.delete(n),r}function BS({paymentLines:e,paymentMethods:t}){const n=t?.some(e=>"wallet"===e.type&&"PAYPAL_EXPRESS"===e.name);if(!n)return{status:"not_connected"};const r=Nt(e,"PAYPAL_EXPRESS");if(r&&ga(r)){const{walletContent:e}=r.method;return{status:"connected",email:e?.email??"",token:e?.token??""}}return{status:"not_connected"}}function VS({code:e}){return Gn.has(e)||wa.has(e)||Ca.has(e)||Ea.has(e)||pa.has(e)||xa.has(e)||Ia===e}function FS({isPayWithPayPalButton:e}){const{inMemoryPayPalParts:t}=gn();return e?t.payWithPayPalButtonStatus:t.acceleratedCheckoutButtonStatus}function US(){const{isInPayPalContextSignal:e}=gn(),{i18n:n}=ie(),r=FS({isPayWithPayPalButton:!0}),{inMemoryPayPalParts:{accountStatus:a}}=gn();return t(()=>{if(e.value)return"error"===r.value.status?n.translate("wallets.errors.unavailable.description",{walletName:n.translate("brand.paypal")}):"error"===a.value.status?n.translate("wallets.errors.generic",{walletName:n.translate("brand.paypal")}):void 0})}const qS=()=>{const{checkout:{negotiator:e}}=ie(),{paymentLines:t}=e.parts;return n(()=>{const e=t.value;t.value=Cn(e,{method:{type:"wallet",name:"PAYPAL_EXPRESS"}}
2)},[t])};function jS(){const e=Be(),{checkout:n,shop:r}=ie(),a=n.configuration.layout.isOnePage.value,i=r.hasFlagEnabled(va),o=n.extensibility.ui.hasAtRiskPlacement;return t(()=>{if(a)return!1;if(i&&!o.value)return!1;const t=e.value.enabledDeliveryMethods.includes("PICK_UP");return!n.isShippingRequired.value||!t})}function HS(e){return Boolean(e.value?.method.walletContent?.isVenmo)}const $S=()=>{const{checkout:{negotiator:e}}=ie(),{paymentLines:n}=e.parts;return t(()=>Nt(n.value,"PAYPAL_EXPRESS"))},YS=()=>{const{checkout:{negotiator:e}}=ie(),{paymentLines:n}=e.parts;return t(()=>{const e=Nt(n.value,"PAYPAL_EXPRESS");return Boolean(e&&ga(e))})},WS=()=>{const{inMemoryPayPalParts:{accountStatus:e}}=gn(),{progressing:n}=rc(),r=JS();return t(()=>Boolean(r.value&&("loading"===e.value.status||n.value)))},GS=()=>{const e=JS(),n=fa(),r=ya(),a=kt();return t(()=>!(!r.value&&(n.value||a.value&&a.value.amount<=0)||!e.value))},JS=()=>{const{checkout:{negotiator:e}}=ie(),{paymentLines:n}=e.parts;return t(()=>{const e=Nt(n.value,"PAYPAL_EXPRESS");return Boolean(e&&!ga(e))})},KS=new Map,QS=new Map,XS=new Map;class ZS extends cl{constructor(){super(...arguments),this.name="DuplicateWalletError",this.defaultGroupingHash="DuplicateWalletError"}}function ew({children:e}){const{checkout:i,observability:o,router:l,i18n:c,shop:u,source:p}=ie(),h=l.currentUrl.value,g=i.configuration.layout.isOnePage.value,f=u.hasFlagEnabled(fn),{forceOnePageCheckoutLayout:y}=bv(fn),v=m(h.searchParams.has(yn)&&!i.wallets.hasConsumedApplePaySubscriptionReviewParam.value),{shippingAddress:_}=i.negotiator.parts,b=Ta(p),k=Gg(Ct.PayPal,{scope:b}),S=Gg(Ct.GooglePay,{scope:b}),w=Gg(Ct.AmazonPay,{scope:b}),C=Gg(Ct.ApplePay,{scope:b}),E=function(e){const{checkout:{negotiator:n}}=ie(),r=n.parts.paymentLines;return t(()=>{const t=e.lastClicked.value,n=Nt(r.value,"PAYPAL_EXPRESS");return Boolean(n)||"PAYPAL_EXPRESS"===t})}(i.wallets),x=m(void 0),I=hh({sdkStatus:{status:"idle"},buttonStatus:{status:"not_rendered"},paymentSheetError:void 0,paymentSheetOpenPromise:void 0,paymentSheetOpenPromiseResolve:void 0}),A=hh({acceleratedCheckoutButtonStatus:{status:"not_rendered"},payWithPayPalButtonStatus:{status:"not_rendered"},accountStatus:BS({paymentLines:i.proposal.proposed.paymentLines.peek(),paymentMethods:i.proposal.negotiated.fields.paymentMethods.peek()}),isLoadingPaymentSheet:!1,isApproving:!1,paymentSheetError:void 0}),L=hh({buttonStatus:{status:"not_rendered"}}),N=hh({buttonStatus:{status:"not_rendered"}}),R=dv(),M=_n(),D=hh({asPaymentMethod:!1,buttonStatus:{status:"not_rendered"},paymentSheetError:void 0,subscriptionReviewTransition:v.value&&Hl({applePayThreePageVaultedReviewEnabled:f,isOnePageCheckout:g})&&La({isApplePaySubscriptionReviewLayoutSupported:g||u.hasFlagEnabled(fn),hasSubscriptionReviewQueryParam:v.value,isABTestActive:u.hasFlagEnabled(un),variant:R,isCaliforniaBillingOrShippingAddress:M.value})?"storefront_redirect":void 0,prefetchPaymentSession:void 0,initialDeliveryIdentifier:void 0,isLoadingPaymentSheet:!1,sessionLoadFailed:!1,requirePhoneOnNextAttempt:!1,requireBillingPhoneOnNextAttempt:!1,expiresAt:void 0,preCompletionHandler:void 0}),O=m(void 0),z=hh({sdkStatus:{status:"idle"},buttonStatus:{status:"not_rendered"},buyWithPrimeButtonStatus:{status:"not_rendered"},buyerDetailsContentLoaded:!1,hasPaymentSheetError:!1,addressError:void 0,buyerDetails:{loading:!1,error:!1,details:void 0},serializedAmazonParams:null}),B=m(!1),V=m(void 0),{queryParam:F}=Rv({applePayPaymentSheetError:D.paymentSheetError,applePaySubscriptionReviewTransition:D.subscriptionReviewTransition}),U=RS(D.asPaymentMethod).value,q=i.configuration.addressSettings.nonBillingAddressSettings.value.isRequired("company");!function(e){const{checkout:{negotiator:t}}=ie(),{parts:n}=t,{paymentMethods:r}=t.current.fields;P(()=>{if("connected"===e.peek().status)return;const t=BS({paymentLines:n.paymentLines.value,paymentMethods:r.value});"connected"===t.status&&(e.value=t)})}(A.accountStatus),function(e){const{environment:t,embed:n,observability:r,source:{checkoutSessionIdentifier:i},checkout:{negotiator:o}}=ie(),s=o.current.fields.paymentMethods,l=Boolean(n?.isFlagshipPartner)&&!En(n?.embedder),c=s.value?.find(e=>"wallet"===e.type&&"SHOP_PAY"===e.name),u=c?.placements?.includes("ACCELERATE
2D_CHECKOUT"),d=u?c?.eligibilityToken:void 0,p=t.services.shopServer.url,m=e.buttonStatus;a(()=>{if(!l)return void(m.value={status:"rendered"});if(!d)return void(m.value={status:"not_eligible"});const e=`${p}|${i||d}`,t=KS.get(e);if(t)return void(m.value=t);const n=XS.get(p)??0;if(Date.now()<n)return void(m.value={status:"error"});let a=!1,o=QS.get(e);return o||(o=async function(){try{const e=await fetch(`${p}/pay/checkout_eligibility/check`,{method:"POST",credentials:"omit",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:d})});if(!e.ok)return 429===e.status&&XS.set(p,Date.now()+6e4),r.counter({name:"express_checkout_shop_pay_eligibility",value:1,attributes:{result:"fail_closed",reason:`http_${e.status}`}}),{status:{status:"error"},definitive:!1};let t;try{t=await e.json()}catch{return r.counter({name:"express_checkout_shop_pay_eligibility",value:1,attributes:{result:"not_eligible",reason:"malformed_payload_fail_closed"}}),{status:{status:"not_eligible"},definitive:!1}}const n=!0===t.eligible||!1===t.eligible,a=!1!==t.eligible&&n?{status:"rendered"}:{status:"not_eligible"};return r.counter({name:"express_checkout_shop_pay_eligibility",value:1,attributes:{result:a.status,...!n&&{reason:"malformed_payload_fail_closed"}}}),{status:a,definitive:n}}catch{return r.counter({name:"express_checkout_shop_pay_eligibility",value:1,attributes:{result:"fail_closed",reason:"network_error"}}),{status:{status:"error"},definitive:!1}}}().then(({status:t,definitive:n})=>(n&&KS.set(e,t),QS.delete(e),t)),QS.set(e,o)),o.then(e=>{a||(m.value=e)}).catch(()=>{}),()=>{a=!0}},[l,d,i,p,m,r])}(N),function(){const{checkout:{proposal:{negotiated:e,proposed:t},wallets:n},observability:r}=ie(),i=n.escalatedWallet.value;a(()=>{if(t.email.value)return;const n=e.fields.paymentLines.value?.lines??[];let a;switch(i){case wn.AmazonPay:case wn.BuyWithPrime:a=function(e,t){const n=Aa(e,t);if(!n)return;const r=n.method.walletParams;return r?.email}(n,i);break;case"PAYPAL_EXPRESS":case"VENMO":a=function(e){const t=Nt(e,"PAYPAL_EXPRESS");return t&&t.method.walletContent?t.method.walletContent.email:void 0}(n);break;default:return}a?(t.email.value=a,r.log("checkout_wallets_email_recovery","[useRecoverWalletContact] Detected a missing email during a wallet flow and recovered it",{escalatedWallet:i,status:"success"})):r.log("checkout_wallets_email_recovery","[useRecoverWalletContact] Detected a missing email during a wallet flow but was unable to recover it",{escalatedWallet:i,paymentLines:n,status:"failure"})},[])}();const j=$v(N),H=Qv({inMemoryGooglePayParts:I,inMemoryPayPalParts:A,inMemoryVenmoParts:L,inMemoryApplePayParts:D,inMemoryAmazonPayParts:z,didIncrementUnusablePartialAddressMetric:B}),$=r(()=>H?.filter(({placements:e,name:t})=>("APPLE_PAY"!==t&&"GOOGLE_PAY"!==t||"localization_extension_field_error"!==F)&&!("APPLE_PAY"===t&&q&&!U)&&Hv(t,e,j)),[H,F,q,U,j]),Y=T($);a(()=>{$?.length&&performance.mark(Na)},[]);const W=$?.map(e=>e.name)||[],G=W.join(",");a(()=>{new Set(W).size!==W.length&&o.error(new ZS("Duplicate accelerated wallet(s) found in checkout",{metadata:{duplicatedWallets:[...new Set(W.filter((e,t)=>W.indexOf(e)!==t))],allWalletNames:W}}))},[G,o]);const J=$?.length||0,K=void 0!==i.wallets.activeSession.value?.wallet&&"APPLE_PAY"!==i.wallets.activeSession.value.wallet&&Boolean(i.wallets.isDeceleratingSignal?.value),Q=D.subscriptionReviewTransition.value,X=t(()=>Ra({checkout:i})),Z=X.value&&Ma(R),ee=function({asPaymentMethod:e,useConsentCopy:t,isCaliforniaBillingOrShippingAddress:n,hasSubscription:r,transition:a,isABTestActive:i}){return!e&&(!!(t||n&&r)||"storefront_redirect"===a&&(n||!i))}({asPaymentMethod:D.asPaymentMethod.value,useConsentCopy:Z,isCaliforniaBillingOrShippingAddress:M.value,hasSubscription:X.value,transition:Q,isABTestActive:u.hasFlagEnabled(un)}),te=void 0!==Q&&!K&&ee&&Hl({applePayThreePageVaultedReviewEnabled:f,isOnePageCheckout:g}),ne=i.wallets.hasActiveApplePaySubscriptionReview.value&&ee&&!M.value&&void 0===Q;a(()=>{ee||(i.wallets.setHasActiveApplePaySubscriptionReview(!1),void 0!==Q&&(D.subscriptionReviewTransition.value=void 0,K||i.wallets.setIsDecelerating(!1)))},[Q,i.wallets,D.subscriptionReviewTransition,K,ee]),a(()=>{"storefront_redirect"===Q&&te&&!g&&y({wallet:"APPLE_PAY",reason:"subscriptions",asPaymentMethod:!0})},[Q,y,g,te]);const re=u.hasFlagEnabled(xn)&&!g&&h.searchParams.has(Da);a(()=>{re&&(i.unstable_forceCheckoutLayoutToOnePage(),kv(o,{wallet:"GOOG
2LE_PAY",reason:"subscriptions",asPaymentMethod:!0,result:"success"}),ju({content:c.translate("wallets.errors.subscription_review_required"),role:"status"}))},[i,c,o,re]);const ae=n(()=>{v.value=!1,D.subscriptionReviewTransition.value=void 0},[v,D.subscriptionReviewTransition]);!function(e){const{observability:t,router:n}=ie(),r=n.currentUrl.value,[a,i]=s(r.normalizedPath);r.normalizedPath!==a&&(i(r.normalizedPath),e.forEach(({walletName:e,...n})=>{("signal"in n?[n.signal]:n.signals).forEach(n=>{"error"===n.peek().status&&(t.counter({name:"wallet_button_status_reset",value:1,attributes:{walletName:e}}),n.value={status:"not_rendered"})})}))}([{walletName:"applepay",signal:D.buttonStatus},{walletName:"amazonpay",signal:z.buttonStatus},{walletName:"buy_with_prime",signal:z.buyWithPrimeButtonStatus},{walletName:"googlepay",signal:I.buttonStatus},{walletName:"paypal",signals:[A.acceleratedCheckoutButtonStatus,A.payWithPayPalButtonStatus]}]),P(()=>{const e=_.value,t=i.wallets.activeSession.value;"APPLE_PAY"===t?.wallet&&o.log("wallets_shipping_address_update","Shipping address is updated during Apple Pay session",{countryCode:e?.countryCode,isPostalCodePadded:kn(e?.postalCode,e?.countryCode),asPaymentMethod:t.asPaymentMethod})});const oe=r(()=>({availableWallets:H,walletUsedForSubmissionSignal:x,persistedPayPalSignal:k,inMemoryPayPalParts:A,inMemoryVenmoParts:L,persistedGooglePaySignal:S,inMemoryGooglePayParts:I,inMemoryApplePayParts:D,applePaySessionHandler:O,persistedApplePaySignal:C,persistedAmazonSignal:w,inMemoryAmazonPayParts:z,inMemoryShopPayParts:N,didIncrementUnusablePartialAddressMetric:B,acceleratedWalletPaymentMethods:Y,isInPayPalContextSignal:E,buttonCount:J,receiptErrorSignal:V}),[H,k,S,C,w,Y,J,L,x,I,A,D,O,z,N,V,E,B]);return d(Oa.Provider,{value:oe,children:[te&&d(LS,{onTransitionComplete:ae,useConsentCopy:Z}),d("span",{role:"status","aria-live":"polite","aria-atomic":"true",className:Se({screenReaders:"only"}),children:ne?c.translate("wallets.errors.subscription_review_required"):""}),e]})}const tw=E(function({children:e,AlternativeProposal:t}){const{embed:r}=ie(),a=n(e=>r?.client?.showToast(e)??!1,[r]);return d(FP,{children:d(OP,{children:d(nw,{AlternativeProposal:t,children:[d(uh,{handleToast:a,children:e}),d(Zc,{})]})})})});function nw({children:e,AlternativeProposal:t}){const{shop:n,checkout:a}=ie(),i=a.unstable_graphqlDataRequestInfo?.httpRequestInfo,o=r(()=>{const{country:e,zone:t,coordinates:r}=i?.geolocation??{};return i?{geolocation:{default:e??void 0,country:e??n.country,zone:t??void 0,coordinates:r?{longitude:r.longitude,latitude:r.latitude}:void 0},shop:{}}:void 0},[i,n]),s="undefined"==typeof window?null:d(y,{children:[d(wP,{}),d(sv,{}),d(Kk,{}),d(IP,{}),d(RP,{})]}),l=t??f_;return d(uy.Provider,{value:o,children:d(E_,{children:d(dS,{children:d(T_,{children:d(h_,{children:d(l,{children:d(pP,{children:d(ew,{children:d(Jk,{children:d(PS,{children:d(Pf,{children:d(q_,{children:d(Kh,{children:d(P_,{children:d(Rg,{children:d(SP,{children:d(o_,{children:d(D_,{children:d(l_,{children:d(eS,{children:[d(iy,{}),d(rw,{}),d(hP,{}),d(wS,{}),e,s]})})})})})})})})})})})})})})})})})})})})}function rw(){const e=i(!1),t=ie(),{embed:n,webMcp:r}=t,a=ae(tc),o=t.checkout.negotiator,{resetAddressErrors:s}=_y(o.context.deliveryMethodsAddressErrors),l=oe({journeyProgression:a,negotiator:o,clearShippingAddressErrors:s});if(!e.current){e.current=!0;const a={get completing(){return l.current.journeyProgression.completing},get progressing(){return l.current.journeyProgression.progressing},detour:(...e)=>l.current.journeyProgression.detour(...e),progress:(...e)=>l.current.journeyProgression.progress(...e),prefetch:()=>l.current.journeyProgression.prefetch(),negotiate:e=>l.current.journeyProgression.negotiate(e)},i=()=>l.current.negotiator.waitForPendingNegotiations();n?.unstable_providePreactContext({journey:a,waitForPendingNegotiations:i,waitForSkeletonRemoved:()=>pl(),negotiationContext:o.context}),r?.unstable_providePreactContext({loadPickupLocalityServices:()=>C(()=>ul(()=>import("./7724832f.QQJrsTCS.js"),__vite__mapDeps([76,1,2,3,4,5,77,62,45,46,7,8,9,10,11]))).then(({createPickupLocalityServices:e})=>e(t)),journey:a,clearShippingAddressErrors:()=>l.current.clearShippingAddressErrors(),get negotiator(){return l.current.negotiator},waitForPendingNegotiations:i})}return null}const aw=w({displayName:"DevTools",load:()=>ul(()=>import("./bad03769.DoO91dLJ.js"),__vite__mapDeps([78,2,1,3,4,5,63,7,8,9,10,11,79])),suspense:!0}),iw=w({displayName:"EditorBridge",suspense:!1,load:()=>ul(()=>import("./abd080c1.gM4E0IWI.js"),__vite__mapDeps([80,1,2,3,4,5,11,7,8,9,10]))}),ow=w({id:()=>"PrivacyPreferences",displayName:"PrivacyPreferences",suspense:!1,useError:function(e){const{observability:t}=ie();a(()=>{e&&function(e,t){e.error(t,{metadata:{privacyPreferences:{component:"PrivacyPreferences",failure:"lazy_load"}}})}(t,e)},[e,t])},load:()=>C(()=>ul(async()=>{const{deferredPrivacyComponents:e}=await(import("./2acfb1ce.BfTfZaeq.js"));return{deferredPrivacyComponents:e}},__vite__mapDeps([81,2,1,3,4,5,39,40,7,8,9,10,11])).then(({deferredPrivacyComponents:e})=>e.PrivacyPreferences))}),sw=w({id:()=>"PrivacySheet",displayName:"PrivacySheet",suspense:!1,useError:function(e){const{observability:t}=ie();a(()=>{e&&function(e,t){e.error(t,{metadata:{privacySheet:{component:"PrivacySheet",failure:"lazy_load"}}})}(t,e)},[e,t])},load:()=>C(()=>ul(async()=>{const{deferredPrivacyComponents:e}=await(import("./2acfb1ce.BfTfZaeq.js"));return{deferredPrivacyComponents:e}},__vite__mapDeps([81,2,1,3,4,5,39,40,7,8,9,10,11])).then(({deferredPrivacyComponents:e})=>e.PrivacySheet))});function lw({children:e}){return d(y,{children:e})}function cw({children:e}){const t=r(()=>new URL(window.location.href),[]),{client:n,source:i}=ie(),o=n.unstable_getSerialization("shopPayConfig");return a(()=>{o&&async function(e,t,n){const{universal_redirect_enabled:r,universal_redirect_indicator:a}=n,i={},o=za(e.searchParams);if(a&&!o||"simulated"===t.type||null===t.checkoutSessionIdentifier||!e.searchParams.has(Gr)||(i.disable_automatic_redirect=t.checkoutSessionIdentifier),r&&"false"===e.searchParams.get("auto_redirect")&&(i.block_universal_redirect=!0),Object.keys(i).length>0){const t={...i,checkout_version:"c1",edge_redirect:"true"===e.searchParams.get("edge_redirect")};fetch("/shopify_pay/accelerated_checkout",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t),credentials:"include"})}}(t,i,{universal_redirect_enabled:o.universal_redirect_enabled,universal_redirect_indicator:o.universal_redirect_indicator})},[t,i,o]),d(y,{children:e})}function uw({children:e}){const t="undefined"==typeof window;return d(t?lw:cw,{children:e})}function dw({children:e,context:t,...n}){const r="undefined"==typeof window,a=Tt();return d(Va.Provider,{value:t,children:d(hf,{target:"cart",children:d(uw,{children:d(q,{router:t.router,children:d(tw,{...n,children:d(Ba,{
2children:[d(df,{children:e}),d(yf,{}),!r&&d(pf,{}),d(x,{when:a,children:[d(sw,{}),d(ow,{})]}),d(pw,{}),Dt()&&d(iw,{})]})})})})})})}function pw(){const e=Tt();return gf(),d(x,{when:()=>e.value&&!1,children:d(aw,{})})}function mw(e){return[e].flat(99).filter(Boolean).length>0}var hw={Divider:"mg7oix2 mg7oix0 _1fragemws mg7oix1",alignmentVariant:{start:"mg7oixc mg7oixb mg7oixa _1fragem64 _1fragem19 _1fragema",center:"mg7oixd mg7oixb mg7oixa _1fragem64 _1fragem19 _1fragema",end:"mg7oixe mg7oixb mg7oixa _1fragem64 _1fragem19 _1fragema"},borderWidthVariant:{base:"mg7oixf",large:"mg7oixg","large-100":"mg7oixh","large-200":"mg7oixi"},styleVariant:{base:"mg7oix3",dashed:"mg7oix4",dotted:"mg7oix5"},contentAlignmentVariant:{start:"mg7oixj",center:"mg7oixk",end:"mg7oixl"},directionVariant:{inline:"mg7oix8 mg7oix6 _1fragemzf",block:"mg7oix9 mg7oix7 _1fragem2s"}};function gw({id:e,borderStyle:t="base",borderWidth:n="base",direction:r="inline",accessibilityRole:a="separator",alignment:i="center",children:o}){const s=mw(o);return d("div",{role:s?void 0:a,className:v(hw.Divider,hw.directionVariant[r],s&&hw.alignmentVariant[i],hw.borderWidthVariant[n],hw.styleVariant[t]),id:e,children:s&&d("div",{className:v(hw.contentAlignmentVariant[i]),children:[o,"separator"===a&&d("span",{role:"separator"})]})})}function fw({children:e,condition:t}){return d(t?"picture":y,{children:e})}const yw=new Map(Ua({addMaxWidth:!1}).map(({breakpoint:e,query:t})=>[e,t]));function vw(e,t){var n;if(!e&&t&&Fa(t))return Object.entries((n=t,Fa(n)?{base:[{source:n.default}],...n.conditionals.reduce((e,t)=>{const n=void 0===t.conditions.viewportInlineSize?"base":t.conditions.viewportInlineSize.min,r=void 0===t.conditions.resolution?[{source:t.value}]:[{source:t.value,resolution:t.conditions.resolution}],a=n in e?e[n]??[]:[];return{...e,[n]:[...a,...r]}},{})}:{base:[{source:n}]})).sort(([e],[t])=>{const n=ne[e],r=ne[t];return null!=n&&null!=r?r-n:0}).map(([e,t])=>{const n=yw.get(e);if(void 0!==n&&Array.isArray(t)){const e=t.map(({source:e,resolution:t})=>[e,t&&`${t}x`].join(" ").trim()).join(", ");return j("source",{key:n,media:n,srcSet:e})}}).filter(Boolean)}function _w(e){if(e)return Fa(e)?"string"==typeof e.default?e.default:void 0:e}var bw={"large-200":{boxSize:100},large:{boxSize:86},base:{boxSize:64},small:{boxSize:40},"small-200":{boxSize:32}},kw={BadgeWrapper:"_1m6j2n3v _1m6j2n3u _1fragemwi",Badge:"_1m6j2n3x _1m6j2n3w _1fragemfp _1fragemgj _1fragemi7 _1fragemhd _1fragemsw _1fragemr3 _1fragem64 _1fragem19 _1fragembj _1fragemyz",Overlay:"_1m6j2n314 _1m6j2n313 _1fragemwi _1fragem64 _1fragem19 _1fragembj",Placeholder:"_1m6j2n3p _1m6j2n3o _1fragem108 _1fragem10n _1fragemzt _1fragem112 _1fragemwi _1fragem64 _1fragem19 _1fragembj",ProductThumbnail:"_1m6j2n33 _1m6j2n32 _1fragemws",ProductThumbnailImage:"_1m6j2n3n _1m6j2n3m _1fragemzf _1fragem4q _1fragem5u",depthVariant:{0:"_1m6j2n3d",1:"_1m6j2n3e _1m6j2n3c",2:"_1m6j2n3f _1m6j2n3c",legacy:"_1m6j2n3g _1m6j2n3c"},borderColorVariant:{base:"_1m6j2n38",custom:"_1m6j2n39"},borderRadiusVariant:{base:"_1m6j2n3a",small:"_1m6j2n3b"},borderVariant:{none:"_1m6j2n3s _1m6j2n3q _1fragemeg _1fragemdw _1fragemf0 _1fragemdc",full:"_1m6j2n3t _1m6j2n3r _1fragemk5 _1fragemjl _1fragemkp _1fragemj1"},boxShadowMargin:"_1m6j2n312",productThumbnailSizeVariant:{"large-200":"_1m6j2n3h",large:"_1m6j2n3i",base:"_1m6j2n3j",small:"_1m6j2n3k","small-200":"_1m6j2n3l"},thumbnailBackgroundVariant:{base:"_1m6j2n36 _1m6j2n34 _1fragem133",subdued:"_1m6j2n37 _1m6j2n35 _1fragem13d"},badgeSizeVariant:{base:"_1m6j2n3y",small:"_1m6j2n3z"},badgeToneVariant:{auto:"_1m6j2n310",accent:"_1m6j2n311"},visuallyHidden:"_1m6j2n315 _1fragem121"};function Pw({alt:e="",depth:t,size:n,sizes:r,source:a,src:i,srcSet:o,totalItems:s,overlay:l}){const{merchandiseThumbnail:{background:c="subdued",border:u="full",fit:p="contain",borderWidth:m,borderColor:h="base",shadow:g,badge:{background:f}={}}={}}=$m(),y=Sw(n),_=f&&"base"!==f?"accent":"auto",b=vw(i,function(e){return Ew(e)?e:void 0}(a)),k=g??"extraSmall",P=function(e){switch(e){case"none":return"none";case"base":return"base";case"large":case"large100":return"large";case"large200":return"large-200";default:return}}(m)??ww(y),{className:S}=Um({boxShadow:k}),{className:w}=Um({objectFit:p,borderWidth:P});
2return d("div",{className:v(kw.ProductThumbnail,kw.thumbnailBackgroundVariant[c],kw.productThumbnailSizeVariant[y],S,"none"!==k&&kw.boxShadowMargin,null!=t&&kw.depthVariant[t],kw.borderRadiusVariant[y.startsWith("small")?"small":"base"]),children:[i||Ew(a)?d(fw,{condition:Boolean(b),children:[b,d("img",{src:i??_w(a),srcSet:o,sizes:r,alt:e,loading:"eager",className:v(kw.ProductThumbnailImage,kw.borderVariant[u],kw.borderColorVariant[h],w)})]}):d("div",{className:v(kw.Placeholder,kw.borderVariant[u],kw.borderColorVariant[h],w),children:d(rh,{type:"image",size:Cw(y)})}),void 0!==l&&d("div",{className:v(kw.Overlay,kw.borderVariant[u],kw.borderColorVariant[h]),children:d("strong",{children:l})}),void 0===s?null:d(Iw,{size:y,tone:_,children:s})]})}function Sw(e){if("string"!=typeof e)return"base";const t=e.replace("-100","");return t in bw?t:"base"}function ww(e){return e.startsWith("small")?"base":"large"}function Cw(e){return e.startsWith("small")?"small":e.startsWith("large")?"large":"base"}function Ew(e){return"string"==typeof e||Fa(e)}function xw(e){const{boxSize:t}=bw[Sw(e)];return{blockSize:t,inlineSize:t}}function Iw({children:e,size:t,tone:n}){const r=Ju(),a="accent"===n?n:"auto",{className:i}=Um({borderWidth:ww(t)});return d("div",{className:kw.BadgeWrapper,children:d("div",{className:v(kw.Badge,kw.badgeSizeVariant[t.startsWith("small")?"small":"base"],kw.badgeToneVariant[a],i),children:[d("span",{className:kw.visuallyHidden,children:r("productThumbnailQuantityLabel")}),e]})})}const Aw=function(e){let t=0,r=!0;const o=new Set;return function(){const[l,c]=s(()=>{if(0===t)return 0;const n=performance.now()-t;return n<e?e-n:0}),[u,d]=s(!0),p=i(),[m,h]=s(!1),g=n(()=>{for(const e of o)e(!1)},[]),f=n(()=>{for(const e of o)e(!0)},[]),y=n(()=>{g(),h(!0)},[g]);a(()=>{m&&f()},[m,f]);const v=n(e=>{o.add(d);const n=e.timeStamp-t;c(n)},[]),_=n(n=>{t=n.timeStamp,o.add(d),r&&(r=!1,p.current=setTimeout(y,e))},[y]);return a(()=>(o.add(d),()=>{o.delete(d),p.current&&clearTimeout(p.current)}),[]),{animationEnabled:u,delay:l,onAnimationStart:v,onAnimationIteration:_}}}(4e3);var Tw="var(--_1sg44lm0)",Lw="var(--_1sg44lm1)",Nw="var(--_1sg44lm2)";function Rw({contentDisplay:e="inline",aspectRatio:t,inlineSize:n,blockSize:r,children:i,id:o,delay:l=!0}){const c="inline"===e?"span":"div",{className:u,style:p}=Um({blockSize:r,inlineSize:n},{transforms:{inlineSize:e=>cd(e,{fitContent:!0,auto:!0})}}),[m,h]=s(l);a(()=>{const e=setTimeout(()=>h(!1),100);return()=>{clearTimeout(e)}},[]);const{animationEnabled:g,delay:f,onAnimationStart:y,onAnimationIteration:_}=Aw();return d(c,{className:v("_1sg44lm4 _1sg44lm3 _1fragemvo _1fragem12k _1fragem12f _1fragem12r","inline"===e&&"_1sg44lm7",m&&"_1sg44lm8",g&&"_1sg44lm6",u),style:{...b({[Nw]:t?.toString()??"",[Tw]:`${f}ms`,[Lw]:"4000ms"}),...p},"aria-hidden":"true",onAnimationStart:y,onAnimationIteration:_,id:o,children:d(c,{className:v("_1sg44lma _1sg44lm9 _1fragemvo",u),style:p,children:i})})}const Mw=new Map([["small","10ch"],["base","20ch"],["large","30ch"]]);function Dw({children:e,delay:t,inlineSize:n,id:r,...a}){return d(Vf,{...a,children:d(Rw,{delay:t,inlineSize:Mw.get(n??"small"),id:r,children:e})})}function Ow({width:e}){const{header:{logo:t}}=vv(),{shop:n}=ie(),{width:r,height:a}=function(e,t,n){const r=n??1;let a,i;return e?(a=e,i=e/r):t&&(a=t,i=t/r),void 0!==n&&void 0!==a&&void 0!==i&&i>300&&(a*=300/i,i=300),{width:a,height:i}}(t?.maxWidth,e,t?.aspectRatio);return d("img",{alt:t?.altText||n.name,className:"gP50U",src:t?.image,width:r,height:a})}const zw=f(void 0);function Bw({children:e,style:t,insetsRows:n}){const{rendered:a,rowsInset:i}=h(zw)??{},o=r(()=>({pending:t,pendingInsetsRows:n,rendered:a,rowsInset:i}),[t,n,a,i]);return d(zw.Provider,{value:o,children:e})}function Vw({children:e,rowsInset:t}){const{pending:n}=h(zw)??{},a=r(()=>({pending:void 0,rendered:n,rowsInset:t}),[n,t]);return d(zw.Provider,{value:a,children:e})}function Fw(){return h(zw)??{}}function Uw(){return h(t_)}function qw({currentDetour:e}){return"thankYou"===e?.type?"ORDER_STATUS1":"INFORMATION1"}function jw(e,t,n,r,a){return null==e?()=>!1:Ya(Dl(e.features,t),n,r,a)}const Hw=f([]),$w=f({deactivatedExtensionIds:new Set,addDeactivatedExtension:()=>{}}),Yw=f(null);function Ww(e,t,...[n]){const{checkout:{extensibility:a}}=ie(),i=function(){const{deactivatedExtensionIds:e}=Qw(),{currentPage:t,currentDetour:n}=nc().value,{source:a,checkout:{negotiator:i}}=ie(),o=Uw(),s=i.current.peek();return r(()=>function({page:e,negotiatedState:t,deactivatedExtensionIds:n,detour:r,placementReferences:a,sourceType:i}){const o=e&&Fl(e,t),s=e&&new Set([...Dn,...Rn]),l=r&&Ul(r),c=r&&function(e){const t=a_.get(e.type)??[];return new Set(t)}(r),u="thankYou"===r?.type,d=l??o??new Set,p=c??s??new Set;return t=>{const{id:o,extensionPoint:s,placementReference:l}=t;if(n.has(o))return!1;if(!ja(t,{sourceType:i,isThankYou:u}))return!1;const c=Ha(s.target);if(null==c)return!1;
2if((e||r)&&!d.has(c))return!1;if($a(c)){if(!l)return!1;if(!a.supported.has(l))return!1;if((e||r)&&!p.has(l))return!1}return!0}}({page:t,negotiatedState:s,deactivatedExtensionIds:e,detour:n,placementReferences:o,sourceType:a.type}),[n,t,e,s,o,a.type])}(),o=h(Yw),s=Uw();return r(()=>{const r=$a(t)&&n?{target:t,placements:s,placementReference:n}:{target:t};return e.filter(e=>null===o||o.has(it(e.extensionPoint.target))).filter(e=>a.ui.unstable_isTargetMatch(e,r)).filter(i)},[i,o,e,t,n,s,a])}function Gw(e,...[t]){const{checkout:{extensibility:n},shop:a}=ie(),o=a.hasFlagEnabled(Wa),s=Uw(),l=i([]),c=h(Hw),u=Ww([...n.ui.search().value,...c],e,t),d=r(()=>{if(o)return n.customFields.search($a(e)&&t?{target:e,placements:s,placementReference:t}:{target:e})},[n,o,e,t,s]),p=d?.value,m=r(()=>(p??[]).map(e=>Ga("customField",e)),[p]),g=r(()=>Ja([...u.map(e=>Ga("uiExtension",e)),...m]),[u,m]);return n.ui.enabled.value?g.length>0?g:l.current:m.length>0?m:l.current}function Jw(e,t){const r=Zw();return n(n=>{if(!e.length)return Promise.resolve(void 0);const a=r.get(e[0],t);return Promise.resolve(a.run(n))},[r,e,t])}function Kw(e,t){const{checkout:{extensibility:n}}=ie(),a=i([]),o=Ww([...t,...h(Hw)],e),s=r(()=>o.map(e=>Ga("uiExtension",e)),[o]);return n.ui.required.value&&!n.ui.enabled.value?a.current:s}function Qw(){return h($w)}const Xw=f({get:()=>{},findAll:()=>[],blockingExtensions:k(()=>[])});function Zw(){return h(Xw)}function eC({visibleTargets:e,children:t}){const n=r(()=>new Set(e),[e]);return d(Yw.Provider,{value:n,children:t})}function tC(e){return Array.from(e.labels||[]).map(e=>e.textContent).join("")}function nC(e){return e instanceof HTMLInputElement&&("checkbox"===e.type||"radio"===e.type)?e.checked.toString():e.value}function rC(e){if(e.target instanceof HTMLInputElement||e.target instanceof HTMLSelectElement){try{if(e.target.closest("*:-webkit-autofill")===e.target)return"native"}catch{}if(!e.isTrusted)return e.target?.id?.startsWith("autofill_")?"honeypot":"other"}}const aC={screenX:0,screenY:0,pageX:0,pageY:0,offsetX:0,offsetY:0,movementX:0,movementY:0,clientX:0,clientY:0},iC=Object.keys(aC),oC=f(null);function sC(){const e=h(oC);return n(t=>n=>{if(n&&e)if(n instanceof HTMLAnchorElement||n instanceof HTMLButtonElement)e.set(n,t);else if(n instanceof Element){const r=n.querySelector("button, a");e.set(r??n,t)}},[e])}function lC({section:e,children:t}){if("undefined"==typeof window)return d("div",{children:t});const n=Og(),a=i(null),o=r(()=>new WeakMap,[]),s=i(null);function l(t){const r=t.target.closest("a, button, input, select");if(!r)return;if(s.current===r)return;s.current=r;const{element:a,shouldCaptureEvent:i}=cC(r,e,o);i&&n("dom_input_focused",{element:a,timestamp:new Date})}return Bg(a,e=>l({target:e})),d(oC.Provider,{value:o,children:d("div",{ref:a,onFocusCapture:l,onBlurCapture:function(t){const r=t.target.closest("a, button, input, select");if(!r)return;s.current===r&&(s.current=null);const{element:a,shouldCaptureEvent:i}=cC(r,e,o);i&&n("dom_input_blurred",{element:a,timestamp:new Date})},onClickCapture:function(t){const r=t.target;if(!(r instanceof Element))return;const a=r.closest("a, button"),i=r.closest("input, select"),s=a??i;if(!(s||r instanceof HTMLElement))return;const{element:l,shouldCaptureEvent:c}=cC(s??r,e,o);c&&n("dom_clicked",{element:l,...aC,...st(t.nativeEvent,iC),timestamp:new Date})},onChangeCapture:function(t){const r=t.target?.closest("a, button, input, select");if(!r)return;const{element:a,shouldCaptureEvent:i}=cC(r,e,o);i&&n("dom_input_changed",{element:a,timestamp:new Date})},children:t})})}function cC(e,t,n){const r=e instanceof HTMLAnchorElement||e instanceof HTMLButtonElement||e instanceof HTMLInputElement||e instanceof HTMLSelectElement;let a=null;a=r?e.type:null;let i=`${t}_`,o=null,s=null;r&&"href"in e&&(s=e.href);let l=!0;if(e instanceof HTMLInputElement&&"radio"===e.type)i+=e.name.replace(/[A-Z]/g,(e,t)=>`${0===t?"":"_"}${e.toLowerCase()}`),o=e.id.split("-").slice(-1)[0].toLowerCase();else if(e instanceof HTMLInputElement||e instanceof HTMLSelectElement)i+=e.name.replace(/[A-Z]/g,(e,t)=>`${0===t?"":"_"}${e.toLowerCase()}`),o=nC(e);
2else{const t=uC(e,n);t?i+=t:l=!1}return i=i.replace(/-/g,"_"),{element:{id:i,tagName:e.tagName,type:a,value:o,...s&&{href:s},name:null},shouldCaptureEvent:l}}function uC(e,t){if(null!==e&&null!==t)return t.has(e)?t.get(e):uC(e.parentElement,t)}function dC({section:e,children:t}){if("undefined"==typeof window)return d("div",{children:t});const{checkout:{identity:n},router:r,shopPay:a}=ie(),o=r.currentUrl.value,{currentFocus:s}=nc().value,l=Og(),c=Zg(),u=Vg(),p=i(null),m=i(new WeakMap),h=at(o,{isShopPayActive:"shopPay"===n.current.value,shopPay:a});function g(t,{recoveredAutofocus:n=!1}={}){const r=s.peek();s.value=e,!n&&(t.target instanceof HTMLInputElement||t.target instanceof HTMLSelectElement)&&m.current.set(t.target,nC(t.target)),!n&&t.target instanceof HTMLInputElement&&"email"!==t.target.name&&u(h),r!==e&&(l("sectionInteraction",{section:e,timestamp:new Date}),c({type:"section_interaction",section:e}))}return Bg(p,e=>g({target:e},{recoveredAutofocus:!0})),d("div",{ref:p,onFocusCapture:g,onBlurCapture:function(t){if(t.target instanceof HTMLInputElement||t.target instanceof HTMLSelectElement){const n=m.current.get(t.target),r=nC(t.target);m.current.delete(t.target),u(h),n!==r&&function(t){const{name:n,tagName:r,type:a}=t,i=tC(t);l("change",{element:{...i&&{label:i},...n&&{name:n},tagName:r,type:a,value:nC(t)},section:e,timestamp:new Date})}(t.target)}},onClickCapture:function(t){if(!(t.target instanceof Element))return;const n=t.target.closest("a, button"),r=t.target.closest("input, select");if((n??r)&&n){const{tagName:t,textContent:r,id:a}=n,i=(r??"").trim(),o=n.dataset.eventName||i||a;u(h),l("click",{element:{tagName:t,textContent:o??void 0},section:e,timestamp:new Date})}},onKeyUpCapture:function(e){e.target instanceof HTMLInputElement&&u(h)},onChangeCapture:function(t){if(t.target instanceof HTMLInputElement||t.target instanceof HTMLSelectElement){const{id:n,name:r,tagName:a,type:i}=t.target;let o=tC(t.target);0===o.length&&(o=n);const s=rC(t);s&&l("autofill",{source:s,element:{...o&&{label:o},...r&&{name:r},tagName:a,type:i,value:nC(t.target)},timestamp:new Date,section:e})}},children:t})}function pC(e,t){const n=ie().checkout.configuration.layout.isOnePage.value,r=Gw("Checkout::Dynamic::Render","ORDER_SUMMARY1"),a=Gw("Checkout::Dynamic::Render","ORDER_SUMMARY2"),i=Gw("Checkout::Dynamic::Render","ORDER_SUMMARY3"),o=Gw("Checkout::Dynamic::Render","ORDER_SUMMARY4"),s=Gw("Checkout::CartLines::RenderAfter"),l=Gw("Checkout::CartLineDetails::RenderAfter"),c=Gw("Checkout::Reductions::RenderBefore"),u=Gw("Checkout::Reductions::RenderAfter");return n?"bottom"===e?t?.hideMerchandiseLines?[...i]:[...r,...a,...i,...l,...s]:[...l]:[...r,...a,...i,...o,...l,...s,...c,...u]}const mC="checkout-main",hC="checkout-main-header",gC="checkout-pay-button",fC="checkout-review-heading",yC=re("OrderSummaryContext");function vC(){return ae(yC)}const _C=({children:e})=>{const t=m(!1),a=n(e=>{t.value=e},[t]),i=r(()=>({open:t,setOpen:a}),[t,a]);return d(yC.Provider,{value:i,children:e})};function bC(){const{checkout:e,router:n}=ie();return t(()=>e.thankYouEntrance.isRevealing.value&&n.currentUrlMatches("/thank-you"))}const kC={Shell:"cm5pp","Config-Footer-positionInline":"FeQiM","Config-Footer-positionEnd":"BwmDa","Shell-layoutAside":"g9PS6","Config-Main-inlineSizeFill":"_46J2H","Config-OrderSummary-inlineSizeFill":"XlQtV","Config-Header-positionStart":"U3Rye","Config-Header-positionInline":"_5ZebG","Config-Header-positionInlineSecondary":"PqnoL","Header-divided":"d5pfT","Shell-variantOnePageCheckout":"oYrwu",MainContent:"gdtca",MainContentPrimary:"djSdi",Footer:"NGRNe","Shell-blockSizeAppLayout":"u5Gkx","Shell-minMobileViewportSize":"KIB4Y","Shell-embeddedUc":"bU4kN","Shell-embeddedUcMainPadding":"ENVeW","Shell-embeddedUcHasOrderSummary4Extensions":"_73ZDy",Banner:"_1Eo4p",Announcement:"_5gERx","Announcement-openTransitionEntered":"_0FhCb","Announcement-opened":"bMbg6",AnnouncementContainer:"mpQwN",AnnouncementContent:"gYnYi","Announcement-expanded":"yJIUK",AnnouncementActionButtons:"uB1DX",AnnouncementExpandCollapseButton:"Lhk39",AnnouncementCloseButton:"GxFSO",AnnouncementOverlay:"eqp7i","Announcement-hasOverflow":"X3qgz","Announcement-hasActiveInspector":"rZH98",Header:"EAjaz","Shell-hasAnnouncement":"_96Hty","Shell-announcementOpen":"ck07C","Header-positionStart":"_8wrz5",HeaderContent:"i8Dpn","Header-containerContent":"ObllD","Header-positionInline":"Xx7bI","Header-positionInlineSecondary":"oZoJd","Shell-exiting":"aLUb3","Header-thankYouCovered":"Gm2ml","Header-hasBackgroun
2dImage":"zKcpW",BuyerJourney:"lX75M",BuyerJourneyContent:"_0DLUq","BuyerJourney-containerContent":"hKv1l",Disclosure:"nMPKH",DisclosureButton:"WtpiW",DisclosureDetails:"ks0CH",DisclosureDetailsContent:"GRdxR","Disclosure-divided":"iYA3J",Content:"Sxi8I","Content-containerContent":"vzM2m",Main:"_9F1Rf","Main-inlineSizeFill":"DGMLl","Main-divided":"GI5Fn","slide-from-left":"Fv5RP","slide-from-right":"dQ3Wi",OrderSummary:"i4DWM",OrderSummaryContent:"_4QenE","OrderSummary-inlineSizeFill":"LEmIb",FooterContent:"QiTI2","Footer-positionEnd":"fw2Yt","Footer-containerContent":"dmTNG","Footer-divided":"GTe1e"},PC="announcement_box",SC="announcement_content";function wC({children:e,onClose:t,onAfterCollapse:r,onAfterExpand:o,onExpand:l,onCollapse:c,open:u=!1,expanded:p=!1}){const{i18n:m}=ie(),[h,g]=s(!1),f=i(null),y=i(null),_=Ed(p,"base"),b=Ed(u,"base");a(()=>{if("undefined"==typeof window||!window.ResizeObserver||!window.MutationObserver)return;const e=y.current;if(!e)return;const t=()=>{p||"exited"!==_||g(e.scrollHeight>e.clientHeight)};t();const n=Xa(t,200),r=new ResizeObserver(n);r.observe(e);const a=new MutationObserver(n);return a.observe(e,{childList:!0,subtree:!0,characterData:!0}),()=>{r.disconnect(),a.disconnect()}},[e,p,u,_]);const k=n(()=>{p?c?.():l?.()},[p,c,l]);a(()=>{"entered"===_?o?.():"exited"===_&&r?.()},[o,r,_]);const P=EC(),{environment:{isCheckoutEditor:S},announcement:{colorScheme:w}}=vv(),C=P[0],E=S?C?.publicIdentifier:void 0,x=S&&P.length>0;return mw(e)?d("section",{id:PC,className:v(kC.Announcement,u&&kC["Announcement-opened"],h&&kC["Announcement-hasOverflow"],p&&kC["Announcement-expanded"],kC[H("Announcement-expandedTransition",_)],kC[H("Announcement-openTransition",b)],x&&kC["Announcement-hasActiveInspector"]),ref:f,children:d("div",{className:v(kC.AnnouncementContainer,Se({colorLayer:"base",colorScheme:w,backgroundColor:"baseSpecified"})),"data-inspector-id":E,"data-inspector-box":E?"content":void 0,children:[!p&&d("button",{className:kC.AnnouncementOverlay,onClick:e=>{e.preventDefault(),e.stopPropagation(),l?.()},"aria-label":m.translate("thank_you.announcement.expand"),"aria-expanded":!1,"aria-controls":SC,type:"button"}),d("div",{className:kC.AnnouncementActionButtons,children:[d("button",{id:"announcement_action_expand_collapse_buttons",className:kC.AnnouncementExpandCollapseButton,onClick:k,"aria-label":p?m.translate("thank_you.announcement.collapse"):m.translate("thank_you.announcement.expand"),"aria-expanded":p,"aria-controls":SC,type:"button",children:d(rh,{type:p?"chevron-up":"chevron-down",size:"base"})}),d("button",{className:kC.AnnouncementCloseButton,onClick:()=>t?.({source:"host"}),"aria-controls":PC,"aria-expanded":u,"aria-label":m.translate("thank_you.announcement.close"),type:"button",children:d(rh,{type:"x",size:"base"})})]}),d("div",{id:SC,className:kC.AnnouncementContent,ref:y,"aria-live":"polite","aria-atomic":"true",children:e})]})}):null}function CC(){}function EC(){const{environment:{hasTYPAnnouncementExtensions:e}}=vv(),t=function(e){return void 0!==e?()=>[]:()=>{const e=Gw("purchase.thank-you.announcement.render");return Za(e,"uiExtension").map(ei)}}(e);return t()}const xC={ThankYouInterstitialShell:"szW4X",ThankYouInterstitialOverlay:"sMSRq",ThankYouInterstitialHeader:"_3Ebqn",ThankYouEntranceDisclosure:"F6Nrx",ThankYouEntranceOrderSummary:"j1xD4",ThankYouEntranceFooter:"RDtb7",ThankYouEntrance:"ZXaI9",ThankYouEntranceStatus:"sEWAT",ThankYouEntranceHeading:"DTABr",ThankYouEntranceCards:"kBVzA",ThankYouEntranceActions:"qgQOk",ThankYouEntranceBeat:"SBffw"},IC={none:"0",...ye.spacing},AC={base:"solid",dashed:"dashed",dotted:"dotted"},TC="disclosure_details";function LC({banner:e,announcement:t,header:r,buyerJourney:i,disclosure:o,disclosureOrderSummary:l,footer:c,main:u,orderSummary:p,blockSize:m,minMobileViewportSize:h=!1,disclosureId:g=TC,isDisclosureInteractive:f=!0,mainContentId:y=mC}){const _=vv(),{checkout:{configuration:b,checkoutExit:k},embed:P,router:S}=ie(),w=b.visibility.showAside,C=Boolean(P?.isFlagshipPartner),E=yr(P?.embedder),x=E&&b.isUniversalCheckoutFinalizer&&"/thank-you"===S.currentUrl.value.normalizedPath,I=Gw("Checkout::Dynamic::Render","ORDER_SUMMARY4").length>0,A=E&&I,T=C&&!1===_.header.divided,L=_.header.position??"inline",N=QC(),R=bC(),{open:M,expanded:D,onAfterCollapse:O,onAfterExpand:z,onClose:B,onExpand:V,onCollapse:F}=function(){const e=vv(),t=yv(),r=x_(),i=function(){const{environment:{hasTYPAnnouncementExtensions:e}}=vv();return function(e){return void 0!==e?()=>CC:()=>{const e=EC(),t=Og();if(0===e.length)return CC;const n=e[0];return e=>t?.("extensionUiInteraction",{interaction:e,section:"extension",timestamp:new Date,extension:n,componentType:"Announcement",componentInstanceId:n.id})}}(e)()}(),[o,l]=s(!1),[c,u]=s(!1),d=n(({source:e}={})=>{const{announcement:n}=t.configuration;
2"dismissed"!==n.visibility&&"hidden"!==n.visibility&&(i("host"===e?"announcementDismissedFromHost":"announcementDismissedFromExtension"),r.emit("announcementClosed"),t.set("announcement",{...t.configuration.announcement,visibility:"dismissed"}))},[t,r,i]),p=n(()=>{r.emit("announcementAfterCollapsed")},[r]),m=n(()=>{r.emit("announcementAfterExpanded")},[r]),h=n(()=>{l(!0),i("announcementExpanded"),r.emit("announcementExpanded")},[i,r]),g=n(()=>{l(!1),i("announcementCollapsed"),r.emit("announcementCollapsed")},[i,r]);return a(()=>(r.on("closeAnnouncement",d),()=>{r.off("closeAnnouncement",d)}),[d,r]),a(()=>{if("visible"!==e.announcement.visibility)return void u(!1);const t=setTimeout(()=>{u(!0)},1e3);return()=>clearTimeout(t)},[e.announcement.visibility]),{open:c,expanded:o,onAfterCollapse:p,onAfterExpand:m,onClose:d,onExpand:h,onCollapse:g}}(),U=l?d(Bw,{style:_.orderSummary.section,children:l}):void 0;return d("div",{className:v(kC.Shell,xC.ThankYouInterstitialShell,k.isExiting.value&&kC["Shell-exiting"],w&&kC["Shell-layoutAside"],"fill"===_.main.inlineSize&&kC["Config-Main-inlineSizeFill"],"fill"===_.orderSummary.inlineSize&&kC["Config-OrderSummary-inlineSizeFill"],kC[H("Config-Header-position",L)],_.footer.position&&kC[H("Config-Footer-position",_.footer.position)],_.environment.isOnePageCheckout&&kC["Shell-variantOnePageCheckout"],E&&kC["Shell-embeddedUc"],x&&kC["Shell-embeddedUcMainPadding"],A&&kC["Shell-embeddedUcHasOrderSummary4Extensions"],m&&kC[H("Shell-blockSize",m)],h&&kC["Shell-minMobileViewportSize"],mw(t)&&kC["Shell-hasAnnouncement"],M&&kC["Shell-announcementOpen"]),style:{...qC("content",_.content),...HC("content",_.content),...$C("main",_.main),...YC("main",_.main),...$C("order-summary",_.orderSummary),...YC("order-summary",_.orderSummary),...WC("order-summary",_.orderSummary),...$C("header",_.header),...WC("header",{backgroundImage:_.header.banner?.image}),...YC("header",_.header),...T?XC:{},...$C("footer",_.footer),...YC("footer",_.footer),...GC("footer",_.footer),...$C("buyer-journey",_.buyerJourney),...YC("buyer-journey",_.buyerJourney),...$C("announcement",_.announcement)},children:[d(NC,{}),e?d("div",{className:kC.Banner,children:e}):null,t?d(wC,{open:M,expanded:D,onAfterExpand:z,onAfterCollapse:O,onClose:B,onExpand:V,onCollapse:F,children:t}):null,d(RC,{position:"start",children:[r,"header"===_.buyerJourney.position&&d(MC,{children:i})]}),d(DC,{id:g,isInteractive:f,details:U,children:o}),d(OC,{children:[d(BC,{children:[d(RC,{position:"inline",children:[r,"header"===_.buyerJourney.position&&d(MC,{children:i})]}),d(zC,{children:["inline"===_.buyerJourney.position&&d(MC,{children:i}),d(Bw,{style:_.main.section,children:d("main",{className:v(kC.MainContentPrimary,N&&"F3Ebx"),id:y,children:u})}),"inline"===_.footer.position&&d(FC,{children:c})]})]}),d(VC,{children:[d(RC,{position:"inlineSecondary",children:[r,"header"===_.buyerJourney.position&&d(MC,{children:i})]}),d(zC,{children:d(Bw,{style:_.orderSummary.section,children:d("aside",{className:v(kC.OrderSummaryContentPrimary,N&&"OcTba",R.value&&xC.ThankYouEntranceOrderSummary),children:d(dC,{section:"summary",children:d(lC,{section:"summary",children:p})})})})})]})]}),"end"===_.footer.position&&d(FC,{children:c})]})}function NC(){const{checkout:e}=ie(),{main:{colorScheme:t="scheme1",background:n}={}}=vv();return e.checkoutExit.isExiting.value?d("div",{className:v("Vytfl",Se({colorLayer:"base",colorScheme:t,backgroundColor:"subdued"===n?"subdued":"baseSpecified"})),"aria-hidden":"true"}):null}function RC({children:e,position:n}){const{header:{position:r="inline",container:a="fill",colorScheme:i,banner:o,background:s,divided:l}={}}=vv(),c=n??r,u=function(){const{checkout:e,client:n,router:r}=ie(),a=$h(),i=gf(),o=Vl(n.initialRequest.url.pathname).endsWith("/thank-you"),s=a&&!i&&!o;return t(()=>s&&"settled"!==e.thankYouEntrance.phase.value&&r.currentUrlMatches("/thank-you"))}(),p=QC();if(!mw(e))return null;const m=l??"start"===c;return d("header",{className:v(kC.Header,xC.ThankYouInterstitialHeader,kC[H("Header-position",c)],kC[H("Header-container",a)],m&&kC["Header-divided"],o?.image&&kC["Header-hasBackgroun
2dImage"],u.value&&kC["Header-thankYouCovered"],p&&"inlineSecondary"===c&&"LRXpG","start"===c&&Se({backgroundColor:"subdued"===s?"subdued":"baseSpecified",colorLayer:"base",colorScheme:i})),"data-inspector-id":"header",children:d("div",{className:kC.HeaderContent,children:d(yu,{children:d(dC,{section:"header",children:d(lC,{section:"header",children:e})})})})})}function MC({children:e}){const{buyerJourney:{position:t="inline",container:n="fill",visibility:r}={}}=vv();return mw(e)&&"hidden"!==r?d("div",{className:v(kC.BuyerJourney,kC[H("BuyerJourney-position",t)],kC[H("BuyerJourney-container",n)]),children:d("div",{className:kC.BuyerJourneyContent,children:e})}):null}function DC({children:e,details:n,id:r=TC,isInteractive:o}){const{header:{divided:l},orderSummary:{background:c,backgroundImage:u,colorScheme:p}={},main:{colorScheme:m="scheme1"},environment:{isCheckoutEditor:h},disclosure:{visibility:g}}=vv(),f=Tt(),y=bC(),{checkout:_}=ie(),b=l??!0,k=function(){const{environment:{hasOrderSummaryExtensions:e}}=vv(),t=function(e){return void 0!==e?()=>e:()=>pC("top").length>0}(e);return t()}(),{expanded:P,narrowedToInformationStep:S}=function(){const{environment:{shouldExpandOrderSummary:e}}=vv(),n=function(e,n){return void 0!==n?()=>({expanded:n,narrowedToInformationStep:!1}):()=>{const n=function(){const e=T(pC("top"));return t(()=>e.value.some(e=>{if("customField"===e.kind)return ei(e).required.value;const t=ei(e),n=t.behaviors.value;return n.blockProgress&&t.capabilities.blockProgress||n.alwaysReveal}))}(),r=function(){const{orderSummary:{defaultState:e}={}}=vv(),{checkout:{configuration:{layout:{isOnePage:t}}}}=ie();return!t.value&&"EXPANDED"===e}(),a=function(){const e=nc();return t(()=>{const{currentPage:t,currentDetour:n}=e.value;if(!n&&t)return"information"===t.id})}();return e&&r&&!n.value&&void 0!==a.value?{expanded:a.value,narrowedToInformationStep:!0}:{expanded:n.value||r,narrowedToInformationStep:!1}}}(function(){const{client:e}=ie(),t=e.unstable_getSerialization("experiments"),n=t?.find(e=>e.clientHandle===Ka)?.variant;return Object.values(Qa).find(e=>e===n)}()===Qa.Treatment,e);return n()}(),{open:w,setOpen:C}=vC(),E=w.value||k&&h,[x,I]=s(),A=i(!1);a(()=>{I(A.current&&!P?"none":void 0),C(P)},[P,C]),a(()=>{A.current=S}),a(()=>{E&&C(!0)},[E,k,C]);const L=KC();if(!mw(e)||_.checkoutExit.isExiting.value||"hidden"===g||"hidden-only-checkout"===g&&!L)return null;const N=u?{backgroundImage:`url(${JSON.stringify(u)})`}:void 0,R=!o||w.value,M=Boolean(n)&&(f.value||R);return d("aside",{className:v(kC.Disclosure,b&&kC["Disclosure-divided"],Se({colorLayer:"base",colorScheme:m,backgroundColor:"baseSpecified"})),"data-inspector-id":"orderSummary",children:d(dC,{section:"top_summary",children:d(lC,{section:"top_summary",children:[o?d(Wm,{className:v(kC.DisclosureButton,y.value&&xC.ThankYouEntranceDisclosure),background:"transparent",onClick:()=>{I(void 0),C(!w.peek())},"aria-controls":r,"aria-expanded":R,inlineSize:"100%","data-event-name":R?"order_summary_hide":"order_summary_show",children:e}):d("div",{className:v(kC.DisclosureButton,y.value&&xC.ThankYouEntranceDisclosure),children:e}),M&&d(Id,{open:R,id:r,duration:x,children:d("div",{className:v(kC.DisclosureDetails,y.value&&xC.ThankYouEntranceDisclosure,Se({colorLayer:"base",colorScheme:p,backgroundColor:"subdued"===c?"subdued":"baseSpecified"})),style:N,children:d("div",{className:kC.DisclosureDetailsContent,children:d(yu,{children:d(JC,{children:n})})})})})]})})})}function OC({children:e}){const{content:{container:t="fill"}={}}=vv();return mw(e)?d("div",{className:v(kC.Content,kC[H("Content-container",t)]),children:e}):null}function zC({children:e}){const{checkout:t}=ie();return t.checkoutExit.isExiting.value?null:d(y,{children:e})}function BC({children:e}){const{main:{colorScheme:t="scheme1",inlineSize:n,background:a,backgroundImage:i}={},content:{divider:{visibility:o}={}}}=vv(),{client:s}=ie(),l=s.unstable_getSerialization("shop").enabledFlags.includes(ti),c=r(()=>({current:t}),[t]);if(!mw(e))return null;const u=i?{backgroundImage:`url(${JSON.stringify(i)})`}:void 0;return d("div",{className:v(kC.Main,"fill"===n&&kC["Main-inlineSizeFill"],("visible"===o||
2!l&&void 0===o)&&kC["Main-divided"],Se({colorLayer:"base",colorScheme:t,backgroundColor:"subdued"===a?"subdued":"baseSpecified"})),style:u,children:d("div",{className:kC.MainContent,children:d($p.Provider,{value:c,children:d(yu,{children:e})})})})}function VC({children:e}){const{orderSummary:{colorScheme:t="scheme2",inlineSize:n,background:a,backgroundImage:i}={}}=vv(),o=r(()=>({current:t}),[t]),s=QC();if(!mw(e))return null;const l=i?{backgroundImage:`url(${JSON.stringify(i)})`}:void 0;return d("div",{className:v(kC.OrderSummary,"fill"===n&&kC["OrderSummary-inlineSizeFill"],s&&"LCUka",Se({colorLayer:"base",colorScheme:t,backgroundColor:"subdued"===a?"subdued":"baseSpecified"})),style:l,"data-inspector-id":"orderSummary",children:d("div",{className:kC.OrderSummaryContent,children:d($p.Provider,{value:o,children:d(yu,{children:e})})})})}function FC({children:e}){const{footer:{position:t="inline",container:n="fill",colorScheme:r,background:a,divided:i}={}}=vv(),{checkout:o}=ie(),s=QC(),l=bC();if(o.checkoutExit.isExiting.value||!mw(e))return null;const c=i??"end"===t;return d("footer",{className:v(kC.Footer,kC[H("Footer-position",t)],kC[H("Footer-container",n)],c&&kC["Footer-divided"],s&&"qdIKq","end"===t&&Se({colorLayer:"base",colorScheme:r,backgroundColor:"subdued"===a?"subdued":"baseSpecified"})),"data-inspector-id":"footer",children:d("div",{className:v(kC.FooterContent,l.value&&xC.ThankYouEntranceFooter),children:d(yu,{children:d(lC,{section:"footer",children:e})})})})}function UC(e){return t=>t?e[t]:void 0}function qC(e,{divider:{borderStyle:t}={}}={}){return t&&{[`--config-${e}-divider-border-style`]:UC(AC)(t)}}const jC={none:"0px",...ye.borderWidth};function HC(e,{divider:{borderWidth:t}={}}={}){return t&&{[`--config-${e}-divider-border-width`]:UC(jC)(t)}}function $C(e,{inlineSize:t}={}){return isNaN(Number(t))||0===Number(t)?"main"!==e&&"order-summary"!==e&&"fill"===t?{[`--config-${e}-inline-size`]:"100%"}:void 0:{[`--config-${e}-inline-size`]:ke(Number(t))}}function YC(e,{padding:t}={}){if(Array.isArray(t)){const n=2===t.length?[t[0],t[1],t[0],t[1]]:t;return{[`--config-${e}-padding-block-start`]:UC(IC)(n[0]),[`--config-${e}-padding-inline-end`]:UC(IC)(n[1]),[`--config-${e}-padding-block-end`]:UC(IC)(n[2]),[`--config-${e}-padding-inline-start`]:UC(IC)(n[3]),[`--config-${e}-padding`]:`var(--config-${e}-padding-block-start) var(--config-${e}-padding-inline-end) var(--config-${e}-padding-block-end) var(--config-${e}-padding-inline-start)`}}return t&&{[`--config-${e}-padding-block-start`]:UC(IC)(t),[`--config-${e}-padding-inline-end`]:UC(IC)(t),[`--config-${e}-padding-block-end`]:UC(IC)(t),[`--config-${e}-padding-inline-start`]:UC(IC)(t),[`--config-${e}-padding`]:UC(IC)(t)}}function WC(e,{backgroundImage:t}={}){return t&&{[`--config-${e}-background-image`]:`url(${JSON.stringify(t)})`}}function GC(e,{marginBlockStart:t}={}){return t&&{[`--config-${e}-margin-block-start`]:UC(IC)(t)}}function JC({children:e}){const{environment:{isOnePageCheckout:t}}=vv(),n=KC();return t&&!n?d(eC,{visibleTargets:["purchase.checkout.cart-line-item.render-after","purchase.checkout.reductions.render-before","purchase.checkout.reductions.render-after"],children:e}):d(y,{children:e})}function KC(){const{environment:{hasDetour:e}}=vv(),t=function(e){return void 0!==e?()=>e:()=>{const{currentDetour:e}=nc().value;return Boolean(e)}}(e);return t()}function QC(){const e=$h(),t=KC();return e&&!t}const XC={"--x-shell-header-padding":`${UC(IC)("large100")} ${UC(IC)("large200")} ${UC(IC)("none")} ${UC(IC)("large200")}`,"--x-shell-main-padding-block-start":`var(--config-main-padding-block-start, ${UC(IC)("large100")})`,"--x-shell-main-padding":`var(--config-main-padding-block-start, ${UC(IC)("large100")}) var(--config-main-padding-inline-end, ${UC(IC)("large200")}) var(--config-main-padding-block-end, ${UC(IC)("large200")}) var(--config-main-padding-inline-start, ${UC(IC)("large200")})`},ZC={small:"10ch",base:"20ch",large:"30ch",full:"100%"},eE=jc("wallet-transition-disclosure-"),tE=jc("wallet-transition-main-content-");function nE({layer:e="foreground"}={}){const{embed:t,i18n:n}=ie(),r=!t,a=Hc(void 0,eE),i=Hc(void 0,tE),o=d("div",{className:"A5qhV "+("background"===e?"_4KRKW":""),role:"status","aria-label":n.translate("general.loading"),style:b({[ye.global.borderRadius]:"12px"}),children:d(_C,{children:d(LC,{mainContentId:i,disclosureId:a,isDisclosureInteractive:!1,header:r?d(rE,{}):void 0,disclosure:d(lE,{}),main:d(sE,{}),orderSummary:d(cE,{})})})});return d(eu,{children:o})}function rE(){const{header:{alignment:e="start",logo:t}={}}=vv(),{shop:n}=ie(),r=t?.image?d(Ow,{width:t.maxWidth}):d(IS,{level:1,accessibilityRole:"presentation",display:"inline",children:n.name});
2return d(Qm,{gridTemplateColumns:"1fr",inlineSize:"100%",justifyItems:e,children:r})}function aE({inlineSize:e="base",size:t="small"}){return d(Dw,{size:t,inlineSize:e})}function iE(){return d(Vf,{type:"small",children:d(Rw,{inlineSize:ZC.full})})}function oE(){return d(Jf,{rowGap:"base",children:[d(aE,{size:"large",inlineSize:"small"}),d(Jf,{rowGap:"small-300",children:[d(iE,{}),d(iE,{})]})]})}function sE(){return d(Jf,{rowGap:"large-200",children:[d(oE,{}),d(gw,{}),d(oE,{}),d(gw,{}),d(oE,{})]})}function lE(){return d(Jf,{direction:"inline",justifyContent:"space-between",alignItems:"center",padding:"large-100 base",minBlockSize:"63px",inlineSize:"100%",children:[d(aE,{inlineSize:"base"}),d(aE,{size:"large",inlineSize:"small"})]})}function cE(){const{i18n:e}=ie(),{merchandiseThumbnail:t,global:n}=$m(),r=t.cornerRadius??n.cornerRadius??"base",a="fullyRounded"===r?"large":r,i=`${xw("base").inlineSize}px`;return d(Jf,{rowGap:"large-200",children:[d(Vf,{accessibilityVisibility:"exclusive",children:e.translate("order_summary.shopping_cart_label")}),d(Qm,{gridTemplateColumns:"auto minmax(0, 1fr) auto",gap:"base",alignItems:"center",children:[d(Nf,{borderRadius:a,overflow:"hidden",children:d(Rw,{contentDisplay:"block",inlineSize:i,aspectRatio:1})}),d(Jf,{rowGap:"small-500",children:[d(aE,{inlineSize:"base"}),d(aE,{inlineSize:"small"})]}),d(aE,{inlineSize:"small"})]}),d(uE,{})]})}function uE(){return d(Jf,{rowGap:"small-100",children:[[0,1,2].map(e=>d(Jf,{direction:"inline",justifyContent:"space-between",children:[d(aE,{inlineSize:"small"}),d(aE,{inlineSize:"small"})]},e)),d(Jf,{direction:"inline",justifyContent:"space-between",children:[d(aE,{size:"large",inlineSize:"small"}),d(aE,{size:"large",inlineSize:"small"})]})]})}function dE(){const{shop:e,checkout:n,observability:r}=ie(),o=function(){const{checkout:{wallets:e}}=ie(),n=function(){const{shop:e,checkout:n}=ie(),r=e.hasFlagEnabled(fn),{inMemoryApplePayParts:{subscriptionReviewTransition:a}}=gn();return t(()=>void 0!==a.value&&Hl({applePayThreePageVaultedReviewEnabled:r,isOnePageCheckout:n.configuration.layout.isOnePage.value}))}();return t(()=>{const t=void 0!==e.activeSession.value?.wallet&&"APPLE_PAY"!==e.activeSession.value.wallet&&Boolean(e.isDeceleratingSignal?.value);return n.value&&!t})}().value,s=Boolean(n.wallets.isDeceleratingSignal?.value),l=n.isCheckoutLayoutForcedToOnePage.value,c=CS(),{payNowButtonElement:u,payNowButtonSectionMounted:p}=BP(),m=Boolean(u||c&&p),h=e.hasFlagEnabled(_a),g=n.wallets.escalatedWallet.value,f=h?s&&m&&null!==g:s&&m;a(()=>{f&&n.wallets.setIsDecelerating(!1)},[f,n.wallets]);const y=i(!1);return a(()=>{if(!l)return void(y.current=!1);if(!m||y.current)return;y.current=!0;const e={wallet:g};r.counter({name:"wallet_3page_vaulted_review_landed",value:1,attributes:e}),r.log("wallet_3page_vaulted_review_landed","Buyer reached the forced one-page wallet vaulted review",e)},[g,l,m,r]),o||!s?null:d(nE,{})}const pE=w({suspenseName:"review-block",id:()=>"ReviewBlock",displayName:"ReviewBlock",load:()=>C(()=>ul(()=>import("./9d12dea3.Djhip2gO.js"),__vite__mapDeps([82,2,1,3,4,5,83,23,24,25,84,62,11,63,45,46,44,47,28,29,85,86,87,88,89,8,90,91,92,93,94,95,96,97,98,31,32,99,100,101,102,103,7,9,10])))}),mE=w({suspenseName:"information",displayName:"Information",load:()=>C(()=>ul(()=>import("./17324a0b.BoE8MWGh.js"),__vite__mapDeps([104,2,62,84,1,3,4,5,11,63,45,46,44,24,47,28,29,23,25,85,86,105,106,107,108,109,110,43,111,88,112,113,114,115,116,65,71,117,48,118,119,120,97,121,122,123,9,124,125,126,127,128,129,130,131,103,7,8,10])))}),hE=w({displayName:"NoAddressLocation",load:()=>C(()=>ul(async()=>{const{noAddressLocationPages:e}=await(import("./4421b714.9vkMsc69.js"));return{noAddressLocationPages:e}},__vite__mapDeps([132,2,133,134,135,126,127,128,1,3,4,5,129,115,7,8,9,10,11,136])).then(({noAddressLocationPages:e})=>({default:e.NoAddressLocation})))}),gE=w({displayName:"NoAddressLocationFullDetour",load:()=>C(()=>ul(async()=>{const{noAddressLocationPages:e}=await(import("./4421b714.9vkMsc69.js"));return{noAddressLocationPages:e}},__vite__mapDeps([132,2,133,134,135,126,127,128,1,3,4,5,129,115,7,8,9,10,11,136])
2).then(({noAddressLocationPages:e})=>({default:e.NoAddressLocationFullDetour})))}),fE=w({displayName:"NotFound",load:()=>ul(()=>import("./60d61386.BCT2Aq9I.js"),__vite__mapDeps([137,2,1,3,4,5,75,7,8,9,10,11]))}),yE=w({displayName:"OffsitePaymentFailed",load:()=>ul(()=>import("./656fad11.BZhaTTbL.js"),__vite__mapDeps([138,2,134,135,139,140,128,1,3,4,5,129,115,7,8,9,10,11]))}),vE=w({suspenseName:"one-page",displayName:"OnePage",load:()=>ul(()=>import("./f8706cb6.CJ1blgWt.js").then(e=>e.o),__vite__mapDeps([141,3,2,4,1,5,106,62,107,108,109,110,43,24,111,84,11,63,45,46,44,47,28,29,23,25,85,86,88,112,113,114,115,116,65,71,117,48,118,119,120,97,121,122,123,9,124,125,142,35,36,143,8,144,75,74,145,146,147,31,32,98,99,148,10,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,87,89,90,91,92,93,94,170,171,51,172,173,174,175,176,177,178,179,180,181,182]))}),_E=w({suspenseName:"one-page-review",displayName:"OnePageReview",load:()=>C(()=>ul(()=>import("./9e3968a8.T5w9c1vr.js"),__vite__mapDeps([183,2,1,3,4,5,105,98,24,85,31,32,99,142,35,36,114,115,143,8,11,144,75,107,108,74,145,100,87,88,89,90,91,92,93,94,101,184,153,154,155,185,65,66,6,186,187,188,41,42,55,113,116,189,190,151,191,192,112,193,95,96,158,159,160,97,63,194,121,122,164,7,9,10,195,102])))});class bE extends Error{constructor(){super(...arguments),this.name="CardFieldsError"}}class kE extends Error{constructor(e,t){super(e,t),this.name="CardFieldsLoadError",this.diagnostics=t?.diagnostics}}class PE extends Error{constructor(){super(...arguments),this.name="CardFieldsSetupError"}}
2class SE extends Error{constructor(){super(...arguments),this.name="CardFieldsScriptTagOnErrorError"}}class wE extends Error{constructor(){super(...arguments),this.name="CardFieldsAppendChildError"}}class CE extends Error{constructor(){super(...arguments),this.name="CardFieldsExecutionError"}}class EE extends Error{constructor(){super(...arguments),this.name="IFrameNotFoundError"}}class xE extends Error{constructor(e,t){super(e),this.name="CardFieldsFetchFailureError",void 0!==t&&(this.httpStatus=t)}toString(){const e=super.toString();return void 0===this.httpStatus?e:`${e} (HTTP Status: ${this.httpStatus})`}}const IE=class extends Error{constructor(){super(...arguments),this.name="CardFieldsOperationalError"}};IE.hostedFieldsName="CardFieldsError";let AE=IE;function TE({source:e,integrity:t},n=!0){const r=Date.now();function a(){return new Promise((n,r)=>{if(window.CardFields)return n();const a=document.createElement("script");a.async=!0,a.src=e,a.onload=()=>{if(window.CardFields)return n();setTimeout(()=>{if(!window.CardFields)return r(new CE);n()},0)},t&&(a.integrity=t),a.crossOrigin="anonymous",a.onerror=t=>{let n;n=t instanceof Event?new SE(`Event type: ${t.type}. ${LE(e)}`):new SE("string"==typeof t?`String error: ${t}. ${LE(e)}`:`unknown error type. ${LE(e)}`),document.head.removeChild(a),r(n)};try{document.head.appendChild(a)}catch(i){r(new wE("Failed to append child.",{cause:i}))}})}return(n?C(a):a()).catch(n=>{let a;try{const i="undefined"!=typeof performance&&"function"==typeof performance.getEntriesByName?performance.getEntriesByName(e,"resource"):[],o=i[i.length-1],s="undefined"==typeof navigator?void 0:navigator.connection;a=Object.fromEntries(Object.entries({errorCause:n instanceof Error?n.name.slice(0,128)||"Error":typeof n,underlyingCauseName:n instanceof Error&&n.cause instanceof Error?n.cause.name.slice(0,128)||"Error":void 0,elapsedMs:Date.now()-r,sdkIntegrity:t?.slice(0,512),networkType:s?.type,networkDownlink:s?.downlink,networkRtt:s?.rtt,networkSaveData:s?.saveData,documentReadyState:document.readyState,documentVisibilityState:document.visibilityState,resourceDurationMs:o?.duration,resourceTransferSize:o?.transferSize,resourceStatus:o?.responseStatus||void 0}).filter(([,e])=>void 0!==e))}catch{a=void 0}throw new kE(`Failed to load CardFields SDK. ${LE(e)}`,{cause:n,diagnostics:a})})}function LE(e){return`Script src: ${e} . Internet connection boolean: ${"undefined"==typeof navigator?"navigator not available":navigator.onLine}`}function NE(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var RE,ME;const DE=NE(ME?RE:(ME=1,RE={SDK_INTEGRITY:"sha256-fu1lH6QOfb8dybbxZiwh4q3DLqiMxbI+Knm2GsdIxqc=",SDK_URL:"https://checkout.pci.shopifyinc.com/build/09497de/card_fields.js"}));function OE(){const{environment:e}=ie(),t=e.services.hostedFields.url;return t===DE.SDK_URL?{source:t,integrity:DE.SDK_INTEGRITY}:{source:t}}const zE=w({suspenseName:"payment",displayName:"Payment",load:()=>C(()=>ul(()=>import("./74122478.BFNIO6rZ.js"),__vite__mapDeps([196,2,146,3,4,1,5,147,31,32,98,24,85,99,119,23,25,120,148,10,149,150,151,152,153,154,155,156,157,197,198,111,84,62,11,63,45,46,44,47,28,29,86,199,158,159,160,112,200,131,169,201,97,163,202,203,68,204,180,83,105,118,126,127,205,185,114,115,143,65,66,6,186,187,128,129,206,130,207,192,208,179,177,209,7,8,9]))),usePrefetch(){const e=function(){const e=OE();return n(()=>{TE(e)},[e])}();return n(()=>{e()},[e])}}),BE=w({displayName:"PostPurchase",load:()=>ul(()=>import("./896e8dde.DblzFGfI.js"),__vite__mapDeps([210,2,1,3,4,5,115,180,211,212,46,15,9,128,129,130,28,29,17,57,60,61,7,8,10,11,213]))}),VE=w({displayName:"Processing",load:()=>C(()=>ul(()=>import("./090b00f0.DBm2WxTa.js"),__vite__mapDeps([214,2,139,140,1,3,4,5,130,115,179,144,6,7,8,9,10,11,215])))}),FE=w({suspenseName:"review",displayName:"Review",load:()=>C(()=>ul(()=>import("./b120ac11.B1-Z0bZ6.js"),__vite__mapDeps([216,2,1,3,4,5,105,118,126,127,205,185,114,115,143,65,66,6,186,187,97,63,128,129,206,130,7,8,9,10,11])))}),UE=w({suspenseName:"shipping",displayName:"Shipping",load:()=>C(()=>ul(()=>import("./289b89e4.DYSJsQfT.js"),__vite__mapDeps([217,2,121,122,170,23,24,3,4,1,5,25,119,85,120,124,171,51,
2172,89,8,90,91,173,62,44,45,46,47,174,175,176,177,178,126,127,128,129,206,130,115,88,7,9,10,11])))}),qE=w({displayName:"ShopPayLoginLoader",load:()=>ul(()=>import("./9011490c.Csq9k8m4.js"),__vite__mapDeps([218,2,1,3,4,5,219,161,152,158,159,160,220,109,110,107,108,90,75,194,121,122,41,42,164,7,8,9,10,11,195,115,221]))}),jE=w({displayName:"StockProblems",load:()=>C(()=>ul(()=>import("./0cd5b134.lA2V9ssX.js"),__vite__mapDeps([222,2,133,134,135,126,127,128,1,3,4,5,129,223,130,115,224,7,8,9,10,11])))}),HE=w({displayName:"StockProblemsModal",load:()=>C(()=>ul(()=>import("./a9ba8e86.RXsoHgMh.js"),__vite__mapDeps([225,2,1,3,4,5,224,223,130,115,181,7,8,9,10,11])))});function $E(e){return function(t){const{observability:n}=ie();a(()=>{t&&(ml(t)||hl(t)?n.log("lazy_load_failure",`[LazyLoad] ${e} failed to load`,{component:e,failure:"lazy_load",error:String(t)}):n.error(t,{metadata:{lazyLoad:{component:e,failure:"lazy_load"}}}))},[t,n])}}const YE=$E("ThankYou"),WE=w({suspenseName:"thank-you",displayName:"ThankYou",useError:function(e){const{client:t,observability:n,graphql:{coreGraphql:r}}=ie(),a=lc(),o=a?.id,s=a?.orderStatusPageUrl,c=t.unstable_getSerialization("sessionToken"),u=i(!1);YE(e),l(()=>{if(!e||u.current)return;function t(e,t,r){t&&(u.current=!0),n.log("thank_you_recovery","[LazyLoad] ThankYou recovery",{outcome:e,waitedMs:r},{exportImmediately:!0,requiresKeepalive:!0}),t&&location.replace(t)}const a=new URLSearchParams(location.search).get("prevent_order_redirect");if(null!==a&&"false"!==a)return void t("prevented");if(s)return void t("redirect",s);if(!o)return void t("not_processed");let i=!1;const l=Date.now();return(async()=>{for(;Date.now()-l<1e4;){if(await B(sr),i)return;let e;try{const{data:t}=await r.staticQuery(zb,{cache:!1,variables:{receiptId:o,sessionToken:c}});"ProcessedReceipt"===t?.receipt?.__typename&&(e=t.receipt.orderStatusPageUrl)}catch{}if(i)return;if(e)return t("polled",e,Date.now()-l)}t("timed_out")})(),()=>{i=!0}},[r,e,n,s,o,c])},load:()=>C(()=>ul(()=>import("./909cc5d6.DF4VmQeL.js"),__vite__mapDeps([226,2,1,3,4,5,203,38,126,127,97,63,128,129,130,115,92,90,89,8,91,172,31,32,21,22,85,159,117,116,48,107,108,44,45,46,24,47,227,198,53,98,99,95,96,228,229,230,231,133,134,135,186,28,29,112,232,233,234,171,51,189,190,9,121,122,164,7,10,11,235])),{maxAttempts:1})}),GE=w({displayName:"Throttle",load:()=>C(()=>ul(()=>import("./01f1d1bd.Bfk1LtHj.js"),__vite__mapDeps([236,2,97,63,1,3,4,5,129,115,73,8,7,9,10,11,237])))}),JE="URL not specified for Chat: Please configure your extension to include extensions.targeting.preloads.chat",KE="URL specified for Chat: The URL specified in extensions.targeting.preloads.chat must not be the same origin as the checkout host.",QE="Scope not granted for Chat: Please request access in Partners dashboard to Chat in checkout extensions",XE="224px",ZE="72px",ex=72,tx="415px",nx="700px",rx="100dvi",ax="93dvb",ix=new Set(["Chat","s-chat"]);var ox={Paragraph:"_1tx8jg70 _1fragemws",lineClamp:"_1tx8jg72",lineClampCount:"var(--_1tx8jg71)",accessibilityVisibilityVariant:{exclusive:"_1tx8jg71p _1tx8jg71o _1fragem121"},textAlignVariant:{start:"_1tx8jg77 _1tx8jg73 _1fragem126",center:"_1tx8jg78 _1tx8jg74 _1fragem124",end:"_1tx8jg79 _1tx8jg75 _1fragem125",justify:"_1tx8jg7a _1tx8jg76 _1fragem127"},textWrapVariant:{pretty:"_1tx8jg7b"},sizeVariant:{extraSmall:"_1tx8jg7j _1tx8jg7c _1fragemys",small:"_1tx8jg7k _1tx8jg7d _1fragemyt",base:"_1tx8jg7l _1tx8jg7e _1fragemyu",medium:"_1tx8jg7m _1tx8jg7f _1fragemyv",large:"_1tx8jg7n _1tx8jg7g _1fragemyw",extraLarge:"_1tx8jg7o _1tx8jg7h _1fragemyx",extraExtraLarge:"_1tx8jg7p _1tx8jg7i _1fragemyy"},kerningVariant:{base:"_1tx8jg7q",large100:"_1tx8jg7r",large200:"_1tx8jg7s"},letterCaseVariant:{uppercase:"_1tx8jg7t",lowercase:"_1tx8jg7u",capitalize:"_1tx8jg7v",none:"_1tx8jg7w"},fontsVariant:{primary:"_1tx8jg7z _1tx8jg7x _1fragemyg",secondary:"_1tx8jg710 _1tx8jg7y _1fragemyh"},decorationVariant:{none:"_1tx8jg713 _1tx8jg711 _1fragem128",underline:"_1tx8jg714 _1tx8jg712 _1fragem129"},colorVariant:{base:"_1tx8jg71k",subdued:"_1tx8jg71l"},toneVariant:{auto:"_1tx8jg71c",neutral:"_1tx8jg71d",info:"_1tx8jg71e _1tx8jg71
25 _1tx8jg716 _1fragemxt",success:"_1tx8jg71f _1tx8jg715 _1tx8jg717 _1fragemxu",warning:"_1tx8jg71g _1tx8jg715 _1tx8jg718 _1fragemxv",critical:"_1tx8jg71h _1tx8jg715 _1tx8jg719 _1fragemxr",custom:"_1tx8jg71i _1tx8jg715 _1tx8jg71a _1fragemxs",accent:"_1tx8jg71j _1tx8jg71b _1fragemxq"},typeVariant:{paragraph:"_1tx8jg71m",small:"_1tx8jg71n _1tx8jg7k _1tx8jg7d _1fragemyt"}};function sx({accessibilityVisibility:e,children:t,color:n="base",size:r,id:a,textAlign:i,textWrap:o,translate:s,kerning:l,letterCase:c,fonts:u,decoration:p,type:m="paragraph",tone:h="auto",dir:g,lang:f,lineClamp:y}){const _=null!=y&&Number.isFinite(y)&&y>=1?Math.floor(y):void 0,k=null==_?void 0:b({[ox.lineClampCount]:String(_)}),P=(!0===s?"yes":void 0)??(!1===s?"no":void 0),S="exclusive"===e?ox.accessibilityVisibilityVariant[e]:v(ox.Paragraph,"small"!==m&&r&&ox.sizeVariant[r],h&&ox.toneVariant[h],n&&("auto"===h||"neutral"===h)&&ox.colorVariant[n],i&&"auto"!==i&&ox.textAlignVariant[i],o&&"wrap"!==o&&ox.textWrapVariant[o],l&&ox.kerningVariant[l],c&&ox.letterCaseVariant[c],u&&ox.fontsVariant[u],p&&ox.decorationVariant[p],null!=_&&ox.lineClamp,ox.typeVariant[m],{notranslate:!1===s});return d(Sd.Provider,{value:!0,children:d("p",{"aria-hidden":"hidden"===e||void 0,className:S,id:a,translate:P,dir:g,lang:f,style:k,children:t})})}function lx({email:e,phone:t,emailInputError:n,phoneInputError:r,hasViolations:a}){const i=!e&&!t,o=Boolean(n)||Boolean(r);return i||o||a}function cx(e){const t=e?.filter(({quantity:e})=>e>0)??[];return t.length>0&&t.every(({requiresShipping:e})=>!e)}function ux({isFlagshipPartner:e,hasError:t,hasOnlyDigitalItems:n}){return e&&!t&&!n}const dx=re("VaultedSectionsContext");function px(){const e=h(dx);return t(()=>e?e.value:{contact:!1,delivery:!1,payment:!1,billing:!1})}function mx(){const e=px();return t(()=>e.value.contact&&e.value.delivery&&e.value.payment)}function hx(){const e=px(),{checkout:n,embed:r,shop:a,source:o}=ie(),{validation:{contactErrors:{emailInputError:s,phoneInputError:l}}}=n,{current:c}=n.identity,{hasViolations:u}=Jy(ri),d=vv(),p=$m(),m=T(d.main.section),h=T(p.vaulted),g=T(u),f=i(!1);return t(()=>{const t=ai(m.value),i=ai(h.value),{contact:u,delivery:d,payment:p}=e.value,y=ii({isContactVaulted:u,configuration:n.configuration,identity:n.identity,embed:r,shop:a}),v=(()=>{if("sdkCartHints"!==c.value)return f.current=!1,y;if(!y)return f.current=!1,!1;const e=n.proposal.negotiated.fields.merchandiseLines.value?.lines;return ux({isFlagshipPartner:r?.isFlagshipPartner??!1,hasError:lx({email:n.proposal.proposed.email.value,phone:n.proposal.proposed.phone.value,emailInputError:s.value,phoneInputError:l.value,hasViolations:g.value}),hasOnlyDigitalItems:cx(e)})?f.current:(f.current=!0,!0)})(),_=!Hn(o)&&oi({checkout:n}),b=d&&n.isShippingRequired.value;return!!(v||b||p||_)&&(t||i)})}function gx(){const{embed:e,shop:t,checkout:n,router:r,i18n:a}=ie(),i=e?.interstitialPartnerDisplayName,{plan:o}=nc().value,c=r.currentUrl.value.normalizedPath,u=da({embedder:e?.embedder,shop:t}),p=px(),{delegatedPaymentInstrument:h}=n.negotiator.context,g=m(!1);l(()=>{g.value=Boolean(h.peek())},[h,g]);const[f]=s(()=>{const e=n.proposal.proposed;return{contact:Boolean(e.email.peek()||e.phone.peek()),delivery:(t=e.shippingAddress.peek(),Object.entries(t).some(([e,t])=>"countryCode"!==e&&"zoneCode"!==e&&ly(e)&&null!=t&&("string"!=typeof t||t.trim().length>0)))};var t});if(!function(e,t){return!!e.greenPath.some(({route:e})=>e===t)||e.detours.some(({type:e,route:n})=>("stockProblems"===e||"noAddressLocation"===e)&&n===t)}(o,c))return null;if(!u)return null;if("sdkCartHints"!==n.identity.current.value)return null;if(!i)return null;const y=p.value.contact&&f.contact,v=p.value.delivery&&f.delivery,_=p.value.payment&&g.value;return y||v||_?d(Qm,{gridTemplateColumns:"auto 1fr",gap:"small",background:"subdued",borderWidth:"none none base none",padding:"base",children:[d(rh,{type:"info"}),d(sx,{textWrap:"pretty",children:a.translate("merchant_redirect.partner_interstitial.account_source_banner",{shop_name:t.name,partner_name:i})})]}):null}const fx=w({id:()=>"AnnouncementRuntimeExtensions",displayName:"AnnouncementRuntimeExtensions",load:()=>ul(()=>import("./28ac86c0.GUoE5iXU.js").then(e=>e.A),__vite__mapDeps([18,2,1,3,4,5,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,17,38,39,40,9,41,42,43,44,45,46,47,48,49,50]))});function yx(){const e=Gw("purchase.thank-you.announcement.render");return r(()=>{const t=Za(e,"uiExtension");return t.length>0?[t[0]]:[]},[e])}const vx=/Version\/(\d+)\.(\d+)\sMobile\/\w+\sSafari/,_x=/Version\/(\d+)[\d.]*.*Safari/,bx=/Chrome\/|Edg(?:e|iOS|A)?\//,kx=/FBAN|FB_IAB|FBAV|Instagram/;function Px(){return kx.test(navigator.userAgent)}const Sx=0,wx=1,Cx=2,Ex=4,xx=5,Ix=new Map([["legacy",0],["block",1],["inline",2],["grid",3],["list",4],["grid-compact",5]]);function Ax(e,t){return Ix.get(e)===t}function Tx(e){const t=Ix.get(e);return 3===t||5===t}function Lx(e){return"string"==typeof e&&Ix.has(e)}const Nx=f(null);function Rx(){return h(Nx)}Nx.displayName="ChoiceListContext";const Mx=f(null);function Dx(){return h(Mx)||{}}function Ox(){return Dx().redesigned??!1}Mx.displayName="ChoiceListStyleContext";const zx=f(void 0);function Bx(e){return Ax(e,1)||Ax(e,5)}function Vx(e){const t=h(Yu)?.redesignedChoiceLists??!1,n=h(zx);return t&&"base"!==n&&Bx(e)?"redesigned":"base"}zx.displayName="ChoiceListPresentationOverrideContext";var Fx={Actions:"u2pextc u2pextb _1fragem82 _1fragem9v _1fragemtq _1fragemrx _1fragem6t _1fragempu",ActionsScrollShadow:"u2pext1n",actionLayoutVariant:{inline:"u2pextf u2pextd _1fragemx8 _1fragembu",stacked:"u2pextg u2pexte _1fragemxc _1fragemcd"},hasBlockSize:"u2pextt",Content:"u2pext13 u2pext12 _1fragemyn",contentPaddingVariant:{base:"u2pext1p u2pext1o _1fragemtq _1fragemrx",none:"u2pext1q"},CloseButton:"u2pext1l u2pext1k _1fragempa _1fragemr3 _1fragemnh _1fragemsw _1fragemwn _1fragem10x _1fragem5u _1fragem133 _1fragem12k _1fragem12p _1fragem12e _1fragem130",Footer:"u2pextm _1fragemyo",Header:"u2pext1a u2pext19 _1fragem64 _1fragembe _1fragem19",HeaderContent:"u2pext1h _1fragemyn _1fragemvo",headerContentPaddingVariant:{base:"u2pext1i",none:"u2pext1j"},headerPaddingVariant:{base:"u2pext1e u2pext1b _1fragemtq _1fragemrx",large:"u2pext1f u2pext1c _1fragemtq _1fragemrx",extraLarge:"u2pext1g u2pext1d _1fragemtq _1fragemrx"},IFrame:"u2pext15 u2pext14 _1fragemeg _1fragemdw _1fragemf0 _1fragemdc _1fragem5u",iframePaddingVariant:{base:"u2pext17 u2pext16 _1fragemtq _1fragemrx _1fragempu",none:"u2pext18"},Modal:"u2pexto u2pextn _1fragemup _1fragemv4 _1fragem64 _1fragem73 _1fragemzf _1fragem5p _1fragemve _1fragemxx _1fragemy5 _1fragem133 _1fragem12n _1fragem12d _1fragem12q",modalTopRadiusVariant:{rounded:"u2pextp",square:"u2pextq"},modalMobileMarginVariant:{base:"u2pextr",none:"u2pexts"},Overlay:"u2pext8 u2pext7 _1fragem108 _1fragem10n _1fragemzt _1fragem112 _1fragemwn _1fragem64 _1fragem1j _1fragem132 _1fragem11k _1fragem12l _1fragem12q _1fragem12f",overlayPaddingVariant:{base:"u2pext9",none:"u2pexta"},ScrollBox:"u2pextv u2pextu _1fragem6t _1fragemuk _1fragemv4",scrollBoxActionsVariant:{withActions:"u2pextw",noActions:"u2pextx"},scrollBoxPaddingVariant:{gap:"u2pextz u2pexty _1fragem8c _1fragema5",none:"u2pext10",blockStart:"u2pext11"},secondaryActionLayoutVariant:{inline:"u2pextk u2pexti _1fragemx8",stacked:"u2pextl u2pextj _1fragemxc"},SecondaryActions:"u2pexth _1fragem82 _1fragem9v _1fragem6t _1fragemyn",transitionVariant:{entered:"u2pext1",exit:"u2pext2",exiting:"u2pext3",enter:"u2pext4",entering:"u2pext5",exited:"u2pext6"},MobileSafari26BarTop:"u2pext1t u2pext1s u2pext1r _1fragem6y _1fragemwn _1fragem10n _1fragem112 _1fragem11z _1fragem132",MobileSafari26BarBottom:"u2pext1u u2pext1s u2pext1r _1fragem6y _1fragemwn _1fragem10n _1fragem112 _1fragem11z _1fragem132",ModalContentCrossFadeTarget:"u2pext0",overlayMobileSafari26:"u2pext1v"};const Ux=jc("Modal");function qx(e){const t=Hc(e.id,Ux),n=zu("modal");if(n){const{active:r,setActive:a}=n;
2n.setActivatorAttributes({"aria-haspopup":"dialog"}),n.attach("onClick",()=>{a(!0)});const i=()=>{a(!1),"function"==typeof e.onHide&&e.onHide()},{children:o}=e;return d(Hx,{...e,id:t,onHide:i,open:r,children:mw(o)&&d(Iu,{children:o})})}return d(Hx,{...e,id:t})}const jx={"small-100":300,small:300,base:480,"large-100":640,large:640,max:960},Hx=Fp(Lp(function({blocking:e,size:t="base",blockSize:r,open:o=!1,heading:l,source:c,iframeRef:u,onIframeLoad:p,iframeId:m,allow:g,accessibilityLabel:f,padding:_="base",primaryAction:b,secondaryActions:k,actionLayout:P="inline",footer:S,children:w,id:C,onAfterShow:E,onShow:x,closeButton:I="visible",dataTestIdForScrollableContent:A,...T}){const L=i(null),N=i(null),R=i(!1),M=h(Mu)?.openModalCount;a(()=>{if(o&&M)return M.value+=1,()=>{M.value=Math.max(0,M.value-1)}},[o,M]),o&&N.current!==o&&"function"==typeof x&&x(),N.current=o;const{modal:{margin:D}}=$m(),O=null!=D&&"none"!==D,z="hidden"===I,{onHide:B,onAfterHide:V}=e?{}:T,[F,U]=s(),q=!r&&function(e){if(!e||"undefined"==typeof window)return!1;try{return new URL(e,window.location.href).origin!==window.location.origin}catch{return!1}}(c),j=r??(q||-1===F||"max"===t?"100%":void 0),H=function(e){return e.endsWith("px")}(t)?t:`${jx[t]}px`,{className:$,style:Y,styleElement:W}=Um({blockSize:j,maxInlineSize:`@media (inline-size >= extraSmall) ${H}, none`}),G=Ed(o,"slow"),[J,K]=s("");a(()=>{K(Fx.transitionVariant[G])},[G]);const{isLocked:Q,lock:X,unlock:Z}=ey();a(()=>{o&&!Q&&X(),!o&&Q&&Z()},[Q,X,o,Z]),a(()=>{if("exited"===G&&(U(void 0),R.current&&("function"==typeof V&&V(),R.current=!1)),"entered"===G){if(C&&function(){const e=navigator.userAgent;if(bx.test(e))return!1;const t=e.match(_x);return!!t&&26===parseInt(t[1],10)}()){const e=document.getElementById(C),t=document.activeElement,n=t instanceof HTMLElement&&!0===e?.contains(t)&&t.matches('input, textarea, select, [contenteditable="true"]');e&&!n&&e.focus()}"function"==typeof E&&E()}},[G,E,V,C]),a(()=>{o||(R.current=!0)},[o]),a(()=>{const t=t=>{"Escape"!==t.key&&"Esc"!==t.key||e||!o||!L.current?.contains(document.activeElement)&&document.getElementById($c)?.contains(document.activeElement)||"function"==typeof B&&B()};return document.addEventListener("keydown",t,!1),()=>{document.removeEventListener("keydown",t,!1)}},[e,o,B]);const ee=n(e=>{if(!r&&!q){const t=e.target;if(t?.contentWindow)try{U(t.contentWindow.document.body.scrollHeight)}catch{U(-1)}}p?.()},[r,p,q]),te=n(e=>{e.target===e.currentTarget&&"function"==typeof B&&B()},[B]);if("exited"===G)return null;const ne=l&&!f?Up(C):void 0,re=Boolean(b||k),ae=function(){const e=navigator.userAgent.match(vx);return!!e&&"26"===e[1]}();return d(eu,{children:d(zx.Provider,{value:void 0,children:[W,d("div",{ref:L,className:v(Fx.Overlay,J,Fx.overlayPaddingVariant[r?"none":"base"],ae&&Fx.overlayMobileSafari26),onMouseDown:te,children:d(Qf,{children:d("div",{id:C,className:v(Fx.Modal,Fx.modalTopRadiusVariant["100%"===xp(r)?"square":"rounded"],Fx.modalMobileMarginVariant[O?"base":"none"],J,$,j&&Fx.hasBlockSize),role:"dialog","aria-modal":!0,style:Y,"aria-label":f,"aria-labelledby":ne,children:[c?d(y,{children:d(yu,{level:2,children:[d($x,{id:C,hideCloseButton:z||e,onHide:B,heading:l}),d(Jx,{source:c,iframeRef:u,iframeId:m,allow:g,accessibilityLabel:f,heading:l,iframeHeight:F,blockSize:r,handleIFrameLoad:ee,padding:_})]})}):d("div",{className:v(Fx.ScrollBox,o&&Fx.ModalContentCrossFadeTarget,Fx.scrollBoxPaddingVariant["base"===_?l?"gap":"blockStart":"none"],Fx.scrollBoxActionsVariant[re||S?"withActions":"noActions"]),"data-testid":A,children:[d(yu,{level:2,children:[d($x,{id:C,hideCloseButton:z||e,onHide:B,padding:_,heading:l}),d(Gx,{padding:_,children:w})]}),re&&d("div",{className:Fx.ActionsScrollShadow})]}),S&&d("div",{className:Fx.Footer,children:d(kd.Provider,{value:!1,children:d(Iu,{children:S})})}),re&&d(Yx,{primaryAction:b,secondaryActions:k,actionLayout:P})]})})}),ae&&d(y,{children:[d("div",{className:v(Fx.MobileSafari26BarTop,J)}),d("div",{className:v(Fx.MobileSafari26BarBottom,J)})]})]})})},{overlayType:"modal"}));function $x({hideCloseButton:e,id:t,onHide:n,padding:r,heading:a}){const i="string"==typeof a?d(IS,{level:1,children:a}):a;return!i&&e?null:d("div",{className:v(Fx.Header,Fx.headerPaddingVariant[i?"base":"base"===r?"large":"extraLarge"]),children:[i&&d("div",{id:Up(t),className:v(Fx.HeaderContent,Fx.headerContentPaddingVariant[e?"none":"base"]),children:i}),!e&&d(Wx,{onHide:n})]})}function Yx({primaryAction:e,secondaryActions:t,actionLayout:n="inline"}){return d(Iu,{children:d("div",{className:v(Fx.Actions,Fx.actionLayoutVariant[n]),children:[("inline"===n||mw(t))&&d("div",{className:v(Fx.SecondaryActions,Fx.secondaryActionLayoutVariant[n]),children:t}),e]})})}function Wx({onHide:e}){const t=Ju();return d("button",{type:"button",className:Fx.CloseButton,onClick:()=>{"function"==typeof e&&e()},"aria-label":t("closeModal")||"Close",children:d(rh,{type:"x",size:"base"})})}function Gx({children:e,padding:t="base"}){return mw(e)&&d("div",{className:v(Fx.Content,Fx.contentPaddingVariant[t]),children:d(kd.Provider,{value:!1,children:d(Vw,{children:e})})})}function Jx({source:e,iframeRef:t,iframeId:n,allow:r,accessibilityLabel:a,heading:i,iframeHeight:o,handleIFrameLoad:s,padding:l="base"}){const c=r;return d("iframe",{src:e,title:a??("string"==typeof i?i:void 0),name:n,className:v(Fx.IFrame,Fx.iframePaddingVariant[l]),ref:t,onLoad:s,id:n,...o&&o>0&&{style:{height:o}},...c?{allow:c}:void 0})}function Kx({submitButtonAppearance:e,submitText:t,cancelText:n,loading:r,disabled:a,handleSubmit:i,handleCancel:o}){const s=Boolean(n),l=Boolean(t);return d(Qm,{gridTemplateColumns:s&&l?"1fr 1fr":"1fr",gap:"base",inlineSize:"100%",children:[s&&d(jf,{variant:"secondary",inlineSize:"fill",onClick:o,children:n}),l&&d(jf,{variant:"primary",inlineSize:"fill",disabled:a,loading:r,type:"submit",tone:e,onClick:i,children:t})]})}const Qx=["deliveryNext","taxes","landedCostDetails","remoteTaxDetails","total"];var Xx=(e=>(e.Truck="truck",e.PackageDelivery="package-delivery",e.Store="store",e.Location="location",e))(Xx||{});const Zx=re("DeliveryMethodsContext"),eI=f(void 0);function tI(){return ae(Zx)}function nI(){return h(eI)}function rI(e){const n=h(Zx),r=Qx.includes(e);return t(()=>r&&(n?.initialReconciliationPending.value??!1))}function aI(e){return e/li}function iI(){const{i18n:e}=ie();return n(t=>{if("number"==typeof t){const n=Math.ceil(aI(t));return n<1?null:e.translate("shipping.estimated_delivery_date",{count:n})}const{lower:n,upper:r}=t;if(void 0===n||void 0===r)return null;const a=Math.ceil(aI(n)),i=Math.ceil(aI(r));return i<1?null:a<1||a>i?e.translate("shipping.estimated_delivery_date",{count:i}):e.translate("shipping.estimated_delivery_date_range",{minimum:a,maximum:i})},[e])}function oI(){const{checkout:{negotiator:e}}=ie(),n=e.current.fields.deliveryNext,r=Be();return t(()=>{const e=n.value;return!(!e||"unavailable"===e.status||r.value.enabledDeliveryMethods.length>1)&&e.lines.every(e=>"not_required"===e.status||"available"===e.status&&e.methods.length<2)})}function sI(){const{checkout:{negotiator:e}}=ie(),{deliveryNext:n,allViolations:r}=e.current.fields,a=vn("deliveryNext");return t(()=>{const e=n.value,t=a.value,i=r.value;if(t)return{value:null,loading:t};const o=i?.some(({code:e})=>ci.has(e));return{value:"unavailable"===e?.status&&(e.hasNoDeliveryMethods||o||!1),loading:!1}})}function lI(){const{checkout:{negotiator:e}}=ie(),{allViolations:n}=e.current.fields,r=vn("deliveryNext");return t(()=>{const e=r.value;return e?{value:null,loading:e}:{value:n.value?.some(({code:e})=>ui.has(e))??!1,loading:!1}})}function cI(){const{checkout:{negotiator:e}}=ie(),{deliveryLines:n}=e.parts;return t(()=>{const e=n.value;return e.length>0&&e.every(e=>{const t=e.value?.deliveryMethodTypes;return 1===t?.length&&"PICK_UP"===t[0]})})}function uI(e){return(e??[]).filter(e=>e.requiresShipping).reduce((e,t)=>
2e+(t.quantity??0),0)}function dI(){const e=si();return t(()=>{const t=e.value;if(!t)return{};const n={};for(const e of t){if("available"!==e.status)continue;const t=It(e);if(!t)continue;const{methodType:r}=t,a=uI(e.targetMerchandiseLines);n[r]=(n[r]??0)+a}return n})}function pI(){const{checkout:e,i18n:t}=ie(),n=tI(),r=e.crossBorderConfirmState.value,a=Boolean(r&&!r.onCancel),i=ph(),o=r?()=>{r.onConfirm(n),i(t.translate("split_delivery.cross_border.banner"))}:void 0;return d(qx,{id:"cross-border-consolidation-modal",open:Boolean(r),heading:a?t.translate("split_delivery.cross_border.modal.country_changed_heading"):t.translate("split_delivery.cross_border.modal.heading"),onHide:r?.onCancel,closeButton:a?"hidden":"visible",primaryAction:d(Kx,{handleSubmit:o,handleCancel:r?.onCancel,submitText:a?t.translate("general.continue_button_label"):t.translate("split_delivery.cross_border.modal.change_country"),cancelText:a?void 0:t.translate("address_management.address_form.cancel")}),children:d(Vf,{children:t.translate("split_delivery.cross_border.modal.content")})})}function mI(e,t){const n=[],r=e.includes("LOCAL");return(e.includes("SHIPPING")||r)&&n.push(r?["SHIPPING","LOCAL"]:["SHIPPING"]),e.includes("PICK_UP")&&n.push(["PICK_UP"]),e.includes("PICKUP_POINT")&&!t&&n.push(["PICKUP_POINT"]),n}function hI(e){let t=!1,n=!1;for(const r of e){const e=r.includes("SHIPPING");for(const a of r)if("NONE"!==a)if("SHIPPING"!==a)if("PICK_UP"!==a){if("LOCAL"!==a||!e)return!1}else n=!0;else t=!0}return t&&n}function gI(e){return(e.value.targetMerchandiseLines??[]).some(e=>e.requiresShipping)}function fI(){const{shop:e,checkout:{negotiator:n}}=ie(),{deliveryNext:r}=n.current.fields,a=nc();return t(()=>function({deliveryNext:e,isThankYouPage:t,proposedDeliveryLines:n,splitShipPickupUiEnabled:r}){if(!r)return!1;const a=hI(Ue(e).filter(e=>"available"===e.status).map(e=>e.methods.map(({methodType:e})=>e)));return t?a:!!Boolean(e&&"supportsSplitDeliveryMethod"in e&&e.supportsSplitDeliveryMethod)&&function(e){const t=e.filter(gI);return hI(e.map(e=>e.value.deliveryMethodTypes))&&t.some(e=>e.value.deliveryMethodTypes.includes("SHIPPING"))&&t.some(e=>e.value.deliveryMethodTypes.includes("PICK_UP"))}(n)}({deliveryNext:r.value,isThankYouPage:pv(a.value.currentDetour),proposedDeliveryLines:n.parts.deliveryLines.value,splitShipPickupUiEnabled:e.shipPickupInOneOrderEnabled}))}function yI(e){const t=i(e);return a(()=>{t.current=e},[e]),t}function vI(){return(()=>{const{userEvents:e,shop:{id:t},checkout:{identity:n,negotiator:r},source:i}=ie(),o="shopPay"===n.current.value,s=r.current.fields.buyerIdentity.value?.customerProfile,{negotiating:l,methods:c}=tI(),u=di();a(()=>{!l.value&&c.value.includes("PICK_UP")&&e.monorailEvent({schemaId:"local_pickup_checkout/3.1",payload:{checkoutToken:i.checkoutSessionIdentifier||"",eventType:"checkout_pickup_tab_selected",shopId:parseInt(le(t),10),numberLocationsFound:u.value?.methods.length,userId:s?.id?parseInt(le(s.id),10):void 0,checkoutSurface:o?"shop_pay":"guest_checkout"}})},[s?.id,l.value,o,u.value?.methods.length,e,c.value,i.checkoutSessionIdentifier,t])})(),(()=>{const e=i(),{userEvents:t,shop:{id:n},checkout:{identity:r,negotiator:o},source:s}=ie(),l="shopPay"===r.current.value,c=o.current.fields.buyerIdentity.value?.customerProfile,u=di(),d=u.value?.selectedDeliveryMethodHandle,p=u.value?.methods;a(()=>{const{locationId:r,selectedLocationRank:a}=((e,t)=>{const n=t=>t.handle===e,r=t?.findIndex(n),a=t?.find(n)?.originLocation?.id;return{locationId:a,selectedLocationRank:r}})(d,p);r&&d!==e.current&&(e.current=d,t.monorailEvent({schemaId:"local_pickup_checkout/3.1",payload:{eventType:"checkout_pickup_location_selected",checkoutToken:s.checkoutSessionIdentifier||"",shopId:parseInt(le(n),10),locationId:le(r),selectedLocationRank:a,userId:c?.id?parseInt(le(c.id),10):void 0,numberLocationsFound:p?.length||0,checkoutSurface:l?"shop_pay":"guest_checkout"}}))},[c?.id,l,p,t,d,s.checkoutSessionIdentifier,n])})(),(()=>{const e=Og(),n=fI(),r=nc(),a=t(()=>n.value&&!pv(r.value.currentDetour));P(()=>{a.value&&o(()=>{e("splitShipAndPickupIntent",{timestamp:new Date})})})})(),null}function _I(e,t){const n=e.find(mi),r=t.find(mi);return!n&&r?{direction:"entering",pickupType:r}:n&&!r?{direction:"leaving",pickupType:n}:{direction:"none"}}const bI=["phone","company","address2"];function kI(){const{checkout:e,shop:t}=ie(),{locationAddress:r,shippingAddress:a}=e.negotiator.parts,o=t.hasFlagEnabled(hi),s=i(r.peek()),l=i(!1);return{syncLocationAddressFromShipping:n((t,n)=>{if(o)return;if("entering"!==_I(t,n).direction)return;if(l.current)return;const i=s.current;if(i&&!function(e,t){return e?.countryCode===t.countryCode&&e?.zoneCode===t.zoneCode&&e?.postalCode===t.postalCode&&e?.city===t.city&&e?.coordinates?.latitude===t.coordinates?.latitude&&e?.coordinates?.longitude===t.coordinates?.longitude}(r.value,i))return void(l.current=!0);const c=a.value;if(!c?.countryCode)return;const{isRequired:u}=e.configuration.addressSettings.nonBillingAddressSettings.value,d=function(e){if(e.coordinates)return!0;const{address1:t,city:n,firstName:r,lastName:a}=e;return!!(t&&n&&r&&a)&&bI.every(t=>e[t]||!(e=>u(e,{countryCode:c.countryCode,useMerchantSettings:!0}))(t))}(c)?c:{};r.value=gi(d,c.countryCode,c.zoneCode),s.current=r.value},[e,o,r,a])}}function PI(e){const t=e.filter(e=>"SHIPPING"===e||"LOCAL"===e);return t.length>0?t:1===e.length&&"PICK_UP"===e[0]?["PICK_UP"]:1===e.length&&"PICKUP_POINT"===e[0]?["PICKUP_POINT"]:void 0}function SI({children:e}){const s=i(void 0),{i18n:l,checkout:c,observability:u,shop:p,router:h,webMcp:g}=ie(),f=p.hasFlagEnabled(fi),y=m(!1),v=m(!1),_=bh(),{negotiate:b}=rc(),{loading:k}=c.negotiator,S="shopPay"===c.identity.current.value,w=Be(),C=i(new Set),E=i(),{correctShippingAddress:I}=function(){const{shopPay:e,checkout:t}=ie(),{shippingAddress:r}=t.negotiator.parts,a=pi(),i="shopPay"===t.identity.current.value,o=n(()=>
2{if(!a.value||t.negotiator.current.fields.mustSelectProvidedAddress.value)return;const n=e.session.selectedShippingAddress.value;if(!n?.address)return;const i=t.configuration.addressSettings.nonBillingAddressSettings.value.isRequired("phone"),o=e.user.phoneNumber.value;r.value={...n?.address,phone:i&&!n?.address.phone?o:n?.address.phone}},[a,t.configuration.addressSettings.nonBillingAddressSettings,t.negotiator.current.fields.mustSelectProvidedAddress,r,e.user.phoneNumber,e.session.selectedShippingAddress]);return{correctShippingAddress:n(e=>{i&&e.includes("SHIPPING")&&o()},[o,i])}}(),{syncLocationAddressFromShipping:L}=kI(),{preservePickupSelectionAcrossToggles:N}=function(){const{checkout:{negotiator:e}}=ie(),{deliveryLines:t}=e.parts,r=i({}),a=n((e,n)=>{const a=_I(e,n);if("leaving"!==a.direction)return"entering"===a.direction?r.current[a.pickupType]:void 0;r.current[a.pickupType]=function(e){return e.reduce((e,t)=>{const{type:n,deliveryMethodTypes:r,deliveryMethodHandle:a}=t.value;return r.some(mi)?{...e,[n]:a}:e},{})}(t.value)},[t]);return{preservePickupSelectionAcrossToggles:a}}(),{billingAddressOption:R,deliveryLines:M,discountLines:D,merchandiseLines:O,shippingAddress:z,locationAddress:B}=c.negotiator.parts,V=fI(),{deliveryNext:F,shippingAddress:U}=c.negotiator.current.fields,q=F.peek(),j=m(yi(z.peek())||yi(U.peek())||null!=q&&"unavailable"!==q.status),H=nb();P(()=>{(yi(U.value)||"filled"===F.value?.status||"partial"===F.value?.status)&&(j.value=!0)});const $=h.currentUrlMatches("/stock-problems"),[Y]=Lh("ONE_TIME_PURCHASE"),W=T(Y),[G,J]=Oh(),K=function(){const{checkout:{negotiator:e}}=ie(),{parts:t}=e;return n(e=>{t.deliveryLines.value.forEach(t=>{t.value={...t.value,deliveryMethodHandle:e}})},[t.deliveryLines])}(),Q=!f,X=T(G),Z=t(()=>ut(F.value)||vi(M.value)||V.value),ee=t(()=>Z.value?X.value:W.value),te=r(()=>{if(Z.peek())return;if(1!==(e=w.peek().enabledDeliveryMethods??[]).length||"PICK_UP"!==e[0])return;var e;const[t]=ee.peek();return"PICK_UP"!==t?{activeMethod:t,targetMethod:"PICK_UP"}:void 0},[Z,ee,w]),ne=m(null!=te),re=t(()=>{if(c.proposal.negotiated.fields.mustSelectProvidedShippingRate.value)return ee.value;if(!Z.value){const e=wI(w.value.enabledDeliveryMethods??[]),t="unavailable"===F.value?.status&&!j.value,[n]=ee.value;return te&&ne.value&&!v.value?[te.targetMethod]:t&&!v.value&&e&&"PICKUP_POINT"!==n?["SHIPPING"]:n?["LOCAL"===n?"SHIPPING":n]:[]}const e=ee.value.filter(e=>"LOCAL"!==e);return!e.includes("SHIPPING")&&ee.value.includes("LOCAL")&&e.push("SHIPPING"),e}),ae=n((e,t)=>{if(H.value)return;const n=wI(e),r=wI(t);t.some(mi)&&!r&&(!S&&n&&null==s.current&&(s.current=R.value),R.value="custom"),!r||n||S||(p.requireMatchingShippingAndBilling?R.value="shipping":null==s.current?R.value=p.sameBillingAndShippingAddress?"shipping":"custom":R.value=s.current,s.current=void 0)},[p,S,H,R]),oe=i(re.peek());P(()=>{const e=oe.current,t=re.value;oe.current=t,e!==t&&o(()=>ae(e,t))});const se=n((e,t,n)=>{ae(t,e),oe.current=e,I(e),n?B.value=n:L(t,e);const r=n?void 0:N(t,e),a=PI(e);A(()=>{p.shipPickupInOneOrderEnabled&&_i(M),J(e),p.shipPickupInOneOrderEnabled&&a&&bi({deliveryLines:M,merchandiseLines:O.value,deliveryMethodTypes:a}),K(void 0),r&&Ih(M,r),ki(D),ne.value=!1})},[ae,I,B,L,N,p.shipPickupInOneOrderEnabled,M,J,O,K,D,ne]),le=n((e,t=re.value,n)=>{const r=S||H.value||t.includes("SHIPPING")||!e.includes("SHIPPING")?["deliveryNext"]:[],a=Fe(r);return se(e,t),y.value=!0,_?.dispatch?.("deliveryMethodChanged"),b({silenceViolations:a,onComplete:e=>{const t=k.value.has("deliveryNext");if("stale"===e.status&&t){const e=k.subscribe(t=>{t.has("deliveryNext")||(A(()=>{y.value=!1,n?.()}),e())})}else A(()=>{y.value=!1,n?.()})}})},[re,S,H,se,y,_,b,k]),ce=t(()=>c.proposal.negotiated.fields.mustSelectProvidedShippingRate.value??!1),ue=t(()=>Ra({checkout:c})),de=t(()=>mI(w.value.enabledDeliveryMethods??[],ue.value));a(()=>g?.unstable_provideFulfillmentController({getAvailableMethodTypes:()=>de.value,getSelectedMethodTypes:()=>re.value,markBuyerSelection:()=>{v.value=!0,ne.value=!1},applyMethodChange:se,reconcileSameMethod(e){const t=PI(e);p.shipPickupInOneOrderEnabled&&t&&bi({deliveryLines:M,merchandiseLines:O.value,deliveryMethodTypes:t})&&ki(D)}}),[g,de,re,v,ne,se,M,O,p.shipPickupInOneOrderEnabled,D]);const pe=t(()=>{const e=CI(de.value,l,p,Q);return ce.value?e.filter(e=>re.value.includes(e.id)):e}),me=t(()=>{if(ce.value)return pe.value;const e=C.current,t=mI([...w.value.enabledDeliveryMethods??[],...e],ue.value),n=t.length>de.value.length?CI(t,l,p,Q):pe.value;return n.length>
21&&n.forEach(t=>e.add(t.id)),n}),he=r(()=>function({isStockProblems:e,shippingRequired:t,deliveryMethodOptions:n,mustSelectProvidedShippingRate:r,isSplitShipAndPickup:a,initialPickupOnlySelection:i,deliveryNext:o,currentSelectedMethods:s}){if(e)return;if(!t)return;const[l]=n;if(l&&!r&&!a){if(i?.activeMethod){const{activeMethod:e,targetMethod:t}=i;return{nextMethods:[t],previousMethods:["LOCAL"===e?"SHIPPING":e],loadingFields:Qx}}if("filled"!==o?.status)return{nextMethods:[...n.find(e=>JSON.stringify(e)===JSON.stringify(s))??l],loadingFields:Qx}}}({isStockProblems:$,shippingRequired:Pi(c.proposal),deliveryMethodOptions:me.value.map(({value:e})=>e),mustSelectProvidedShippingRate:ce.value,isSplitShipAndPickup:V.value,initialPickupOnlySelection:te,deliveryNext:F.value,currentSelectedMethods:re.value}),[]),ge=m(null!=he);P(()=>{const e=pe.value,t=me.value;if(e===t||t.length<=1)return void(E.current=void 0);const n=JSON.stringify([t.map(({id:e})=>e),e.map(({id:e})=>e)]);E.current!==n&&(E.current=n,u.log("sticky_delivery_method_selector","Showing delivery method selector with previous delivery options because sellability narrowed",{previousOptionCount:t.length,currentOptionCount:e.length}))}),a(()=>{he&&!v.value?le(he.nextMethods,he.previousMethods,()=>{ge.value=!1})?.catch(e=>{A(()=>{y.value=!1,ge.value=!1}),u.error(e)}):ge.value=!1},[]);const fe=yI(n(e=>{const t=me.value.find(t=>t.id===e[0]);t&&(v.value=!0,le(t.value))},[me,le,v])),ye=t(()=>me.value.length<=1),ve=t(()=>{if(!ye.value)return{options:me,selected:re,select:e=>{fe.current(e)},variant:Q?"next":"default"}}),_e=r(()=>({negotiating:y,initialReconciliationPending:ge,methods:re,setSelectedMethodTypes:le}),[y,ge,re,le]);return d(Zx.Provider,{value:_e,children:[d(vI,{}),d(x,{when:V,children:d(pI,{})}),d(eI.Provider,{value:ve.value,children:e})]})}function wI(e){return e.includes("SHIPPING")||e.includes("LOCAL")}function CI(e,t,n,r){const a=[],i="object"==typeof n.translations.delivery_options?n.translations.delivery_options:void 0,o=e.some(([e])=>"PICKUP_POINT"===e),s=e.find(([e])=>"SHIPPING"===e);if(s){const e=Boolean(i?.ship_to_address),n=!o||r&&!e?t.translate("delivery_options.ship"):t.translate("delivery_options.ship_to_address");a.push({id:"SHIPPING",value:s,label:n,icon:r?Xx.PackageDelivery:Xx.Truck})}const l=e.find(([e])=>"PICK_UP"===e);if(l){const e=Boolean(i?.pick_up),n=Boolean(i?.pick_up_from_store),s=o?n:e,c=o?t.translate("delivery_options.pick_up_from_store"):t.translate("delivery_options.pick_up"),u=o?t.translate("delivery_options.pickup_store"):t.translate("delivery_options.pickup");a.push({id:"PICK_UP",value:l,label:r&&!s?u:c,icon:r&&!o?Xx.Location:Xx.Store})}const c=e.find(([e])=>"PICKUP_POINT"===e);if(c){const e=Boolean(i?.pickup_point_method_definition),n=r&&!e?t.translate("delivery_options.pickup_point"):t.translate("delivery_options.pickup_point_method_definition");a.push({id:"PICKUP_POINT",value:c,label:n,icon:Xx.Location})}return a}function EI(){const{i18n:e}=ie();return n((t,n={})=>{const r=new Date(t),a=new Date(Date.now()).getFullYear(),i=n.month??"long",o=r.getFullYear()>a?"numeric":void 0;return e.formatDate(r,{month:i,day:"numeric",year:o})},[e])}function xI(){const{shop:{captureAtFulfillmentEnabled:e},checkout:{negotiator:n}}=ie(),{buyerIdentity:r,paymentFlexibilityPaymentTermsTemplate:a}=n.current.fields;return t(()=>"FULFILLMENT"===a.value?.type&&!0===e&&!r.value?.purchasingCompany)}const II=e=>"target"in e&&"$.availableRedeemables.redeemable"===e.target;function AI(e,t){if(!e||!t)return!1;if(e.redemptionSource!==t.redemptionSource)return!1;if("CUSTOM"===e.redemptionSource)return function(e,t){return!(!e||!t)&&(e?.paymentMethodIdentifier===t?.paymentMethodIdentifier&&function(e,t){return!(!e||!t)&&(e.length===t.length&&e.every(e=>t.some(t=>e.key===t.key&&e.value===t.value)))}(e?.redemptionAttributes,t?.redemptionAttributes))}(e.redemptionContent,t.redemptionContent);throw Error(`Equality method not supported for redemption source ${e.redemptionSource}`)}function TI(e){return e.maskedIdentifier?.slice(-4).toUpperCase()}function LI(e){return e?`â¢â¢â¢â¢ ${e}`:""}
2class NI extends Error{constructor(){super(...arguments),this.name="TooManyRedeemablePaymentMethodsError"}}function RI(){const e=function(){const{checkout:{negotiator:e}}=ie(),n=e.current.fields.paymentMethods;return t(()=>{const e=n.value?.flatMap(e=>"redeemable"===e.type&&"CUSTOM"===e.redemptionSource?[e]:[]);if(void 0!==e&&0!==e.length){if(e.length>1)throw new NI("There can only be a single custom redeemable payment method per redeemable type.\nGift card is currently the only supported redeemable type");return e[0]}})}(),[a,i]=s([]),o=Si("CUSTOM"),l=r(()=>o.value.filter(e=>{const t=a.some(t=>AI(t,e.method)),n=!e.cost||0===e.cost.amount;return!t&&!n&&Boolean(e.method.redemptionContent)}),[o.value,a]),{checkout:{negotiator:c}}=ie(),{negotiate:u}=rc(),d=Boolean(e.value),p=n(e=>{const t=t=>"redeemable"!==t.type||"CUSTOM"!==t.redemptionSource||!AI(e,t),n=c.parts.paymentLines.value;c.parts.paymentLines.value=n.filter(e=>t(e.method));const r=c.parts.availableRedeemables.value;c.parts.availableRedeemables.value=r?.filter(e=>t(e.paymentMethod))},[c]),m=n((e,t)=>{const n=function(e,t){if(!t)return null;if(t.amount<=0)return null;return{method:e.paymentMethod,cost:{amount:OI,currencyCode:t.currencyCode}}}(e,t);if(n){const e=c.parts.paymentLines.value;return c.parts.paymentLines.value=[...e,...n?[n]:[]],new Promise(e=>{u({silenceViolations:Fe(["paymentLines"]),onComplete:t=>{"error"===t.status&&t.violations.some(wi)&&p(n.method),e(t)}})})}return Promise.resolve(null)},[u,c,p]),h=n(e=>{const t=c.parts.paymentLines.value.length;return p(e),i(t=>[...t,e]),t>c.parts.paymentLines.value.length?new Promise(t=>{u({silenceViolations:Fe(["paymentLines"]),onComplete:n=>{i(t=>t.filter(t=>!AI(t,e))),t(n)}})}):Promise.resolve()},[u,c,p]),g=n(()=>{const e=c.parts.paymentLines.value,t=e.length;return c.parts.paymentLines.value=e.filter(e=>{const{method:t}=e;return!("redeemable"===t.type&&"CUSTOM"===t.redemptionSource)}),t>c.parts.paymentLines.value.length?new Promise(e=>{u({silenceViolations:Fe(["paymentLines"]),onComplete:t=>{e(t)}})}):Promise.resolve()},[u,c]);return{canApplyGiftCards:d,paymentMethod:e.value,paymentLines:l,submit:m,remove:h,removeAll:g}}function MI(){const{checkout:{negotiator:e}}=ie(),n=e.current.fields.paymentLines;return t(()=>n.value?.lines.filter(e=>"giftCard"===e.method.type)??[])}function DI(){const e=Si("STORE_CREDIT"),{paymentLines:n}=RI(),r=MI();return t(()=>{const t=Boolean(e.value.length),a=Boolean(n.length),i=Boolean(r.value.length);return t||a||i})}const OI=0;function zI(){const e=Ci(),n=nc(),r=ct(),a=xI(),i=EI(),o=DI(),{shop:s,checkout:l,embed:c,i18n:u,source:d,shopPay:p}=ie(),{orderSummary:m}=vv(),h=s?.name,g=m.totalLabel,f=yr(c?.embedder),y=Ei(p.app.config);return t(()=>{const{currentPage:t,plan:s,currentDetour:c}=n.value,p=l.negotiator.current.fields.deferredTotal.value,m=l.negotiator.current.fields.paymentFlexibilityPaymentTermsTemplate.value,v="COMPACT"===l.configuration.orderSummary?.layoutStyle;let _;_="TOTAL"===g?u.translate("order_summary.total_label"):f?u.translate("universal.iframes.subtotal_label"):"ORDER_TOTAL"===g?u.translate("order_summary.order_total_label"):v&&h&&!y?u.translate("order_summary.pay_merchant_label",{merchant_name:h}):u.translate("order_summary.total_label");const b=f?_:u.translate("order_summary.total_due_label"),k="thankYou"===c?.type,P=p&&p.amount.amount>0;if(e.value&&k)return u.translate("order_summary.deferred_payment_info.paid_today_next");if(Hn(d))return u.translate("order_summary.total_due_label");if(r.value)return u.translate("order_summary.payment_terms_totals.due_later_checkout_to_draft");if(P)return u.translate("order_summary.payment_terms_totals.due_today_next");if(m){if(a.value)return o.value?b:_;if(m?.dueDate){const e=i(m.dueDate,{month:"short"});return u.translate("order_summary.deferred_total_due_date_label_next",{date:e})}return"FULFILLMENT"===m?.type?u.translate("order_summary.payment_terms_totals.due_on_fulfillment_next"):"RECEIPT"===m?.type?u.translate("order_summary.total_due_later_label"):u.translate("order_summary.payment_terms_totals.due_later_checkout_to_draft")}return k?o.value?u.translate("order_summary.total_paid_label"):u.translate("order_summary.partial_total_label"):ub(t,s.greenPath[s.greenPath.length-1])?o.value?b:_:o.value?b:u.translate("order_summary.partial_total_label")})}function BI({children:e,id:t,title:n}){return d("abbr",{className:"_1qifbzv1 _1qifbzv0 _1fragem128",id:t,title:n,children:e})}function VI(){const e=xi(),n=Ii(),{i18n:r,checkout:{negotiator:a}}=ie(),{deferredTotal:i}=a.current.fields,o=Ai(),s=T(_v()),l=DI(),c=T(vv()),u=Tt(),p=t(()=>{const t=o.value,a=e.value;if(!t||!a)return;const d=r.formatCurrency(t.amount,{currency:t.currencyCode,form:"short"}),p=t.amount<a.amount&&!n.value&&!i.value&&!l.value;return{amountDue:t,paymentDueFormatted:d,priceBeforeReductionsFormatted:r.formatCurrency(a.amount,{currency:a.currencyCode,form:"short"}),showCurrencyCode:"base"===c.value.disclosure.style&&s.value&&(!u.value||!d.includes(t.currencyCode)),showSubtotalBeforeReductions:p,totalAmountDueAccessiblityLabel:p?r.translate("order_summary.price_after_discount_aria_text"):r.translate("order_summary.total_price_label")}});return d(x,{when:p,children:({amountDue:e,paymentDueFormatted:t,priceBeforeReductionsFormatted:n,showCurrencyCode:a,showSubtotalBeforeReductions:i,totalAmountDueAccessiblityLabel:o})=>d(Jf,{alignItems:"end",children:[i?d(y,{children:[d(Vf,{accessibilityVisibility:"exclusive",children:r.translate("order_summary.total_price_label")}),d(Vf,{size:"small",color:"subdued",type:"redundant",translate:!1,children:n})]}):null,d(Vf,{accessibilityVisibility:"exclusive",children:o}),d(Jf,{direction:"inline",alignItems:"center",gap:"small-300",children:[a&&d(B
2I,{children:d(Vf,{type:"small",color:"subdued",translate:!1,children:e.currencyCode})}),d(sx,{color:"base",size:"large",translate:!1,children:d(Vf,{type:"strong",children:t})})]})]})})}const FI={"StackedThumbnails-fan":"DiYxd","StackedThumbnails-fan-legacy":"XEYoy","StackedThumbnail-fan":"P6qdf","StackedThumbnail-fan-legacy":"jZNeD","StackedThumbnails-inline":"raPom","StackedThumbnail-inline":"jpkdO","StackedThumbnails-inline-discrete":"md55H"};function UI({variant:e="fan",merchandise:t,size:n,max:r=2,useImageAltTexts:a=!0,useTitleAsAltTextFallback:i=!1,useResponsiveImageSources:o=!1,sortByPrice:s=!1,showQuantityBadges:l=!0}){const c="inline-discrete"===e,u=c&&t.length>r?t.length-r+1:0,p=(s?[...t].sort((e,t)=>qI(t)-qI(e)):t).slice(0,r),m=xw(n);return d("div",{className:FI[`StackedThumbnails-${e}`],style:{"--total":p.length,"--thumbnail-inline-size":ke(m.inlineSize)},children:p.map((t,r)=>{const s=i&&"title"in t?t.title:"",m=u>0&&r===p.length-1,h=l&&c&&!m&&t.quantity>1?t.quantity:void 0;return d("div",{className:FI[`StackedThumbnail-${e}`],style:{"--index":r},children:d(Pw,{src:o&&t.image?t.image.one:t.image?.url,srcSet:o&&t.image?`${t.image.one} 1x, ${t.image.two} 2x, ${t.image.four} 4x`:void 0,size:n,depth:jI(r,e),alt:a?t.image?.altText||s:"",totalItems:h,overlay:m?`+${u}`:void 0})},"stableId"in t?t.stableId:`${r}${t.title}`)})})}function qI(e){return"totalPrice"in e&&e.totalPrice?e.totalPrice.amount:"price"in e&&e.price?e.price.amount:0}function jI(e,t){return"fan"===t?Math.max(0,Math.min(e,2)):"fan-legacy"===t&&e>0?"legacy":void 0}const HI="ik40Z";function $I(){const{disclosure:{style:e}}=vv(),{open:n}=vC(),{i18n:r,checkout:a,source:i}=ie(),o=zI(),s="base"===e,l=t(()=>!n.value),c=a.proposal.facts.merchandiseLines??[],{value:u}=a.negotiator.current.fields.merchandiseLines,p=Hn(i)?c:u?.lines||[],m=d(rh,{type:n.value?"chevron-up":"chevron-down",size:"small-200",display:"inline"});return d(Jf,s?{direction:"inline",justifyContent:"space-between",alignItems:"center",gap:"small-200",padding:"small-300 base",inlineSize:"100%",className:HI,children:[d(x,{when:n,fallback:d(Jf,{direction:"inline",alignItems:"center",gap:"small-200",children:[d("span",{className:Se({screenReaders:"only"}),children:r.translate("order_summary.title")}),d(UI,{variant:"inline",size:"small-200",max:3,merchandise:p,useImageAltTexts:!1}),d(Vf,{size:"large",fonts:"secondary",type:"strong",children:o})]}),children:d(Vf,{color:"subdued",children:r.translate("order_summary.title")})}),d(Jf,{direction:"inline",alignItems:"center",gap:"small-200",children:[d(x,{when:l,children:d(VI,{})}),m]})]}:{direction:"inline",justifyContent:"space-between",alignItems:"center",gap:"small-200",padding:"small-300 base",inlineSize:"100%",className:HI,children:[d(Jf,{direction:"inline",alignItems:"center",gap:"small-200",className:"Tupv7",children:[r.translate("order_summary.title"),m]}),d(VI,{})]})}function YI(){const{checkout:e,embed:n,router:r}=ie();return t(()=>!(!n?.isFlagshipPartner||e.configuration.isUniversalCheckoutFinalizer)&&"/thank-you"===r.currentUrl.value.normalizedPath)}function WI(){const e=YI();return d(x,{when:e,children:d("div",{className:"KwVFv"})})}var GI={PillHint:"_53iem87 _53iem86 _1fragem82 _1fragem9v _1fragempk _1fragemnr _1fragemtg _1fragemrn _1fragem19 _1fragem64 _1fragem11z _1fragem12w",PillHintWrapper:"_53iem8j _1fragempz _1fragemo6 _1fragemtb _1fragemri _1fragem64 _1fragem4q _1fragemzf _1fragem73 _1fragembt",directionVariant:{block:"_53iem8b _53iem88 _1fragem2d",inline:"_53iem8c _53iem89 _1fragem2n",both:"_53iem8d _53iem8a _1fragem2n",none:"_53iem8e"},transitionVariant:{enter:"_53iem80",entering:"_53iem81",entered:"_53iem82",exit:"_53iem83",exiting:"_53iem84",exited:"_53iem85"},iconVariant:{block:"_53iem8f",inline:"_53iem8g",both:"_53iem8h",none:"_53iem8i"}};const JI=({position:e,scrollDirection:t,variant:n})=>{const a=n.content,i=m("none");t&&(t.block&&t.inline?i.value="both":t.block?i.value="block":t.inline&&(i.value="inline"));const o=r(()=>{const t="start"===e?.scrolledTo.block,n="start"===e?.scrolledTo.inline;return"both"===i.value?t&&n:t||n},[e,i.value]),s=Ed(o??!1,o?"base":"fast");return d("div",{className:GI.PillHintWrapper,children:d("div",{className:v(GI.PillHint,GI.directionVariant[i.value],GI.transitionVariant[s]),children:[a,d(rh,{size:"small",type:"block"===i.value?"arrow-down":"arrow-right",className:GI.iconVariant[i.value]})]})})};var KI={ShadowHint:"eqnwop7 eqnwop6 _1fragemwi _1fragem11k",positionVariant:{inlineStart:"eqnwop8",inlineEnd:"eqnwop9",blockStart:"eqnwopa",blockEnd:"eqnwopb"},transitionVariant:{enter:"eqnwop0",entering:"eqnwop1",entered:"eqnwop2",exit:"eqnwop3",exiting:"eqnwop4",exited:"eqnwop5"}};const QI=({position:e,scrollDirection:t})=>{const n=Ed((t?.block&&"start"!==e?.scrolledTo.block)??!1,"base"),r=Ed((t?.block&&"end"!==e?.scrolledTo.block)??!1,"base"),a=Ed((t?.inline&&"start"!==e?.scrolledTo.inline)??!1,"base"),i=Ed((t?.inline&&"end"!==e?.scrolledTo.inline)??!1,"base");return d(y,{children:[{name:"blockStart",transition:n},{name:"blockEnd",transition:r},{name:"inlineStart",transition:a},{name:"inlineEnd",transition:i}].map(({name:e,transition:t})=>d("div",{className:v(KI.ShadowHint,KI.positionVariant[e],KI.transitionVariant[t])},e))})},XI=new class{constructor(){this.dimensions=S(null),this.container=null,this.resizeObserver=null,this.initialized=!1}getDimensionsSignal(){return this.initialize(),this.dimensions}cleanup(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null),this.container&&this.container.parentNode&&(this.container.parentNode.removeChild(this.container),this.container=null),this.initialized=!1,this.dimensions.value=null}initialize(){if(this.initialized)return;if("undefined"==typeof window||"undefined"==typeof document)return;if(!window.ResizeObserver)return;this.initialized=!0,this.container=document.createElement("div"),this.container.style.cssText="\n position: fixed;\n top: -9999px;\n left: -9999px;\n visibility: hidden;\n pointer-events: none;\n ",this.container.innerHTML='\n <div class="scrollbar-inline-tester" style="width: 100px; height: 100px;
2 overflow-y: scroll;">\n <div style="height: 200px;"></div>\n </div>\n <div class="scrollbar-block-tester" style="width: 100px; height: 100px; overflow-x: scroll;">\n <div style="width: 200px;"></div>\n </div>\n ',document.body.appendChild(this.container);const e=this.container.querySelector(".scrollbar-inline-tester"),t=this.container.querySelector(".scrollbar-block-tester"),n=()=>{this.dimensions.value={inline:e.offsetWidth-e.clientWidth,block:t.offsetHeight-t.clientHeight}};n(),this.resizeObserver=new ResizeObserver(n),this.resizeObserver.observe(t),this.resizeObserver.observe(e)}},ZI=(e,t)=>e?"start":t?"end":null;var eA="_1b9t7ypn _1b9t7ypj _1fragemel",tA="_1b9t7ypo _1b9t7ypk _1fragemf5",nA="_1b9t7ypp _1b9t7ypl _1fragemdh",rA="_1b9t7ypq _1b9t7ypm _1frageme1",aA="_1b9t7yp8",iA="_1b9t7yp9";const oA=Ym(Md(function({accessibilityActiveDescendant:e,accessibilityLabel:a,accessibilityRole:o="generic",accessibilityVisibility:s="visible",background:c="transparent",backgroundHoverAndFocus:u,bleed:p="none",blockSize:h="auto",border:g="none",borderColor:f,borderRadius:_="none",borderStyle:b,borderWidth:k,children:P,className:S,display:w="auto",hint:C={type:"shadow"},id:E,inlineSize:x="auto",maxBlockSize:I="none",maxInlineSize:A="none",minBlockSize:T="0",minInlineSize:L="0",onScroll:N,onScrollable:R,onScrolledToEdge:M,overflow:D="auto",padding:O="none",paddingBlock:z,paddingBlockEnd:B,paddingBlockStart:V,paddingInline:F,paddingInlineEnd:U,paddingInlineStart:q,scrollbarWidth:j="auto",scrollTo:H}){const{Element:$,role:Y}=Km(o),{className:W,style:G,styleElement:J}=Um({backgroundColor:c,backgroundColorHoverAndFocus:u,blockSize:h,...Ne({border:g,borderColor:f,borderStyle:b,borderWidth:k}
2),borderRadius:_,display:w,inlineSize:x,maxBlockSize:I,maxInlineSize:A,minBlockSize:T,minInlineSize:L},{transforms:{display:yd}}),{className:K,style:Q,styleElement:X}=Um({overflow:D,padding:O,paddingBlock:z,paddingInline:F,paddingBlockEnd:B,paddingBlockStart:V,paddingInlineEnd:U,paddingInlineStart:q}),Z=i(null),[ee,te=ee]=D.trim().split(/\s+/),ne=r(()=>({inline:"auto"===te,block:"auto"===ee}),[te,ee]),{scrollPosition:re,scrollDirection:ae,scrollbarVisible:ie,scrollbarDimensions:oe}=((e,a,i,o,s,c)=>{const u=m(null),d=m(null),p=t(()=>{const e=XI.getDimensionsSignal().value;return e&&d.value?i?{inline:d.value.block?e.inline:0,block:d.value.inline?e.block:0}:{inline:0,block:0}:null}),h=t(()=>p.value?{inline:p.value.inline>0,block:p.value.block>0}:null),g=r(()=>qp(()=>{const t=e.current;if(!t)return;const n=u.value,r=d.value;var i,l;d.value=((e,t)=>{const n=e.scrollWidth>e.clientWidth,r=e.scrollHeight>e.clientHeight;return{inline:n&&t.inline,block:r&&t.block}})(t,a),u.value=((e,t)=>{const n=0===e.scrollLeft,r=0===e.scrollTop,a=Math.abs(e.scrollLeft),i=Math.abs(a+e.clientWidth-e.scrollWidth)<1,o=Math.abs(e.scrollTop+e.clientHeight-e.scrollHeight)<1;return{position:{inline:a,block:e.scrollTop},scrolledTo:{inline:t.inline?ZI(n,i):null,block:t.block?ZI(r,o):null}}})(t,d.value),"function"==typeof o&&o(u.value),s&&"function"==typeof s&&(i=r,l=d.value,i?.inline!==l.inline||i?.block!==l.block)&&s(d.value),c&&"function"==typeof c&&((e,t)=>{if(!e)return!1;const n=e.scrolledTo.inline!==t.scrolledTo.inline&&null!==t.scrolledTo.inline,r=e.scrolledTo.block!==t.scrolledTo.block&&null!==t.scrolledTo.block;return n||r})(n,u.value)&&c(u.value)},50),[a,o,s,c,d,u,e]),f=n(()=>{g()},[g]);return l(()=>{const t=e.current;if(!t||!("onscroll"in t))return;let n;f(),t.addEventListener("scroll",f,{passive:!0}),t.addEventListener("load",f,!0),t.addEventListener("transitionend",f),t.addEventListener("animationend",f);const r=new Set,a=()=>{if(!n)return;const e=new Set(t.children);for(const t of r)e.has(t)||(n.unobserve(t),r.delete(t));for(const t of e)r.has(t)||(n.observe(t),r.add(t))};window.ResizeObserver?(n=new ResizeObserver(f),n.observe(t),a()):window.addEventListener("resize",f);const i=window.MutationObserver?new window.MutationObserver(()=>{a(),f()}):void 0;return i?.observe(t,{attributes:!n,characterData:!0,childList:!0,subtree:!0}),()=>{n?.disconnect(),i?.disconnect(),t.removeEventListener("scroll",f),window.removeEventListener("resize",f),t.removeEventListener("load",f,!0),t.removeEventListener("transitionend",f),t.removeEventListener("animationend",f)}},[e,f]),{scrollPosition:u.value,scrollDirection:d.value,scrollbarDimensions:p.value,scrollbarVisible:h.value}})(Z,ne,"auto"===j,N,R,M),se="listbox"===o||ae?.inline||ae?.block,le=v(ae?.block&&"start"!==re?.scrolledTo.block&&eA,ae?.block&&"end"!==re?.scrolledTo.block&&!ie?.block&&tA,ae?.inline&&"start"!==re?.scrolledTo.inline&&nA,ae?.inline&&"end"!==re?.scrolledTo.inline&&!ie?.inline&&rA),ce=v("none"!==p&&ae?.block&&"start"!==re?.scrolledTo.block&&aA,"none"!==p&&ae?.block&&"end"!==re?.scrolledTo.block&&!ie?.block&&iA);return l(()=>{if(!H||!Z.current)return;const e="smooth",t=Z.current;if(H instanceof HTMLElement)return void H.scrollIntoView({behavior:e,block:"start",inline:"start"});const n="rtl"===document.dir,r={block:H.block??0,inline:(H.inline??0)*(n?-1:1)};t.scrollTo({behavior:e,top:r.block,left:r.inline})},[H]),d(y,{children:[J,X,d("div",{"aria-hidden":"hidden"===s||void 0,className:v("_1b9t7yp2 _1b9t7yp1 _1fragemup _1fragemv4 _1fragemws _1fragem64",W,"exclusive"===s&&"_1b9t7yph _1fragem121","product-thumbnails"===p&&"_1b9t7ypa","product-thumbnails-with-badge"===p&&"_1b9t7ypd",ce),style:G,children:[d($,{id:E,role:Y,"aria-activedescendant":e,"aria-label":a,className:v("_1b9t7yp0","none"===j&&"_1b9t7ypi",K,S,"product-thumbnails"===p&&"_1b9t7ypc _1b9t7ypb","product-thumbnails-with-badge"===p&&"_1b9t7ype _1b9t7ypb"),tabIndex:se?0:void 0,style:Q,ref:Z,children:P}),d("div",{className:v("_1b9t7ypg _1b9t7ypf _1fragem108 _1fragem10n _1fragemzt _1fragem112 _1fragemwi _1fragem11z _1fragem12w",le),"aria-hidden":"true",role:"presentation",style:{marginInlineEnd:oe?.inline,marginBlockEnd:oe?.block},children:["pill"===C?.type&&d(JI,{variant:C,scrollDirection:ae,position:re,scrollbarVisible:"auto"===j}),"shadow"===C?.type&&d(QI,{variant:C,scrollDirection:ae,position:re,scrollbarVisible:"auto"===j})]})]})]})}));var sA="go06b0";const lA=/<table[\s>]/i;function cA(e){if("undefined"==typeof DOMParser||!lA.test(e))return null;const{body:t}=(new DOMParser).parseFromString(e,"text/html");return t.querySelector("table")?uA(t.childNodes,!1):null}function uA(e,t){const n=[];for(const[r,a]of Array.from(e).entries()){if(a.nodeType===Node.TEXT_NODE){n.push(a.textContent);continue}if(a.nodeType!==Node.ELEMENT_NODE)continue;const e=a,i=e.tagName.toLowerCase(),o={key:r};for(const t of Array.from(e.attributes))o[t.name]=t.value;const s=e.childNodes.length?uA(e.childNodes,t||"table"===i):void 0,l=j(i,o,s);"table"!==i||t?n.push(l):n.push(d(oA,{overflow:"hidden auto",className:"go06b1",children:l},r))}return n}function dA({dangerouslySetInnerHTML:e,scrollableContent:t="none",children:n}){const a=wd()?"span":"div",i=e?.__html,o=r(()=>"all"===t&&null!=i?cA(i):null,[t,i]);return"string"==typeof n?d(y,{children:n.split("\n").map((e,t)=>d(y,{children:[t>0&&d("br",{}),e]},`content-${t}}`))}):d(a,o?{className:sA,children:o}:{dangerouslySetInnerHTML:e,className:sA,children:n})}const pA=f(null);function mA(e){return`error-for-${e}`}pA.displayName="SelectContext";function hA({children:e,controlID:t,type:n}){return"warning"===n?d(Qm,{id:t?mA(t):void 0,gridAutoFlow:"column",gridTemplateColumns:"minmax(auto, max-content) minmax(0, 1fr)",gridTemplateRows:"minmax(0, 1fr)",gap:"small-300",children:[d("div",{className:"ksaxnz1 _1fragem19 _1fragemcn _1fragem4v _1fragem6t",children:d(rh,{type:"info"})}),d(Vf,{children:e})]}):d("div",{className:"ksaxnz0 _1fragemxr",id:t?mA(t):void 0,children:e})}function gA(e,t=" "){return e.filter(e=>null!=e&&!1!==e&&""!==e&&0!==e&&"function"!=typeof e&&"symbol"!=typeof e&&"bigint"!=typeof e&&"object"!=typeof e).join(t)}function fA({children:e}){return d("span",{className:v("rermvf1 rermvf0 _1fragemup _1fragemv4 _1fragem5u _1fragem12y"),children:e})}var yA={floating:"xpgeoa0",positionVariant:{inside:"xpgeoa3 xpgeoa1 _1fragemwi _1fragem11z _1fragem12j _1fragem12e _1fragem12t _1fragem12w _1fragem12z",outside:"xpgeoa4 xpgeoa2 _1fragem5u"},Text:"xpgeoa5",visuallyHidden:"xpgeoa6 _1fragem121"};function vA({htmlFor:e,label:t,variant:n,className:r}){return d("label",{id:`${e}-label`,htmlFor:e,className:v(yA.positionVariant[n],r),children:d("span",{className:yA.Text,children:d(fA,{children:t})})})}const _A={FormLayout:"fjTgn",FormLayoutGroup:"fa7nz",SpacingSmall100:"RV2tT",SpacingBase:"wOVuC",FormLayoutConnected:"_9Mesh",Connectable:"_2g0rh",NotConnectable:"tgYPK",HasErrorOrWarning:"iKgeO"};var bA={Accessory:"_7ozb2u1m _7ozb2u1l _1fragemws _1fragem2d _1fragemyb",accessoryPositionEnd:"_7ozb2u1o",accessoryPositionStart:"_7ozb2u1n",ActualInput:"_7ozb2ur",Field:"_7ozb2uq _7ozb2up _1fragemws _1fragemzf _1fragem11y _1fragem12u _1fragem12b",fieldInsetEnd:"_7ozb2u3",fieldInsetStart:"_7ozb2u2",fieldLabelInside:"_7ozb2uv _7ozb2uu _1fragem12j _1fragem12e _1fragem12t",fieldLetterCaseVariant:{uppercase:"_7ozb2u1q"},fieldMultiline:"_7ozb2u13",fieldPrefixed:"_7ozb2uz _7ozb2uy _1fragem12o",fieldPrefixSpacing:{small:"_7ozb2u10",base:"_7ozb2u11"},fieldTypeVariant:{number:"_7ozb2u14",tel:"_7ozb2u15",text:"_7ozb2u16",email:"_7ozb2u17",url:"_7ozb2u18",password:"_7ozb2u19"},FieldWrapper:"_7ozb2un",fieldWrapperMultiline:"_7ozb2uo",floatingLabelOnContent:"_7ozb2us",floatingLabelOnFocus:"_7ozb2ut",Icon:"_7ozb2u1d _7ozb2u1c _1fragemws _1fragem2d",iconPositionVariant:{start:"_7ozb2u1e",end:"_7ozb2u1f"},MultilineClone:"_7ozb2u1b _7ozb2u1a _1fragem6y",Prefix:"_7ozb2u1h _7ozb2u1g _1fragemws _1fragem2d",prefixInside:"_7ozb2u1i",segmentVariant:{start:"_7ozb2u0",end:"_7ozb2u1"}
2,setFieldLabelIsNotVisible:"_7ozb2u12",Suffix:"_7ozb2u1k _7ozb2u1j _1fragemws _1fragem2d",TextField:"_7ozb2ub _7ozb2ua _1fragemyl _1fragemws _1fragem6t _1fragem133 _1fragemye _1fragem12j _1fragem12d _1fragem12q",textFieldBorderVariant:{none:"_7ozb2uk",full:"_7ozb2ul",blockEnd:"_7ozb2um"},textFieldColorLayerVariant:{control:"_7ozb2ue _7ozb2uc _1fragemy6",controlInvalid:"_7ozb2uf _7ozb2ud _1fragemy7"},textFieldDisabled:"_7ozb2uh _7ozb2ug _1fragemyc _1fragem11z _1fragem11v",textFieldError:"_7ozb2u8",textFieldFocused:"_7ozb2u9",textFieldReadOnly:"_7ozb2uj _7ozb2ui _1fragem11w",withTypography:"_7ozb2u1p",Wrapper:"_7ozb2u5 _7ozb2u4 _1fragem7s _1fragem9l _1fragemws _1fragem6t",wrapperLabelInside:"_7ozb2u7 _7ozb2u6 _1fragemy6",wrapperVarsSetter:{labelInside:"_10vrn9p1 _10vrn9p0",labelOutside:"_10vrn9p2 _10vrn9p0"},inert:"_7ozb2u1r _1fragemz0"};const kA=jc("TextField"),PA={"data-1p-ignore":!0,"data-lpignore":"true","data-bwignore":"true","data-form-type":"other"},SA=_(function({accessibilityDescription:e,accessoryEnd:t,accessoryStart:r,ariaActiveDescendant:a,ariaAutocomplete:o,ariaControls:l,ariaExpanded:c,ariaHasPopup:u,ariaLabel:p,ariaLive:m,ariaOwns:h,autoCapitalize:g,autocomplete:f="on",autoCorrect:_,autoFocus:b,controlledValue:k,defaultValue:P,disabled:S,error:w,icon:C,id:E,disablePasswordManagers:x,inputMode:I,label:A,labelAccessibilityVisibility:T="visible",labelPosition:L,labelWhenEmpty:N,letterCase:R,max:M,maxLength:D,min:O,minLength:z,name:B,onBlur:V,onChange:F,onFocus:U,onInput:q,onInputCommit:j,onKeyDown:H,onWheel:$,placeholder:Y,prefix:W,prefixSpacing:G="base",readOnly:J,required:K,role:Q,rows:X,segment:Z,step:ee,suffix:te,type:ne="text",value:re},ae){const{control:{border:ie,labelPosition:oe="inside"},textField:{border:se}}=$m(),le=se||ie||"full",ce=L??oe,ue=Pd(),de=null==re?void 0:re,pe=null==k?void 0:k,me=Hc(E,kA),he=e?`${me}-description`:void 0,ge=he?d(Vf,{accessibilityVisibility:"exclusive",id:he,children:e}):null,[fe,ye]=s(!1),[ve,_e]=function(e){const t=function(e){if(null!=e){if("object"==typeof e&&"value"in e){if(null==e.value)return;return String(e.value)}return String(e)}}(e),[n,r]=s(t),a=i(t),o=i(e);let l=n;return a.current!==t&&(a.current=t,r(t),l=t),"object"==typeof e&&o.current!==e&&r(t),o.current=e,[l,r]}(pe??de),be=n(e=>{q?.(e),_e(e)},[q,_e]),ke=function(e,t){if("boolean"!=typeof e)return void 0!==e&&Boolean(e)?d(hA,{controlID:t,type:"warning"===EA(e)?"warning":void 0,children:e&&"object"==typeof e&&"value"in e?e?.value:e}):null}(w,me),Pe=Boolean(w)&&"warning"!==EA(w),Se=v(bA.TextField,bA.textFieldColorLayerVariant[Pe?"controlInvalid":"control"],bA.textFieldBorderVariant[le],(S||ue)&&bA.textFieldDisabled,ue&&bA.inert,J&&bA.textFieldReadOnly,fe&&bA.textFieldFocused,Pe&&bA.textFieldError,Z&&bA.segmentVariant[Z]),we=A&&"visible"===T;let Ce=bA.floatingLabelOnContent;"outside"===ce?Ce=yA.floating:W&&(Ce=bA.floatingLabelOnFocus);const Ee="outside"!==ce&&!X&&"full"===le,xe=Ee&&Boolean(w);return d(y,{children:d("div",{className:v(bA.Wrapper,bA.wrapperVarsSetter["outside"===ce?"labelOutside":"labelInside"],"inside"===ce&&bA.textFieldColorLayerVariant[w?"controlInvalid":"control"],"inside"===ce&&bA.wrapperLabelInside,we&&Ce,Ee?_A.Connectable:_A.NotConnectable,xe&&_A.HasErrorOrWarning),children:[we&&"outside"===ce&&d(vA,{variant:"outside",htmlFor:me,label:A}),A&&"exclusive"===T&&d("label",{id:`${me}-label`,htmlFor:me,className:yA.visuallyHidden,children:A}),d("div",{className:Se,children:[ge,we&&"inside"===ce&&d(vA,{variant:"inside",htmlFor:me,label:A}),d(CA,{accessibilityDescription:e,accessoryEnd:t,accessoryStart:r,ariaActiveDescendant:a,ariaAutocomplete:o,ariaControls:l,ariaDescribedBy:he,ariaExpanded:c,ariaHasPopup:u,ariaLabel:p,ariaLive:m,ariaOwns:h,autoCapitalize:g,autocomplete:f,autoCorrect:_,autoFocus:b,controlledValue:k,defaultValue:P,disabled:S,error:w,icon:C,id:me,disablePasswordManagers:x,inputMode:I,label:A,labelAccessibilityVisibility:T,labelPosition:ce,labelWhenEmpty:N,letterCase:R,localValue:ve,max:M,maxLength:D,min:O,minLength:z,name:B,onBlur:()=>{ye(!1),V?.()},onChange:F,onFocus:()=>{ye(!0),U?.()},onInput:be,onInputCommit:j,onKeyDown:H??function(e){void 0===X&&F&&"Enter"===e.key&&F(e.currentTarget.value)},onWheel:$,placeholder:Y,prefix:W,prefixSpacing:G,readOnly:J,ref:
2ae,required:K,role:Q,rows:X,step:ee,suffix:te,type:ne,value:re})]}),ke]})})}),wA=SA,CA=_(function({accessoryEnd:e,accessoryStart:t,ariaActiveDescendant:r,ariaAutocomplete:o,ariaControls:s,ariaDescribedBy:l,ariaExpanded:c,ariaHasPopup:u,ariaLabel:p,ariaLive:m,ariaOwns:h,autoCapitalize:g,autocomplete:f,autoCorrect:_,autoFocus:b,disabled:k,labelWhenEmpty:P,error:S,icon:w,id:C,disablePasswordManagers:E,inputMode:x,label:I,labelAccessibilityVisibility:A,labelPosition:T,letterCase:L,localValue:N,max:R,maxLength:M,min:D,minLength:O,name:z,onBlur:B,onChange:V,onFocus:F,onInput:U,onInputCommit:q,onKeyDown:H,onWheel:$,placeholder:Y,prefix:W,prefixSpacing:G,readOnly:J,required:K,role:Q,rows:X,step:Z,suffix:ee,type:te,value:ne},re){const ae=Sf({active:Boolean(S)&&Boolean("warning"!==EA(S))}),ie=i(),oe=n(e=>{"function"==typeof re?re(e):re&&(re.current=e),ie.current=e,ae.current=e,e&&(N?e.value!==N:e.value!==(ne??""))&&e.dispatchEvent(new Event("input"))},[re,ae]),se=vf(),le=bd(),ce=Pd();a(()=>{b&&!ce&&ie.current?.focus()},[b,ce]);const{control:{labelPosition:ue="inside"}}=$m(),de=T??ue,pe="object"==typeof w?w.source:w,me="object"==typeof w?w.position??"start":"start",he=""!==pe&&pe&&d("div",{className:v(bA.Icon,bA.iconPositionVariant[me]),"aria-hidden":"true",onClick:()=>ie.current?.focus(),children:d(rh,{type:pe})}),ge=I&&"visible"===A,fe="email"===te||f?.split(/\s+/).includes("email"),ye=Boolean(fe)||"tel"===te||"number"===te,ve=(!te||"text"===te)&&Boolean(N);let _e;_e=ye?"ltr":ve?"auto":void 0;const be=W&&d("div",{id:`${C}-prefix`,className:v(bA.Prefix,bA.withTypography,ge&&"inside"===de&&bA.prefixInside),"aria-hidden":"true",onClick:()=>ie.current?.focus(),children:W}),ke=v(bA.Field,"inside"===de&&bA.fieldLabelInside,Boolean(W)&&bA.fieldPrefixed,Boolean(G)&&bA.fieldPrefixSpacing[G],Boolean(!ge)&&bA.setFieldLabelIsNotVisible,Boolean(W||t||he&&"start"===me)&&bA.fieldInsetStart,Boolean(ee||e||he&&"end"===me)&&bA.fieldInsetEnd,Boolean(X)&&bA.fieldMultiline,L&&bA.fieldLetterCaseVariant[L],te&&bA.fieldTypeVariant[te],bA.withTypography),Pe=l||S?gA([l,S&&mA(C)]):void 0,Se=x??("number"===te?"decimal":void 0),we=W?` ${C}-prefix`:"",Ce=ee?` ${C}-suffix`:"";let Ee;"outside"===de?Ee=Y:"visible"===A&&(Ee=P??I);const xe=j(X?"textarea":"input",{...E?PA:void 0,id:C,min:D,max:R,step:Z,maxLength:M,minLength:O,name:z,placeholder:Ee,className:v(ke,bA.ActualInput),required:K,type:X?void 0:te,disabled:k,readOnly:J,inputMode:Se,"aria-activedescendant":r,"aria-autocomplete":o,"aria-controls":s,"aria-owns":h,"aria-describedby":Pe,"aria-expanded":c,"aria-hidden":!!ce||void 0,"aria-invalid":Boolean(S)&&"warning"!==EA(S)?"true":void 0,"aria-label":p,"aria-live":m,"aria-required":K,"aria-labelledby":I?`${C}-label${we}${Ce}`:void 0,"aria-haspopup":u,onBlur:({currentTarget:{value:e}})=>{se.current&&(e!==(ne||"")&&V?.(e),B?.())},onChange(e){const{currentTarget:{value:t}}=e,n=e.nativeEvent??e,{isTrusted:r}=n,a="inputType"in n?n.inputType:void 0;"insertCompositionText"!==a&&"deleteCompositionText"!==a&&q?.(t),r&&a||V?.(t),U?.(t)},onFocus:()=>{F?.()},onKeyDown:H,onWheel:$,ref:oe,role:Q,rows:X,value:N??"",autoComplete:f,autoFocus:b&&!ce,form:le?.nested?le.id:void 0,tabIndex:ce?-1:void 0,autoCorrect:_,autoCapitalize:g,dir:_e}),Ie=!0===Boolean(X)&&d("div",{"aria-hidden":"true",className:v(bA.MultilineClone,ke),dir:_e,children:[N," "]}),Ae=v(bA.FieldWrapper,Boolean(X)&&bA.fieldWrapperMultiline),Te=X?d("div",{className:Ae,children:[xe,Ie]}):xe,Le=ee&&d("div",{id:`${C}-suffix`,className:v(bA.Suffix,bA.withTypography),"aria-hidden":"true",onClick:()=>ie.current?.focus(),children:ee}),Ne=t&&d("div",{className:v(bA.Accessory,bA.accessoryPositionStart),children:t}),Re=e&&d("div",{className:v(bA.Accessory,bA.accessoryPositionEnd),children:e});return d(y,{children:[he,be,Te,Ne,Le,Re]})});function EA(e){if(e&&"object"==typeof e&&"type"in e)return e.type}var xA={labelInside:"_10vrn9p1 _10vrn9p0",labelOutside:"_10vrn9p2 _10vrn9p0"},IA={Select:"_1k3449n0 _1fragem133 _1fragemyl",selectColorLayerVariant:{control:"_1k3449n3 _1k3449n1 _1fragemy6",controlInvalid:"_1k3449n4 _1k3449n2 _1fragemy7"},inert:"_1k3449n5 _1fragemz0"};const AA={Wrapper:"RD23h",SelectWrapper:"VZudx","Label-positionInside":"QCxaD",LabelText:"XDBWz","Label-isFloating":"A9HkF",Select:"ZHJU6","Label-positionOutside":"D67WW","Select-borderNone":"VQDv5",hasError:"_87H7J","Select-borderFull":"IWR5K","Select-borderBlockEnd":"ADBGS","Select-isDisabled":"_9yhqJ",Selector:"VXrUd","Select-backgroundBase":"oAlPg","Select-isReadOnly":"eSQ74"},TA=jc("Select");function LA({children:e,id:t,name:a,label:i,value:o="",disabled:l,readOnly:c,required:u,error:p,autocomplete:m="on",placeholder:h,onChange:g,onBlur:f,onF
2ocus:_}){const b=bd(),{control:{border:k,labelPosition:P="inside"},select:{border:S}}=$m(),w=Pd(),C=Sf({active:Boolean(p)&&Boolean("warning"!==EA(p))}),E=Hc(t,TA),x=S||k||"full",I=void 0!==p&&Boolean(p)&&d(hA,{controlID:E,type:"warning"===EA(p)?"warning":void 0,children:p&&"object"==typeof p&&"value"in p?p?.value:p}),A=Boolean(p)&&"warning"!==EA(p),T=v(AA.Select,IA.Select,A&&AA.hasError,(l||w)&&AA["Select-isDisabled"],w&&IA.inert,c&&AA["Select-isReadOnly"],AA[H("Select-border",x)]),[L,N]=s(0),R=Boolean(L),M=Boolean(h&&h!==i)||R,D=""!==o||M,O=d("label",{className:v(AA.Label,AA[H("Label-position",P)],D&&AA["Label-isFloating"]),htmlFor:E,children:d("span",{className:v(AA.LabelText),children:d(fA,{children:i})})}),z=n(()=>{N(e=>e+1)},[]),B=n(()=>{N(e=>e-1)},[]),V=r(()=>({readOnly:c,registerEmptyValueOption:z,unregisterEmptyValueOption:B}),[c,z,B]),F=d("div",{children:["outside"===P?O:null,d("div",{className:v(AA.SelectWrapper,IA.selectColorLayerVariant[A?"controlInvalid":"control"]),children:["inside"===P&&O,d(pA.Provider,{value:V,children:d("select",{name:a,id:E,disabled:l,onChange:e=>{const t=e.target.value;g?.(t)},required:u,value:o,className:T,"aria-describedby":p?mA(E):void 0,"aria-invalid":p&&"warning"!==EA(p)?"true":void 0,"aria-hidden":!!w||void 0,autoComplete:m,tabIndex:w?-1:void 0,ref:C,onBlur:()=>{f?.()},onFocus:()=>{_?.()},form:b?.nested?b.id:void 0,children:[h&&(U=o,""===U||null==U||h!==i)&&d("option",{value:"",hidden:h===i,disabled:!0,children:h===i?d(y,{children:"Â "}):h}),e]})}),d("div",{className:v(AA.Selector),children:d(rh,{type:"chevronDown",size:"small-200"})})]})]});var U;const q="outside"!==P&&"full"===x,j=q&&Boolean(p);return d(y,{children:d("div",{className:v(AA.Wrapper,"inside"===P&&IA.selectColorLayerVariant[A?"controlInvalid":"control"],xA["outside"===P?"labelOutside":"labelInside"],q?_A.Connectable:_A.NotConnectable,j&&_A.HasErrorOrWarning),children:[F,I]})})}function NA({children:e,id:t,value:n,disabled:r,alternateValues:a,accessibilityLabel:i}){const o=h(pA),{registerEmptyValueOption:s,unregisterEmptyValueOption:c}=o??{},u=""===n;return l(()=>{if(u&&s&&c)return s(),()=>{c()}},[u,s,c]),o?d("option",{id:t,value:n,disabled:r||o.readOnly,...a?.length&&{"data-alternate-values":JSON.stringify(a)},"aria-label":i,children:e}):(console.warn(`Unable to render Option (id: ${t}). Please verify it is a child of a Select.`),null)}var RA={PressButton:"_1n78kje1 _1n78kje0 _1fragemk5 _1fragemjl _1fragemkp _1fragemj1 _1fragemm8 _1fragemlo _1fragemms _1frageml4 _1fragempf _1fragemr8 _1fragemnm _1fragemt1 _1fragem1y _1fragemws _1fragemyd _1fragem126 _1fragem128 _1fragem12n _1fragem12d _1fragem12p _1fragem6o _1fragemcn _1fragem11y _1fragem12u _1fragem12v",loading:"_1n78kje2 _1fragemyb _1fragem11z",disabled:"_1n78kje3 _1fragemyb _1fragem11z _1fragem11v",pressed:"_1n78kje4",inert:"_1n78kje5 _1fragemz0",inlineSizeVariant:{fill:"_1n78kje8 _1n78kje6 _1fragemzf _1fragem124 _1fragembj",fitContent:"_1n78kje9 _1n78kje7 _1fragemzg _1fragem124"},Content:"_1n78kjeh _1n78kjeg _1fragem11z _1fragem12j _1fragem12d _1fragem12q",LoadingContent:"_1n78kjej _1n78kjei _1fragem12j _1fragem12d _1fragem12q _1fragem64 _1fragem19",transitionVariant:{entered:"_1n78kjea",exit:"_1n78kjeb",exiting:"_1n78kjec",enter:"_1n78kjed",entering:"_1n78kjee",exited:"_1n78kjef"}};const MA=_(function({accessibilityLabel:e,id:t,children:n,inlineSize:r="auto",lang:a,loading:i,disabled:o=!1,pressed:s=!1,onClick:l,onBlur:c,onFocus:u},p){const m=Np(p),h=Pd(),g="auto"===r?"fit-content":r,f=Ju(),y=Ed(i??!1,{enter:"slow"}),_=d("span",{className:v(RA.LoadingContent),dir:"auto",children:d(Df,{accessibilityLabel:f("processing")})}),b=mw(n)&&d("span",{className:v(RA.Content),"aria-hidden":i||void 0,children:n});return d(Sd.Provider,{value:!0,children:d("button",{type:"button",id:t,"aria-pressed":s,"aria-busy":i,"aria-label":i?void 0:e,"aria-live":i?"polite":"off","aria-hidden":!!h||void 0,lang:a,onClick:e=>{e?.preventDefault(),l?.(!s)},onBlur:c,onFocus:u,className:v(RA.PressButton,RA.inlineSizeVariant[Pe(g)],s&&RA.pressed,(o||h)&&RA.disabled,h&&RA.inert,i&&[RA.loading,RA.transitionVariant[y]]),disabled:o||i,tabIndex:h?-1:void 0,ref:m,children:[b,i&&_]})})}),DA={small:"35%",base:"50%",large:"65%",fill:"100%"};function OA({content:e,delay:t,id:n,lastLineSize:a,lines:i=1,size:o}){const s=r(()=>function(){const e=Object.keys(DA);return e[Math.floor(Math.random()*e.length)]}(),[]);return d(sx,{id:n,size:o,textAlign:"justify",children:e?d(Rw,{delay:t,children:e}):Array.from({length:i},(e,n)=>
2d(Rw,{delay:t,inlineSize:DA[n===i-1?a??(1===i?"fill":s):"fill"]},n))})}const zA=new Set(["http:","https:"]);function BA({children:e}){const t=function(){const{checkout:{configuration:{isWindowOpenDelegationEnabled:e}},embed:t,observability:r}=ie(),a=n(e=>{const n=e.target?.closest?.("a");if(!n)return;const a=n.href;let i;try{i=new URL(a).protocol}catch{return}if(!zA.has(i))return;const o=n.getAttribute("href");o?.startsWith("#")||t?.client?.windowOpenRequest&&(e.preventDefault(),t.client.windowOpenRequest(a).catch(e=>{r.log("window_open_delegation_error","Window open delegation failed in delegated HTML content",{url:a,error:e instanceof Error?e.message:String(e)})}))},[t,r]);if(e)return a}();return t?d("div",{onClick:t,children:e}):d(y,{children:e})}const VA={id:"63eae86e190df32a164601cf96e105e3a69712d555a3abd3ab6d36cde520673e",type:"query",name:"MerchantPolicies",source:""},FA={id:"1263e051dbbb958a67fe45f4acca32965cf3cea185a1b71afe5ebdb65c4f4160",type:"query",name:"RemoteMerchantPolicies",source:""},UA=c_(({graphql:{coreGraphql:e},observability:t,shop:n},{checkoutProtocolModalEventSignal:r,defaultPolicy:a,policies:i})=>{const o=Ti(i),s=k(()=>Object.values(o));function l(e){return Array.from(o[e]?.policies.values()??[])}function c(){return o[a.shopId]?.policies.get(a.handle)??i[0]??a}const u=S(!1),d=S(!1),p=S(c()),m=k(()=>l(p.value.shopId)),h=k(()=>p.value.shopId),g=k(()=>p.value.sessionToken??""),f=k(()=>n.id===h.value),y=e.query(VA,{variables:()=>({handle:p.value.handle}),skip:()=>!f.value||!u.value}),v=e.query(FA,{variables:()=>({input:[{sessionToken:g.value,shopId:h.value}]}),skip:()=>f.value||!u.value}),_=k(()=>
2{if(f.value)return y.data.value?.shop?.merchantPolicies[0]?.body;const e=v.data.value?.shop?.remoteShopConfigurations[0]?.merchantPolicies??[];return e.find(e=>e.handle===p.value.handle)?.body}),b=k(()=>f.value?y.error.value:v.error.value),P=k(()=>f.value?y.loading.value:v.loading.value),w=gl(P.value,(e,t)=>e&&!t&&u.peek()&&d.peek()&&"undefined"!=typeof document&&null!==document.querySelector(fl),["modal-content-cross-fade"]);return O(()=>{w.value=P.value}),O(()=>{b.value&&t.error(b.value)}),{error:b,loading:w,policyBody:_,selectedPolicy:k(()=>p.value),selectedShopPolicies:m,shops:s,show(){d.value=!1,p.value=c(),r&&(r.value="footerContent"),u.value=!0},afterShow(){d.value=!0},hide(){d.value=!1,u.value=!1,r&&(r.value="none")},selectShop(e){const t=p.peek(),n=l(e),r=n.find(e=>e.handle===t.handle)??n[0]??t;r!==t&&ll(()=>{p.value=r},["modal-content-cross-fade"])},selectPolicyHandle(e){const t=p.peek(),n=m.value.find(t=>t.handle===e)??m.value[0]??t;n!==t&&ll(()=>{p.value=n},["modal-content-cross-fade"])}}});function qA({id:e,defaultPolicy:t}){const{i18n:n,shop:r,mobileCheckoutSdk:a,embed:i,checkout:{negotiator:o}}=ie(),{checkoutProtocolModalEventSignal:s}=o.context,{localPolicies:l,localPoliciesWithContent:c,remotePolicies:u}=Li(),p=r.hasFlagEnabled(Ni),m=u.length>0?[...l,...u]:c,h=p&&m.some(({shopId:e,handle:n})=>e===t.shopId&&n===t.handle)?m:[t],g=p?n.translate("shop_policies.terms_and_policies"):t.name,f=a.variant.isStandard()||i?.isCheckoutKit(),y=p?"@media (inline-size >= extraSmall) 600px, 90%":f?"100%":void 0,{error:v,loading:_,policyBody:b,selectedPolicy:k,selectedShopPolicies:P,shops:S,show:w,afterShow:C,hide:E,selectShop:I,selectPolicyHandle:A}=Vn(UA,{checkoutProtocolModalEventSignal:s,defaultPolicy:t,policies:h}),T=S.value.length>1||S.value.some(e=>e.policies.size>1),L=()=>d(BA,{children:d(dA,{dangerouslySetInnerHTML:{__html:b.value??""},scrollableContent:"all"})}),N=d(x,{when:()=>!v.value,fallback:n.translate("bad_request.title"),children:d(x,{when:()=>!_.value,fallback:d(Jf,{"aria-busy":!0,gap:"base",children:[d(OA,{delay:!1,lines:3,lastLineSize:"small"}),d(OA,{delay:!1,lines:3,lastLineSize:"large"}),d(OA,{delay:!1,lines:3,lastLineSize:"small"}),d(OA,{delay:!1,lines:3,lastLineSize:"large"})]}),children:()=>T||k.value.shopId!==r.id?d(x,{when:()=>b.value,fallback:d(Vf,{color:"subdued",children:n.translate("remote_policies.unavailable_policy",{policy_name:k.value.name,shop_name:k.value.shopName})}),children:L}):L()})});return d(qx,{id:e,onShow:w,onAfterShow:C,onHide:E,heading:g,blockSize:y,children:[d(Nf,{accessibilityRole:"status",accessibilityVisibility:"exclusive",children:_.value?n.translate("general.loading"):null}),T?d(Jf,{gap:"base",children:[d(x,{when:()=>S.value.length>1,children:d(Jf,{direction:"inline",gap:"base",children:S.value.map(e=>d(MA,{pressed:k.value.shopId===e.shopId,onClick:()=>I(e.shopId),children:d(Jf,{gap:"small-400",direction:"inline",alignItems:"center",justifyContent:"center",children:d(Vf,{children:e.shopName})})},e.shopId))})}),d(x,{when:()=>P.value.length>1,children:d(LA,{value:k.value.handle,label:n.translate("shop_policies.policy_label"),onChange:A,name:"policy",children:P.value.map(e=>d(NA,{value:e.handle,children:e.name},e.handle))})}),N]}):N]})}var jA={Checkbox:"_1mmswk94 _1mmswk93 _1fragemws _1fragemyo",Details:"_1mmswk9s",Error:"_1mmswk9l",Icon:"_1mmswk9n _1mmswk9m _1fragem11z _1fragem11k _1fragemwi _1fragem12d _1fragem12t _1fragem12j",Input:"_1mmswk98 _1mmswk97 _1fragemzq _1fragemzo _1fragemzs _1fragemzm _1fragemk5 _1fragemjl _1fragemkp _1fragemj1 _1fragemm8 _1fragemlo _1fragemms _1frageml4 _1fragemyk _1fragem133 _1fragem5u _1fragemzf _1fragem4q _1fragem12j _1fragem12d _1fragem12q",Label:"_1mmswk9g _1mmswk9f _1fragem5u _1fragemvo _1fragemtb",Wrapper:"_1mmswk96 _1mmswk95 _1fragemws _1fragem64",colorLayerControl:"_1mmswk99 _1fragemy6",inputStateVariant:{default:"_1mmswk9d _1mmswk9b _1fragemyd",disabled:"_1mmswk9e _1mmswk9c _1fragem11v _1fragem11z _1fragemyb"},inputError:"_1mmswk9a",labelAndDetailsStateVariant:{default:"_1mmswk9j _1mmswk9h _1fragemyd",disabled:"_1mmswk9k _1mmswk9i _1fragem11v _1fragemyb"},accessibilityVisibilityVariant:{visible:"_1mmswk9p",exclusive:"_1mmswk9q _1mmswk9o _1fragem121"},inert:"_1mmswk9r _1fragemz0"};const HA=jc("Checkbox"),$A=mm(_(function({accessibilityLabel:e,disabled:t,error:n,id:r,label:a,name:i,details:o,...s},l){const c=Hc(r,HA),u=Pd(),p="string"==typeof n&&Boolean(n.trim())&&d("div",{className:jA.Error,children:d(hA,{controlID:c,children:n})}),m=v(jA.Label,jA.labelAndDetailsStateVariant[t||u?"disabled":"default"],u&&jA.inert),h=("string"==typeof a||mw(a))&&d("label",{htmlFor:c,className:m,children:a}),g="string"==typeof o||mw(o),f=g?`${c}-details`:void 0,y=v(jA.Details,jA.labelAndDetailsStateVariant[t||u?"disabled":"default"],u&&jA.inert),_=g&&d("div",{id:f,className:y,children:o});return d("div",{children:[d("div",{className:jA.Wrapper,children:[d(YA,{id:c,name:i,error:Boolean(n),accessibilityLabel:e,disabled:t,ref:l,ariaDescribedBy:f,...s}),h]}),_,p]})}),{commands:{clipboard:!1,overlay:!1}}),YA=_(function({accessibilityLabel:e,checked:t,colorLayer:n,disabled:r,error:a=!1,id:i,name:o,onChange:s,required:l,value:c,accessibilityVisibility:u,ariaDescribedBy:p,command:m,commandFor:h,...g},f){const y=Pd(),_=Rp(f,Sf({active:a})),b="inherit"!==n,k=v(jA.Input,a&&jA.inputError,jA.inputStateVariant[r||y?"disabled":"default"],y&&jA.inert);return d("div",{className:v(jA.Checkbox,b&&jA.colorLayerControl,u&&jA.accessibilityVisibilityVariant[u]),children:[d("input",{type:"checkbox",id:i,name:o,checked:t,value:c,disabled:r,onChange:({currentTarget:e})=>{"function"==typeof s&&s(e.checked)}
2,className:k,"aria-describedby":[p,a&&mA(i)].filter(Boolean).join(" ")||void 0,"aria-label":e||void 0,"aria-hidden":!!y||void 0,"aria-invalid":a||void 0,tabIndex:y?-1:void 0,ref:_,required:l,...g}),d("div",{className:jA.Icon,children:d(rh,{type:"check",size:"small-200"})})]})}),WA="gid://shopify/App/580111";function GA(e,t){return e.namespace.toLowerCase()===t.namespace.toLowerCase()&&e.key.toLowerCase()===t.key.toLowerCase()}function JA(e,t){const{namespace:n,key:r}=e.update??e.delete??{};return null!=n&&null!=r&&GA({namespace:n,key:r},t)}function KA(e,t){return e?.find(e=>GA(e,t))?.value}function QA(e,t){for(let n=e.length-1;n>=0;n--)if(JA(e[n],t))return n;return-1}function XA({key:e,label:t,required:a},{type:s,validate:l=()=>{}}){const{checkout:{proposal:c},i18n:u}=ie(),d=rc(),p=Mi(e),m=Di(),h=function({namespace:e,key:t,type:n}){const{checkout:{proposal:a}}=ie(),i=a.proposed.cartMetafields,o=a.negotiated.fields.cartMetafields;return r(()=>{const r={namespace:e,key:t,type:n};return new Ri(k(()=>function(e,t){const n=e[QA(e,t)];if(n)return n.delete?"":n.update?.value}(i.value,r)??KA(o.value,r)??""),e=>{i.value=function(e,t,n){const{namespace:r,key:a,type:i}=t,o=""===n.trim()?{delete:{appId:WA,namespace:r,key:a}}:{update:{appId:WA,namespace:r,key:a,type:i,value:n}},s=QA(e,t);return-1===s?[...e,o]:e.map((e,t)=>t===s?o:e)}(i.peek(),r,e)})},[t,e,o,i,n])}({...p,type:s}),g=i(),{handleViolations:f}=function(e,t){const{checkout:{negotiator:r}}=ie(),{customFields:a}=r.current.fields,{lastJourneyProgression:i}=r,s=n(n=>{const r=function(e,t,n){const r=t?.findIndex(e=>e.key===n)??-1;if(-1===r)return;const a=`$.customFields[${r}]`;return e.find(e=>"UnprocessableTermViolation"===e.__typename&&e.code.startsWith("CUSTOM_FIELD")&&e.target===a)}(n,a.value,e);r&&!t.value&&(t.value=r.localizedMessage||r.nonLocalizedMessage)},[a,t,e]);return P(()=>{const e=i.value;"error"===e.type&&"negotiation"!==e.negotiationStage&&o(()=>s(e.violations))}),{handleViolations:n(e=>{"error"===e.status&&s(e.violations)},[s])}}(e,m);Oi(h,m,l,Wt.InvalidCustomFieldValue);const y=a.value;return{value:h,error:m,fieldProps:{label:y?t.value:u.translate("custom_field.label",{label:t.value}),name:e,required:y},negotiate:()=>{const e=h.peek();e!==(g.current??KA(c.negotiated.fields.cartMetafields.peek(),p)??"")&&!m.peek()&&(g.current=e,d.negotiate({fieldsToResolve:["cartMetafields","customFields"],silenceViolations:[...nr],onComplete:f}))}}}function ZA({field:{description:e,heading:t,key:n},children:r}){const a=e.value;return d(Jf,{gap:"small-100","data-inspector-id":n,"data-inspector-kind":"customField",children:[t.value?d(IS,{children:t}):null,a?d(Vf,{color:"subdued",children:a}):null,r]})}function eT({field:e}){const t=function({required:e,requiredErrorMessage:t}){const{i18n:r}=ie();return n(n=>{if(e.value&&"true"!==n)return t.value?.trim()||r.translate("field_errors.custom_field.cart_metafield_value_required")},[r,e,t])}(e),{value:r,error:a,fieldProps:i,negotiate:o}=XA(e,{type:"boolean",validate:t}),s="string"==typeof a.value?a.value:void 0;return d(ZA,{field:e,children:d($A,{label:e.label.value,name:i.name,required:i.required,
2checked:"true"===r.value,error:s,onChange:e=>{const n=String(e);r.value=n,a.value=t(n),o()}})})}function tT({field:e}){const{i18n:t}=ie(),r=function({choices:e,required:t,requiredErrorMessage:r}){const{i18n:a}=ie();return n(n=>{if(""===n.trim()){if(!t.value)return;return r.value?.trim()||a.translate("field_errors.custom_field.cart_metafield_value_required")}if(!e?.some(e=>e.value===n))return a.translate("field_errors.custom_field.cart_metafield_invalid_choice")},[e,a,t,r])}(e),{value:a,error:i,fieldProps:o,negotiate:s}=XA(e,{type:"single_line_text_field",validate:r});return d(ZA,{field:e,children:d(LA,{label:o.label,name:o.name,required:o.required,value:a.value,error:"string"==typeof i.value?i.value:void 0,onChange:e=>{a.value=e,i.value=r(e),s()},children:[d(NA,{value:"",disabled:o.required,children:t.translate("custom_field.choice_placeholder")}),e.choices?.map(({label:e,value:t})=>d(NA,{value:t,children:e},t))]})})}const nT=w({displayName:"AsyncDateField",suspense:!1,load:()=>C(()=>ul(async()=>{const{DateField:e}=await(import("./b538640d.C8kc9xCi.js"));return{DateField:e}},__vite__mapDeps([238,2,26,27,3,4,1,5,28,29,30,7,8,9,10,11])).then(({DateField:e})=>e)),useError:$E("DateField"),renderLoading:({field:e})=>d(rT,{field:e})});function rT({field:e}){const{value:t,fieldProps:n}=XA(e,{type:"date"});return d(ZA,{field:e,children:d(wA,{...n,value:t.value,readOnly:!0,inputMode:"numeric",maxLength:10,accessoryEnd:d(rh,{type:"calendar"})})})}const aT=_(function({autocomplete:e,autoFocus:t,defaultValue:n,disabled:r,error:a,id:i,label:o,labelAccessibilityVisibility:s,maxLength:l,minLength:c,name:u,onBlur:p,onChange:m,onFocus:h,onInput:g,placeholder:f,readOnly:y,required:v,rows:_=2,value:b},k){return d(SA,{autocomplete:e,autoFocus:t,defaultValue:n,disabled:r,error:a,id:i,label:o,labelAccessibilityVisibility:s,maxLength:l,minLength:c,name:u,onBlur:p,onChange:m,onFocus:h,onInput:g,placeholder:f,readOnly:y,ref:k,required:v,rows:_>0?_:1,value:b})});function iT(e,t){const{value:n,error:r,fieldProps:a,negotiate:i}=XA(e,t),o=zi(n,r,t.validate);return{validatedInput:o,fieldProps:a,persist:()=>{o.onBlur(),i()}}}function oT({field:e}){const t="MULTILINE_TEXT"===e.type,r=function({required:e,requiredErrorMessage:t,validations:r}){const{i18n:a}=ie(),{minLength:i,maxLength:o}=r;return n(n=>{if(""===n.trim()){if(!e.value)return;return t.value?.trim()||a.translate("field_errors.custom_field.cart_metafield_value_required")}const r=[...n].length;return null!=i&&r<i?a.translate("field_errors.custom_field.cart_metafield_value_too_short"):null!=o&&r>o?a.translate("field_errors.custom_field.cart_metafield_value_too_long"):void 0},[a,o,i,e,t])}(e),{validatedInput:a,fieldProps:i,persist:o}=iT(e,{type:t?"multi_line_text_field":"single_line_text_field",validate:r});return d(ZA,{field:e,children:d(t?aT:wA,{...a,label:i.label,name:i.name,required:i.required,onBlur:o})})}function sT({field:e}){switch(e.type){case"TEXT":case"MULTILINE_TEXT":return d(oT,{field:e});case"DATE":return d(nT,{field:e});case"CHOICE":return d(tT,{field:e});case"BOOLEAN":return d(eT,{field:e});default:return null}}const lT=w({id:()=>"RuntimeExtension",displayName:"RuntimeExtension",suspenseName:({extension:e})=>$a(e.extensionPoint.target)?`runtime-extension-${e.id}`:void 0,load:()=>ul(()=>import("./49758c58._Nvnml8Z.js"),__vite__mapDeps([239,2,1,3,4,5,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,9,41,42,43,44,45,46,47,48,49,50,68,16,8,15,51,52,53,7,10,11,240]))}),cT="OyeF5",uT="XYPMc",dT=e=>d(Nf,{children:e}),pT=({gap:e,children:t,condition:n,marginBlockStart:r,marginBlockEnd:a})=>{const i=e&&n?d(Jf,{gap:e,children:t}):d(y,{children:t});return r||a?d("div",{className:v({[cT]:r,[uT]:a}),style:{...r&&{"--extensions-margin-block-start":ye.spacing[r]},...a&&{"--extensions-margin-block-end":ye.spacing[a]}},children:i}):d(y,{children:i})};function mT({customizations:e,gap:t,options:n,transformComponents:r,render:a=dT,marginBlockStart:i,marginBlockEnd:o}){return 0===e.length?null:d(pT,{gap:t,condition:e.length>1,marginBlockStart:i,marginBlockEnd:o,children:e.map(e=>"uiExtension"===e.kind?d(lT,{options:n,extension:e.extension,transformComponents:r,render:a},e.extension.id):d(sT,{field:e.field},e.field.key))})}const hT=e=>d("svg",{xmlns:"http://www.w3.org/2000/svg",xmlSpace:"preserve",viewBox:"0 0 30 14",...e,children:[d("path",{d:"M7.4 12.8h6.8l3.1-11.6H7.4C4.2 1.2 1.6 3.8 1.6 7s2.6 5.8 5.8 5.8",style:{fillRule:"evenodd",clipRule:"evenodd",fill:"#fff"}}),d("path",{d:"M22.6 0H7.4c-3.9 0-7 3.1-7 7s3.1 7 7 7h15.2c3.9 0 7-3.1 7-7s-3.2-7-7-7m-21 7c0-3.2 2.6-5.8 5.8-5.8h9.9l-3.1 11.6H7.4c-3.2 0-5.8-2.6-5.8-5.8",style:{fillRule:"evenodd",clipRule:"evenodd",fill:"#06f"}}),d("path",{d:"M24.6 4c.2.2.2.6 0 .8L22.5 7l2.2 2.2c.2.2.2.6 0 .8s-.6.2-.8 0l-2.2-2.2-2.2 2.2c-.2.2-.6.2-.8 0s-.2-.6 0-.8L20.8 7l-2.2-2.2c-.2-.2-.2
2-.6 0-.8s.6-.2.8 0l2.2 2.2L23.8 4c.2-.2.6-.2.8 0",style:{fill:"#fff"}}),d("path",{d:"M12.7 4.1c.2.2.3.6.1.8L8.6 9.8c-.1.1-.2.2-.3.2-.2.1-.5.1-.7-.1L5.4 7.7c-.2-.2-.2-.6 0-.8s.6-.2.8 0L8 8.6l3.8-4.5c.2-.2.6-.2.9 0",style:{fill:"#06f"}})]});function gT(){const{shopPay:e,i18n:t}=ie(),{footer:{content:{typography:n}={}}={}}=vv(),r=e.user.isAuthenticatedUser.value?"https://privacy.shopify.com/ads-sharing/opt-out/new":"https://privacy.shopify.com",a=t.translate("user_consent.privacy_portal_link",{privacy_link_gap:d("span",{className:"mMltV"}),privacy_link_logo:d(hT,{"aria-hidden":"true",focusable:"false",className:"HTJIw"})}),i=d(Wf,{href:r,target:"_blank",display:"block",children:a});return n?d(Vf,{size:n.size,color:n.color,type:"bold"===n.weight?"strong":void 0,children:i}):i}const fT=w({id:()=>"PrivacyPreferencesFooterLink",displayName:"PrivacyPreferencesFooterLink",suspense:!1,useError:function(e){const{observability:t}=ie();a(()=>{e&&function(e,t){e.error(t,{metadata:{privacyPreferencesFooterLink:{component:"PrivacyPreferencesFooterLink",failure:"lazy_load"}}})}(t,e)},[e,t])},load:()=>C(()=>ul(async()=>{const{deferredPrivacyComponents:e}=await(import("./2acfb1ce.BfTfZaeq.js"));return{deferredPrivacyComponents:e}},__vite__mapDeps([81,2,1,3,4,5,39,40,7,8,9,10,11])).then(({deferredPrivacyComponents:e})=>e.PrivacyPreferencesFooterLink))});function yT(){const e=Tt(),{checkout:{identity:n},consentManager:r}=ie();return t(()=>e.value&&"shopPay"!==n.current.value&&r.shouldShowBanner.value)}const vT=jc("DelegatedLinkModal");function _T(e){const t=Array.isArray(e)?e:[e],n=new Map;return t.map(e=>{if("string"!=typeof e&&"number"!=typeof e)return e;const t=String(e),r=(n.get(t)??0)+1;return n.set(t,r),d(Vf,{color:"subdued",children:e},`${t}-${r}`)})}function bT(){const{embed:e,i18n:t,checkout:{configuration:n},shop:r}=ie(),{name:a}=r,i=sC(),{currentDetour:o}=nc().value,s=yT(),{footer:{alignment:l,content:{visibility:c,typography:u}={}}={}}=vv(),{localPolicies:p,localPoliciesWithContent:m}=Li(),h=r.hasFlagEnabled(Ni),g="microsoft"===e?.embedder,f="amazon"===e?.embedder,v="google"===e?.embedder;let _=u;g?_={...u,size:"extraSmall",color:"subdued",weight:"bold"}:v&&(_={...u,size:"small"});const b=p.find(e=>"privacy-policy"===e.handle),k=b.url,P=k?d(Wf,{href:k,target:"_blank",accessibilityLabel:t.translate("user_consent.google_embedded_checkout.privacy_policy_accessibility_label",{shop_name:a}),children:t.translate("user_consent.google_embedded_checkout.privacy_policy")}):d(y,{children:[d(Wf,{commandFor:"google-privacy-policy-modal",accessibilityLabel:t.translate("user_consent.google_embedded_checkout.privacy_policy_accessibility_label",{shop_name:a}),children:t.translate("user_consent.google_embedded_checkout.privacy_policy")}),d(qA,{id:"google-privacy-policy-modal",defaultPolicy:{...b,name:t.translate("user_consent.google_embedded_checkout.privacy_policy_modal_title")}})]}),S=d(Wf,{href:"https://payments.google.com/payments/apis-secure/u/0/get_legal_document?ldo=0&ldt=privacynotice",target:"_blank",accessibilityLabel:t.translate("user_consent.google_embedded_checkout.payments_privacy_notice_accessibility_label"),children:t.translate("user_consent.google_embedded_checkout.payments_privacy_notice")}),w=d(Wf,{href:"https://support.google.com/gemini/answer/16730149",target:"_blank",accessibilityLabel:t.translate("user_consent.google_embedded_checkout.learn_more_accessibility_label"),children:t.translate("user_consent.google_embedded_checkout.learn_more")}),C=d(sx,{type:"small",textAlign:l,children:_T(t.translate("user_consent.google_embedded_checkout.terms",{shop_name:a,privacy_policy_link:P,payments_privacy_notice_link:S,learn_more_link:w}))}),E=d(sx,{size:"extraSmall",color:"subdued",textAlign:l,children:d(Vf,{type:"strong",children:["Your purchase from ",a," is subject to the"," ",d(kT,{href:"https://aka.ms/ConsumerCopilotTerms",heading:"Copilot Terms",children:"Copilot Terms"})," and the ",d(kT,{href:"https://go.microsoft.com/fwlink/?LinkId=521839",heading:"Privacy Statement",children:"Privacy Statement"}),". We will share your order and payment details with ",a," to complete your order."]})}),I=0===m.length?d(Jf,{direction:"inline",alignItems:"center",gap:"small-400 base",justifyContent:l,children:[d(Vf,{size:"small",color:"subdued",children:t.translate("general.all_rights_reserved",{shop_name:a})}),d(Jf,{direction:"inline",gap:"base",accessibilityRole:"unordered-list",children:[d(x,{when:s,children:d(Nf,{accessibilityRole:"list-item",children:d(fT,{})})}),d(x,{when:n.visibility.showDataSharingOptOut,children:d(Nf,{accessibilityRole:"list-item",children:d(gT,{})})})]})]}):d(Jf,{direction:"inline",justifyContent:l,gap:"small-400 base",accessibilityRole:"unordered-list",children:[(h?m.slice(0,1):m).map(e=>{const{handle:n,name:r}=e,a=h?t.translate("shop_policies.terms_and_policies"):r,o=h?"terms-and-policies-footer-policy-modal":`${n}-footer-policy-modal`,s=d(qA,{id:o,defaultPolicy:e}),l=d(jf,{variant:"plain",commandFor:o,ref:i(n),children:a});return d(Nf,{accessibilityRole:"list-item",children:[_?d(Vf,{size:_.size,color:_.color,type:"bold"===_.weight?"strong":void 0,children:l}):l,s]},n)}),d(x,{when:s,children:d(Nf,{accessibilityRole:"list-item",children:d(fT,{})})}),d(x,{when:n.visibility.showDataSharingOptOut,children:d(Nf,{accessibilityRole:"list-item",children:d(gT,{})})})]});let A="purchase.checkout.footer.render-after";"thankYou"===o?.type&&(A="purchase.thank-you.footer.render-after");const T=Gw(A);
2return d(Jf,{gap:"large-100",children:[g&&E,v&&C,"hidden"!==c&&!f&&I,d(mT,{customizations:T,gap:"base"})]})}function kT({href:e,heading:t,children:n,...r}){const{checkout:a}=ie(),i=Hc(void 0,vT);return a.configuration.isWindowOpenDelegationEnabled?d(Wf,{href:e,...r,children:n}):d(y,{children:[d(Wf,{commandFor:i,...r,children:n}),d(qx,{id:i,source:e,heading:t})]})}function PT(){const{i18n:e,shop:t}=ie(),n=`${t.name} ${e.translate("general.page_title")}`;return d("h1",{className:Se({screenReaders:"only"}),children:n})}function ST(){const{client:e,i18n:t,checkout:{negotiator:r}}=ie(),{checkoutProtocolModalEventSignal:i}=r.context,o=n(()=>{window.location.assign(e.unstable_getSerialization("logoutUrl")||"")},[e]),{hasViolations:s}=Jy(Kn);return a(()=>()=>{i.value="none"},[i]),s?d(qx,{id:"lost-permissions-modal",heading:t.translate("b2b_errors.lost_permissions_title"),size:"large",accessibilityLabel:t.translate("b2b_errors.lost_permissions_title"),blocking:!0,open:!0,onShow:()=>{i.value="b2bPermissions"},children:d(Jf,{gap:"base",children:[d(Vf,{children:t.translate("b2b_errors.lost_permissions_subtitle")}),d(Jf,{direction:"inline",gap:"base",justifyContent:"end",children:d(jf,{variant:"primary",onClick:o,children:t.translate("b2b_errors.log_out_link_text")})})]})}):null}function wT({source:e,title:t,onIframeLoad:n}){const[r,i]=s(),[o,l]=s(!1);return a(()=>{e?(i(e),l(!0)):l(!1)},[e]),r?d(qx,{source:r,open:o,blocking:!0,blockSize:"100%",size:"840px",accessibilityLabel:t,onIframeLoad:()=>n?.(r)}):null}function CT({source:e,logMessage:t,telemetryContext:r,logKey:o=e??void 0}){const{observability:s}=ie(),l=i();return a(()=>{e||(l.current=void 0)},[e]),n(n=>{e&&r&&(n&&n!==e||l.current!==o&&(l.current=o,s.log("action_required_modal_iframe_loaded",t,{...r,hasModalUrl:!0,..."pre_payment_buyer_action_required"!==r.actionType&&{sourceHostCategory:Gb(e)}})))},[o,t,s,e,r])}function ET(){const{i18n:e}=ie(),n=function(){const{checkout:e,shopPay:n,observability:r}=ie(),a=i(),o=t(()=>{if(Bi(n)&&n.threeDSModalUrl.value){const e=n.threeDSModalUrl.value;return{source:e,logKey:JSON.stringify(["spe",e]),logMessage:"[ActionRequiredModalManager] SPE 3DS action required via threeDSModalUrl",telemetryPayload:{modalSourceType:"spe_three_ds_modal_url",sourceHostCategory:Gb(e),hasModalUrl:!0},iframeLoadTelemetryContext:{modalSourceType:"spe_three_ds_modal_url"}}}const t=e.latestReceipt.value;if(t&&Vy(t)){const e=t.action;if(Uy(e))return{source:e.offsiteRedirect?void 0:e.url,logKey:JSON.stringify(["receipt",t.id,e.offsiteRedirect,e.url]),logMessage:"[ActionRequiredModalManager] Receipt requires further action",telemetryPayload:{modalSourceType:"receipt_action",sourceHostCategory:Gb(e.url),offsiteRedirect:e.offsiteRedirect,actionType:e.type,hasModalUrl:!e.offsiteRedirect},iframeLoadTelemetryContext:{modalSourceType:"receipt_action",offsiteRedirect:e.offsiteRedirect,actionType:e.type}}}if("action_required"===t?.status&&"pre_payment_buyer_action_required"===t.action.type){const{action:e}=t;return{source:e.url,logKey:JSON.stringify(["receipt",t.id,e.type]),logMessage:"[ActionRequiredModalManager] Receipt requires further action",telemetryPayload:{modalSourceType:"receipt_action",actionType:e.type,hasModalUrl:!0},iframeLoadTelemetryContext:{modalSourceType:"receipt_action",actionType:e.type}}}});return P(()=>{const e=o.value;e?a.current!==e.logKey&&(a.current=e.logKey,r.log("action_required_modal_manager_action_required",e.logMessage,e.telemetryPayload)):a.current=void 0}),o.value}(),r=CT({source:n?.source,logKey:n?.logKey,logMessage:"[ActionRequiredModalManager] Action required modal iframe loaded; this does not prove issuer challenge rendered",telemetryContext:n?.iframeLoadTelemetryContext});return d(wT,{source:n?.source,title:e.translate("processing.action_required"),onIframeLoad:r})}function xT(e,t){return e.has(t)}function IT(e,t){if(!e||!t)return null;const n=t.find(e=>"customOnsite"===e.method.type)?.method;return n&&e.find(e=>"customOnsite"===e.type&&e.paymentMethodIdentifier===n.paymentMethodIdentifier&&e?.uiExtension?.approvalScopes&&xT(e.uiExtension.approvalScopes,ql.PaymentSessionModal))||null}bT.displayName="FooterContent",kT.displayName="DelegatedLink";const AT=w({id:()=>
2"PaymentChallengeModal",displayName:"PaymentChallengeModal",suspense:!1,useError:function(e){const{observability:t}=ie();a(()=>{e&&function(e,t){e.error(t,{metadata:{paymentChallengeModal:{component:"PaymentChallengeModal",failure:"lazy_load"}}})}(t,e)},[e,t])},load:()=>C(()=>ul(()=>import("./7fd9930c.Crg5p8hD.js"),__vite__mapDeps([241,2,19,3,4,1,5,20,7,8,9,10,11,242])))});function TT({modalPaymentMethodConfig:e,onModalRender:n}){const{checkout:r,observability:a}=ie(),o=i(),s=m(void 0),l=t(()=>{const e=r.latestReceipt.value;return e&&Fy(e)&&qy(e.action)?e:void 0});P(()=>{const t=l.value;if(!t||!qy(t.action))return void(o.current=void 0);const n=Boolean(e.value),r=JSON.stringify([t.id,t.action.challengeType,t.action.challengeData,n]);o.current!==r&&(o.current=r,a.log("payment_challenge_modal_manager_action_required","[PaymentChallengeModalManager] Receipt requires further action",{challengeType:t.action.challengeType,hasModalPaymentMethodConfig:n}))}),P(()=>{const e=l.value;if(!e||!qy(e.action))return void(s.value=void 0);const t=function(e){return JSON.stringify([e.id,e.action.type,qy(e.action)?e.action.challengeType:void 0,qy(e.action)?e.action.challengeData:void 0])}(e),n=null==e.timeout?.millisecondsRemaining?void 0:Date.now()+e.timeout.millisecondsRemaining,r=s.peek();r?.key!==t?s.value={key:t,expiresAt:n}:null!=n&&(s.value={key:t,expiresAt:Math.min(r.expiresAt??n,n)})});const c=t(()=>{const t=l.value,n=e.value;if(t&&qy(t.action))return n?{type:t.action.challengeType,data:t.action.challengeData,config:n,expiresAt:s.value?.expiresAt}:null});return d(x,{when:c,children:e=>d(AT,{challengeType:e.type,challengeData:e.data,receipt:r.latestReceipt.value,paymentMethod:e.config,onModalRender:n,challengeExpiresAt:e.expiresAt})})}function LT(){const e=fa(),{checkout:n}=ie(),r=n.negotiator.current.fields.deferredTotal;return t(()=>{if(!e.value)return!0;const t=r.value?.amount.amount;return Boolean(Ra({checkout:n})||t)})}function NT({isModalRendered:e,modalPaymentMethodConfig:n}){const{i18n:r,checkout:a}=ie(),i=function(){const{i18n:e,shopPay:n,checkout:{negotiator:r}}=ie(),{managedByMarketsPro:a}=r.current.fields,i=LT();return t(()=>{if(!i.value)return;if(!Vi({managedByMarketsPro:a.value}))return;const t=n.session.selectedPaymentMethod.value;return t&&Fi(t)?e.translate("processing.redirecting_title"):void 0})}();return t(()=>{if(i.value)return i.value;const t=a.latestReceipt.value;return t?Vy(t)?r.translate("processing.redirecting_notice"):Fy(t)?!e.value&&n.value?r.translate("processing.modal_notice",{paymentMethod:n.value.name}):r.translate("processing.wait.short"):!e.value&&n.value?.name&&Ui(n.value)&&"processing"===t.status&&n.value?r.translate("processing.modal_notice",{paymentMethod:n.value.name}):"processing_remote_checkouts"===t.status||"processed"===t.status&&t.completedRemoteCheckouts?.length?r.translate("processing.remote_shops_payments_processing"):r.translate("processing.wait.short"):r.translate("processing.wait.short")})}const RT=w({id:()=>"CryptoModalManager",displayName:"CryptoModalManager",suspense:!1,useError:function(e){const{observability:t}=ie();a(()=>{e&&t.error(e,{metadata:{cryptoModalManager:{component:"CryptoModalManager",failure:"lazy_load"}}})},[e,t])},load:()=>C(()=>ul(()=>import("./39bf6084.BojYLb7V.js"),__vite__mapDeps([243,2,1,3,4,5,244,229,46,65,7,8,9,10,11,245])))});function MT(){const{checkout:e}=ie(),{paymentLines:n}=e.negotiator.parts,r=e.negotiator.current.fields.paymentMethods,a=t(()=>IT(r.value,n.value)),i=m(!1),o=NT({isModalRendered:i,modalPaymentMethodConfig:a}),s=Bb();return P(()=>{if(e.latestReceipt.value)return ju({content:o.value,role:"alert"})}),d(y,{children:[d(x,{when:s,fallback:d(ET,{}),children:d(RT,{})}),d(TT,{modalPaymentMethodConfig:a,onModalRender:()=>{i.value=!0}})]})}function DT(){const{i18n:e,url:t,source:n,shop:a,checkout:i,shopPay:o}=ie(),s="shopPay"===i.identity.current.value,{plan:l,currentPage:c}=nc().value,u=fa(),d="cartNext"===n.type||"simulated"===n.type,p=i.negotiator,m=i.negotiator.parts.paymentLines.value,h=p.current.peek(),g=i.configuration.layout.isOnePage.value,f=qi(),y=ji("SHOP_CASH"),v=ct(),_=oS(),{value:b}=i.negotiator.current.fields.managedByMarketsPro,k=Vi({managedByMarketsPro:b}),{value:P}=i.negotiator.current.fields.paymentFlexibilityPaymentTermsTemplate,S=Ci(),w=pn(h.deliveryNext),C=Mr(h.deliveryNext),E=r(()=>m.some(({method:{type:e}})=>"paymentOnDelivery"===e),[m]),x=r(()=>m.some(({method:{type:e}})=>"customManualPayment"===e||"manualPayment"===e),[m]),I=r(()=>a.vaultForPaymentLater&&Hi(m),[a.vaultForPaymentLater,m]),A=Boolean(P)&&!S.value,T=xI();return r(()=>{let t=[];t=d&&_.value?[{id:"cart",route:_.value.toString()}]:[];const n=[...t,...l.greenPath,{id:"thankYou",route:"/thank-you"}];let r=c?n.findIndex(e=>e.id===c.id):void 0;(null==r||r<0)&&(r=void 0);const a=p.current.peek(),i=null==r?void 0:n.slice(r+1).find(e=>null==e.skipOverPage||!e.skipOverPage(a)),h=null==r?void 0:n.slice(0,r).reverse().find(e=>null==e.skipOverPage||!e.skipOverPage(a));return{nextPage:{id:i?.id,label:function(t){if(o.isSimulated)return e.translate("general.pay_now_button_label");switch(t){case"shipping":return e.translate("general.continue_to_shipping_method");case"payment":return e.translate("general.continue_to_payment_method");case"review":return e.translate("general.continue_to_review");case"thankYou":return v.value?e.translate("general.submit_for_review_button_label"):I?e.translate("payment.vault_for_payment_later.pay_button_label"):A&&!T.value?e.translate("general.confirm_order_button_label"):u.value||E||x||f.value||g&&y.value?e.translate("general.complete_purchase_button_label"):k&&!s&&$i(m)?e.translate("general.continue_to_payment_method"):e.translate("general.pay_now_button_label");default:return e.translate("general.continue_button_label")}}(s?"thankYou":i?.id),notice:function(t){switch(t){case"review":return e.translate("processing.y
2ou_will_not_be_charged");case"thankYou":return v.value?e.translate("general.submit_for_review_notice_label"):void 0;default:return}}(s?"thankYou":i?.id)},previousPage:{label:function(t){switch(t){case"cart":return e.translate("general.back_to_cart");case"information":return e.translate("general.back_to_contact_information");case"shipping":return e.translate("general.back_to_shipping_method");case"payment":return e.translate("general.back_to_payment_method");case"buyWithPrime":return e.translate("wallets.return_to_store");default:return e.translate("general.back_button_label")}}(h?.id),route:h?.route}}},[t,p,e,u.value,c,l.greenPath,d,m,w,C,E,x,I,g,f.value,y.value,T.value])}function OT(){const e=nc();return t(()=>{const{plan:t}=e.value;return t.greenPath.some(({id:e})=>"review"===e)})}function zT(){const{checkout:{negotiator:e}}=ie(),{paymentLines:n}=e.parts;return t(()=>{const e=Boolean(Nt(n.value,"SHOP_PAY")),t=Boolean(Nt(n.value,"SHOPIFY_INSTALLMENTS"));return Yi(n.value)&&!e&&!t})}function BT(){const{i18n:e}=ie();return d(ty,{children:d(Jf,{gap:"large-400",alignItems:"center",children:[d(Nf,{children:d(Df,{size:"large",appearance:"monochrome"})}),d(sx,{children:e.translate("general.processing")})]})})}function VT(){const{progressing:e}=rc(),{i18n:n,embed:r,checkout:{negotiator:a}}=ie(),i=function(){const e=OT(),n=T(DT().nextPage.id),r=Tf(),{checkout:{offsitePopupController:a}}=ie();return t(()=>!(!r.value||a.isOpen.value||e.value&&"thankYou"!==n.value))}(),o=function(){const e=zT(),n=nc(),r=T(DT().nextPage.id),{checkout:a}=ie(),i=a.configuration.layout.isOnePage,{inMemoryApplePayParts:{asPaymentMethod:o},walletUsedForSubmissionSignal:s}=gn(),l=a.negotiator.parts.paymentLines;return t(()=>{if(!e.value)return!1;if(a.wallets.activeSession.value)return!1;const t=l.value;if(Nt(t,"PAYPAL_EXPRESS"))return!1;const c=Nt(t,"APPLE_PAY");return c?!o.value&&"APPLE_PAY"===s.value&&!!Wi(c)&&(i.value?"APPLE_PAY"!==a.wallets.escalatedWallet.value:"information"===n.value.currentPage?.id):i.value?!Yl({paymentLines:t,walletUsedForSubmission:s.value}):"GOOGLE_PAY"===s.value?"information"===n.value.currentPage?.id:"thankYou"===r.value})}(),s=a.parts.paymentLines,l=t(()=>"google"===r?.embedder&&Boolean(Nt(s.value,"GOOGLE_PAY"))),c=t(()=>e.value&&(o.value||i.value)&&!l.value);return P(()=>{if(c.value)return ju({content:n.translate("general.processing")})}),d(x,{when:c,children:d(BT,{})})}function FT(e){return function(t){return Object.fromEntries(Array.from(e).map(e=>[e,t[e]]))}}function UT(e){return function(t){return Object.fromEntries(Object.keys(t).filter(t=>!e.has(t)).map(e=>[e,t[e]]))}}function qT(){const{i18n:e,embed:t}=ie();return t?.isEmbeddedCheckout()?null:d("a",{href:`#${mC}`,className:"_9sntZ",children:e.translate("general.skip_to_content")})}function jT(){const{embed:e,i18n:t,checkout:{configuration:{allowRedirectToStorefront:r},negotiator:s}}=ie(),l=oS(),{checkoutProtocolModalEventSignal:c}=s.context,{lastJourneyProgression:u}=s,p=i(!1);P(()=>{if(!yr(e?.embedder))return;const t=u.value;"failed"!==t.type||"tooManyRequests"!==t.reason||p.current||(p.current=!0,o(()=>rr(e,"too_many_requests")))});const m=n(()=>{l.value&&window.location.assign(l.value.toString())},[l]);a(()=>()=>{c.value="none"},[c]);const h="failed"===u.value.type&&"tooManyRequests"===u.value.reason,g=r&&l.value;return h?d(qx,{id:"too-many-requests-modal",heading:t.translate("too_many_requests.title"),size:"large",accessibilityLabel:t.translate("too_many_requests.title"),blocking:!0,open:!0,onShow:()=>{c.value="tooManyRequests"},children:d(Jf,{gap:"base",children:[d(Vf,{children:g?t.translate("too_many_requests.body"):t.translate("too_many_requests.body_no_cart")}),g&&d(y,{children:[d(Nf,{display:"@media (inline-size >= small) none, block",children:d(jf,{variant:"primary",inlineSize:"fill",onClick:m,children:t.translate("too_many_requests.return_to_cart")})}),d(Qm,{display:"@media (inline-size >= small) auto, none",justifyItems:"end",children:d(jf,{variant:"primary",onClick:m,children:t.translate("too_many_requests.return_to_cart")})})]})]})}):null}function HT(){const e=kt(),{i18n:n}=ie(),r=t(()=>e.value?n.translate("order_summary.total_updated_label_with_price",{totalPrice:n.formatCurrency(e.value.amount,{currency:e.value.currencyCode,form:"name"})}):null),a=i(r.peek());return P(()=>{const e=r.value,t=a.current;if(a.current=e,e&&e!==t)return ju({content:e})}),null}var $T={Progress:"xvcb04 xvcb03 _1fragemel _1frageme1 _1fragemf5 _1fragemdh _1fragemws _1fragemzf _1fragem32 _1fragem5u",toneVariant:{auto:"xvcb05",critical:"xvcb06"}};function YT({accessibilityLabel:e,id:t,max:n=1,tone:r="auto",value:a}){const i=qc(),o=Ju(),s=e||o("processing");return i&&null==a?d(sx,{children:s}):d("progress",{id:t,className:v($T.Progress,$T.toneVariant[r]),value:a,max:n,"aria-label":s})}function WT({active:e=!1,announceProcessing:t=!0,children:n,loadingIndicatorVariant:r="spinner",showLoadingIndicator:i=!0}){const{i18n:o}=ie();a(()=>
2{if(e&&t)return ju({content:o.translate("general.processing")})},[e,t,o]);const s=e&&i;return d(Nf,{children:[d(Nf,{inert:e,opacity:e&&"spinner"===r?70:void 0,children:n}),d("div",{className:Se({transitionProperty:"opacity",transitionTimingFunction:"easeInOut",transitionDuration:"slowest",pointerEvents:"none"}),style:{opacity:s?1:0},"aria-hidden":!s,children:["progressbar"===r&&d("div",{className:Se({position:"fixed",insetBlockEnd:"small400",insetInlineStart:"small400",insetInlineEnd:"small400"}),children:d(YT,{accessibilityLabel:o.translate("general.processing")})}),"spinner"===r&&d(Nf,{position:"absolute",insetBlock:"50% auto",insetInline:"50% auto",transform:"translate(-50%, -50%)",children:d(Df,{size:"large",accessibilityLabel:o.translate("general.processing")})})]})]})}function GT({children:e}){return d(Gi.Provider,{value:JT,children:e})}const JT=(e,t,n,r,a)=>({onInput:t=>{!function(e,t,r){(t.value||e)&&(r.value=!0,n(void 0))}(t,e,r)},onChange:t=>function(e,t){(t.value||e)&&(t.value=e)}(t,e),clearError:()=>n(void 0),onBlur:()=>function(e,t,n,r,a){const i=e.value;t.peek()&&function(e,t,n,r,a){if(!t)return;const i=n.value,s=o(()=>r.value);if(s&&e&&e===i)return;const l=t(e),c=l?{message:String(l?.message??l),origin:"client",type:"inline-validation"}:void 0;(function(e,t){return!t||!Ji(e)||e.message!==t.message})(s,c)&&a(c)}(i,a,e,n,r)}(e,r,t,n,a),get touched(){return r.value},get error(){return t.value},get value(){return e.value}});var KT={autoBorderVariant:{none:"apn1wdr",extraSmall:"apn1wds",small:"apn1wdt",base:"apn1wdu",large:"apn1wdv",extraLarge:"apn1wdw"},autoBorderWidthVariant:{none:"apn1wdk",base:"apn1wdl",large100:"apn1wdm",large200:"apn1wdn"},colorSchemeVariant:{scheme1:"apn1wd8 apn1wd0 _1fragemxx",scheme2:"apn1wd9 apn1wd1 _1fragemxy",scheme3:"apn1wda apn1wd2 _1fragemxz",scheme4:"apn1wdb apn1wd3 _1fragemy0",scheme5:"apn1wdc apn1wd4 _1fragemy1",scheme6:"apn1wdd apn1wd5 _1fragemy2",scheme7:"apn1wde apn1wd6 _1fragemy3",scheme8:"apn1wdf apn1wd7 _1fragemy4"},continuesColorScheme:"y3r6mh0",layerlessSurfaceBorderReset:"apn1wdi apn1wdh",liftedControlSurface:"apn1wdq",liftedSurface:"apn1wdp",surfaceBorderInherited:"apn1wdg",surfaceBorderReset:"apn1wdh"};const QT=f(void 0);function XT({accessibilityLabel:e,accessibilityRole:t="section",accessibilityLabelledBy:n,background:a,border:i,borderRadius:o,borderStyle:s,borderWidth:l,children:c,className:u,colorLayer:p,colorScheme:m,containerName:g,display:f,heading:y,id:_,maxBlockSize:b,maxInlineSize:k,minBlockSize:P,minInlineSize:S,overflow:w,padding:C}){const E=h(QT),x="section"===t?(E?.level??0)+1:E?.level??0,I=r(()=>({level:x}),[x]),A=qa(Fw().pending??{}),{pending:T,pendingInsetsRows:L,rowsInset:N}=Fw(),R=N||!0===L&&eL(A.padding),M=y?d(nL,{headingLevel:x,heading:y,children:c}):c,D=A.background??a,O=A.colorScheme??m,z="subdued200"===D,B="auto"===T?.border&&z,V="control"===p?"base":"baseSpecified",F=("base"===D?V:D)??(O?V:void 0),{current:U}=Yp();return d(Vw,{rowsInset:R,children:d(tL,{colorScheme:O,children:d(QT.Provider,{value:I,children:d(Nf,{accessibilityLabel:e,accessibilityRole:"presentation"===t?void 0:t,"aria-labelledby":n,background:F,border:i,borderRadius:A.borderRadius??o,borderStyle:A.borderStyle??s,borderWidth:A.borderWidth??l,boxShadow:B?void 0:A.boxShadow,containerName:g,className:v(O&&KT.colorSchemeVariant[O],B&&KT.autoBorderVariant[A.boxShadow??"none"],B&&KT.autoBorderWidthVariant[T?.borderWidth??"base"],z?KT["control"===p?"liftedControlSurface":"liftedSurface"]:ZT(F,O,U,p),u),colorLayer:p||(O?"base":void 0),display:f,id:_,maxBlockSize:b,maxInlineSize:k,minBlockSize:P,minInlineSize:S,overflow:w,padding:A.padding??C,children:x>1&&"section"===t?d(yu,{children:M}):M})})})})}function ZT(e,t,n,r){if(!t){if(null==e||"transparent"===e||"baseSpecified"===e&&Ki.some(e=>e===n))return;return r?KT.surfaceBorderReset:KT.layerlessSurfaceBorderReset}if(t===n)return"transparent"===e?KT.surfaceBorderInherited:"baseSpecified"===e?KT.continuesColorScheme:void 0}function eL(e){return null!=e&&(Array.isArray(e)?e.some(eL):"object"==typeof e?Object.values(e).some(eL):String(e).replace(/@\w+\s*\([^)]*\)/g,"").split(/[\s,]+/).some(e=>
2""!==e&&"none"!==e))}function tL({children:e,colorScheme:t}){const n=Yp(),{current:a}=n,i=r(()=>t&&t!==a?{parent:a,current:t}:n,[t,a,n]);return d($p.Provider,{value:i,children:e})}function nL({headingLevel:e,heading:t,children:n}){let r;return 1===e?r="small":2===e?r="small-300":3===e&&(r="small-500"),e<4?d(Jf,{gap:r,children:[d(IS,{children:t}),d("div",{children:n})]}):d(y,{children:[d(IS,{children:t}),n]})}function rL(e){const{inlineSize:t}=xw(e),r=oe(t+2),a=m(2),o=i(null);return{ref:n(e=>{if(o.current?.disconnect(),o.current=null,!e||"undefined"==typeof ResizeObserver)return;const t=new ResizeObserver(([t])=>{if(!t)return;const n=t.contentBoxSize?.[0]?.inlineSize??t.contentRect.width;if(0===n)return;const i=e.firstElementChild;if(!i)return;const o=parseFloat(getComputedStyle(i).columnGap)||0,s=Math.floor((n+o)/(r.current+o));a.value=Math.min(3,Math.max(1,s))});t.observe(e),o.current=t},[a,r]),max:a}}QT.displayName="SectionContext";const aL=e=>e.lineAllocations.map((t,n)=>iL(e,n)),iL=(e,t)=>{const{lineAllocations:n,...r}=e,a=n[t];if(!a)throw new TypeError(`Missing line allocation at index ${t}`);return{...r,lineComponents:oL(e.lineComponents,t),lineAllocation:a}},oL=(e,t)=>e.map(({lineAllocations:e,...n})=>{const r=e[t]??e[0];if(!r)throw new TypeError("Missing line allocation for merchandise line component");return{...n,lineAllocation:r}});function sL(e){const{proposed:t,negotiated:n}=e;return t?.itemPrice?.amount!==n?.itemPrice?.amount}function lL(e){return e.stableId}const cL=/^\$.merchandise.merchandiseLines\[(\d+)\]$/;function uL(e,t){const n=dL(t);if(null!=n)return e[n]}function dL(e){const t=cL.exec(e);if(null==t?.[1])return;const n=parseInt(t[1],10);return isNaN(n)?void 0:n}function pL(e,t,n){const r=new Set;for(const a of t){if(!n(a)||!("target"in a))continue;const t=uL(e,a.target);t?.stableId&&r.add(t.stableId)}return r}function mL(e,t=[]){return pL(e,t,e=>Wy([e])||Gy([e]))}function hL(e,t=[]){for(const n of t)if(n.targetMerchandiseLines?.some(({stableId:t})=>e.includes(t))&&"available"===n.status){const e=n.methods.find(({handle:e})=>e===n.selectedDeliveryMethodHandle);if(e?.title)return e.title;continue}return null}function gL(e,t,n,r){const a=function(e,t){return[...new Set([...e.map(lL),...t.map(lL)])].map(n=>({proposed:e.find(e=>e.stableId===n),negotiated:t.find(e=>e.stableId===n)}))}(e,t);if(r)return yL(a.filter(r));const i=mL(e,n??[]),o=function(e,t=[]){return pL(e,t,e=>"MERCHANDISE_OUT_OF_STOCK"===e.code)}(e,n??[]);return yL(a.filter(e=>{if(function(e){const{proposed:t,negotiated:n}=e;return t?.quantity!==n?.quantity}(e))return!0;const t=(e.negotiated||e.proposed)?.stableId;return i.has(t)||o.has(t)}))}function fL(e,t,n){const r=e.filter(e=>function(e){return["AcceptNewTermViolation","ApplyChangeViolation","RemoveTermViolation","UnprocessableTermViolation","UnresolvableTermViolation"].includes(e.__typename)}(e)&&n.includes(e.code)).map(e=>uL(t?.lines,e.target)).filter(e=>void 0!==e);return 0===r.length?null:Array.from(new Map(r.map(e=>[e.stableId,e])).values())}function yL(e){return e.flatMap(e=>Qi(e.proposed)||null==e.proposed?[e]:e.negotiated?[{proposed:void 0,negotiated:e.negotiated}]:[])}function vL(){const{checkout:{configuration:e,negotiator:t}}=ie(),n=e.layout.isOnePage.value,{value:a}=t.current.fields.merchandiseLines,{value:i}=t.current.fields.allViolations,{currentDetour:o}=nc().value,{value:l}=t.current.fields.legacyRepresentProductsAsFees,c=t.parts.merchandiseLines.value,[u]=s(c),d=o?.type,p=a?.lines;return r(()=>{const e=e=>l?function(e){return e.filter(e=>!1===e.legacyFee)}(e):e,t="thankYou"===d?[]:e("stockProblems"===d?u:c),r=e(p??[]);return function(e,t,n,r){const a=mL(t,r),i=n.filter(({quantity:e,stableId:t})=>e>0&&!a.has(t)),o=gL(t,n,r).map(({proposed:e,negotiated:t})=>t??e),s=void 0===i||0===i.length&&o.length>0;return function(e,t,n,r){return e.flatMap(e=>{const a=t.find(({stableId:t})=>t===e.stableId),i=n&&a?a.lineAllocations:e.lineAllocations;return aL({...e,lineAllocations:i}).map(t=>function({lineAllocation:e,...t},n,r){return{key:`${t.stableId}-${e.stableId}`,stableId:t.stableId,id:e.stableId,image:t.image,title:t.title,subtitle:t.subtitle,components:t.lineComponents.map(_L),parentRelationship:t.parentRelationship,quantity:e.quantity,properties:t.properties,options:t.options,disclosures:n.disclosures,productId:n.productId,itemPrice:n.itemPrice,compareAtPrice:n.compareAtPrice,unitPrice:e.unitPrice,totalAmountBeforeReductions:e.checkoutPriceBeforeReductions,totalAmountAfterLineDiscounts:e.totalAmountAfterLineDiscounts,deferredAmount:t.deferredAmount,totalPrice:e.totalAmountBeforeReductions,sellingPlan:t.sellingPlan??null,recurringTotal:r?t.recurringTotal:null,lineDiscounts:e.allocations.filter(bL).map(t=>kL(t,e.stableId))}}(t,e,r))})}(s?o:i,t,s,e)}(n,t,r,i??[])},[u,d,n,l,p,c,i])}const _L=e=>({properties:e.properties,quantity:e.lineAllocation.quantity,stableId:e.lineAllocation.stableId,totalAmountBeforeReductions:e.lineAllocation.checkoutPriceBeforeReductions,merchandise:{deferredAmount:e.deferredAmount,digest:e.digest,disclosures:e.disclosures,giftCard:e.giftCard,image:e.image,options:e.options,itemPrice:e.itemPrice,productType:e.productType,productId:e.productId,vendor:e.vend
2or,requiresShipping:e.requiresShipping,sellingPlan:e.sellingPlan,subtitle:e.subtitle,title:e.title,variantId:e.variantId}}),bL=e=>El(e.discountDetails.discount)&&"LINE"===e.discountDetails.discount.presentationLevel,kL=(e,t)=>({id:`allocation-${t}-${Xi(e.discountDetails.title)}`,discount:e.discountDetails.discount,amount:e.amount});function PL(){const{checkout:e}=ie(),t=e.configuration.layout.isOnePage.value,n=(e.proposal.facts.merchandiseLines??[]).filter(e=>(e?.quantity??-1)>0).map((e,t)=>({key:`${t}${e.title}`,title:e.title,properties:e.properties,image:wL(e.image)??void 0,totalAmountAfterLineDiscounts:e.priceAfterDiscounts,totalAmountBeforeReductions:e.price,quantity:e.quantity,subtitle:e.variantTitle,lineDiscounts:e.appliedDiscounts.filter(SL).map(e=>CL(e,t)),parentTitle:e.parentTitle,components:[],unitPrice:null,totalPrice:e.priceAfterDiscounts})),r=vL();return[...t?r.filter(e=>e.quantity>0):r,...n]}const SL=e=>"LINE"===e.presentationLevel,wL=e=>e?{...e,altText:e.altText||""}:null,CL=(e,t)=>({id:`allocation-${t}-${Xi(e.title)}`,discount:{type:"applied",title:e.title,presentationLevel:e.presentationLevel},amount:e.amountDiscounted});function EL(){const e=T(PL()),{shop:{id:n},checkout:{negotiator:r}}=ie(),a=r.current.fields.remoteMerchandiseDetails;return t(()=>{const t=a.value?.stableIdToShopId??new Map,r=t.values(),i=new Map([[n,[]]]);for(const e of r)i.set(e,[]);const o="PurchaseOrderMerchandiseTerms"===a?.value?.mergedBuyerProposalMerchandise?.__typename&&a.value.mergedBuyerProposalMerchandise.merchandiseLines?a.value.mergedBuyerProposalMerchandise.merchandiseLines.map(e=>"PurchaseOrderMerchandiseLine"===e.__typename&&"ProductVariantSnapshot"===e.merchandise.__typename?{key:e.stableId,stableId:e.stableId,id:e.merchandise.variantId??null,image:no(e.merchandise.image),title:e.merchandise.productTitle,subtitle:e.merchandise.title??null,quantity:e.quantity.items,properties:to(e.merchandise.properties),options:e.merchandise.options??[],itemPrice:eo(e.merchandise.price),totalAmountBeforeReductions:eo(e.merchandise.price),totalAmountAfterLineDiscounts:eo(e.merchandise.price),totalPrice:eo(e.merchandise.price),deferredAmount:e.merchandise.deferredAmount?eo(e.merchandise.deferredAmount):void 0,sellingPlan:Zi(e.merchandise.sellingPlan),hideRuntimeExtensions:!0,unitPrice:null,components:[],parentRelationship:null,recurringTotal:void 0,lineDiscounts:[]}:void 0).filter(e=>Boolean(e)):[];for(const a of[...e.value,...o]){if(!a.stableId){i.get(n)?.push(a);continue}const e=t.get(a.stableId);e?i.get(e)?.push({...a,hideRuntimeExtensions:!0}):i.get(n)?.push(a)}return i})}var xL={ResourceItem:"_6zbcq51k _6zbcq51j _1fragem64 _1fragem4q _1fragemws",ResourceItemContent:"_6zbcq52d _6zbcq52c _1fragem64 _1fragem73",ResourceListHeader:"_6zbcq51h _6zbcq51g _1fragem64 _1fragem19 _1fragemzf _1fragema5",ResourceItemLineContainer:"_6zbcq520 _6zbcq51z _1fragem64 _1fragem73",ResourceItemLine:"_6zbcq523 _6zbcq522 _1fragemzp _1fragemzn _1fragemzr _1fragemzl _1fragemm8 _1fragemlo _1fragemms _1frageml4 _1fragem6y",ResourceItemLineVertical:"_6zbcq525 _6zbcq524 _1fragem4q _1fragemwi",ResourceItemLineCurved:"_6zbcq527 _6zbcq526 _1fragemws",ResourceListRowGroup:"_6zbcq56 _6zbcq55 _1fragem64 _1fragem73",ResourceList:"_6zbcq58 _6zbcq57 _1fragem64 _1fragem73",resourceListHeaderBlockPaddingVariant:{none:"_6zbcq51c",base:"_6zbcq51d _6zbcq51b _1fragemo1"},resourceListHeaderHidden:"_6zbcq51f _6zbcq51e _1fragem121",borderVariant:{none:"_6zbcq518",inner:"_6zbcq519",outer:"_6zbcq51a"},primary:"_6zbcq51i _1fragemyn",resourceItemBlockPaddingVariant:{none:"_6zbcq51n",base:"_6zbcq51o"},resourceItemContentHidden:"_6zbcq52a",resourceItemContentNoWrap:"_6zbcq52b _1fragem12y",resourceItemContentAlignSelf:{auto:"_6zbcq51q",baseline:"_6zbcq51r _6zbcq51p _1fragem28"},resourceItemContentInlineAlignment:{start:"_6zbcq51w _6zbcq51t _1fragemc8",center:"_6zbcq51x _6zbcq51u _1fragembj",end:"_6zbcq51y _6zbcq51v _1fragembt"},resourceItemContentPrimary:"_6zbcq529 _6zbcq528 _1fragemyn",groupedResourceItem:"_6zbcq51s",resourceItemSpacingVariant:{small300:"_6zbcq51l",base:"_6zbcq51m"},rowGroupSpacingVariant:{none:"_6zbcq5k",small500:"_6zbcq5l _6zbcq59 _1fragem7n",small400:"_6zbcq5m _6zbcq5a _1fragem7s",small300:"_6zbcq5n _6zbcq5b _1fragem7x",small200:"_6zbcq5o _6zbcq5c _1fragem82",small100:"_6zbcq5p _6zbcq5d _1fragem87",base:"_6zbcq5q _6zbcq5e _1fragem8c",large100:"_6zbcq5r _6zbcq5f _1fragem8h",large200:"_6zbcq5s _6zbcq5g _1fragem8m",large300:"_6zbcq5t _6zbcq5h _1fragem8r",large400:"_6zbcq5u _6zbcq5i _1fragem8w",large500:"_6zbcq5v _6zbcq5j _1fragem91"},rowSpacingVariant:{none:"_6zbcq5w",small500:"_6zbcq5x",small400:"_6zbcq5y",small300:"_6zbcq5z",small200:"_6zbcq510",small100:"_6zbcq511",base:"_6zbcq512",large100:"_6zbcq513",large200:"_6zbcq514",large300:"_6zbcq515",large400:"_6zbcq516",large500:"_6zbcq517"},visuallyHidden:"_6zbcq52e _1fragem121",visibleLine:"_6zbcq521",lineOffsetVar:"var(--_6zbcq54)"};const IL=jc("ResourceList");function AL({children:e,title:t,titleHidden:n,spacing:a="base",border:i="none"}){const o=Hc(void 0,IL),s=v(xL.ResourceList,a&&xL.rowGroupSpacingVariant[a],i&&xL.borderVariant[i]),l=t?d(IS,{id:o,children:t}):null,c=r(()=>({spacing:a}),[a]);return d(y,{children:[t&&n?d("div",{className:xL.visuallyHidden,children:l}):l,d(yu,{children:d("div",{role:"table","aria-labelledby":o,className:s,children:d(NL.Provider,{value:c,children:e})})})]})}function TL({children:e,hidden:t,blockPadding:n}){const r=v(xL.ResourceListHeader,n&&!t&&xL.resourceListHeaderBlockPaddingVariant[n]);return d("div",{role:"rowgroup",className:v(xL.ResourceListRowGroup,t&&xL.resourceListHeaderHidden),children:d("div",{role:"row",className:r,children:e})})}function LL({children:e,primary:t,hidden:n}){return d("div",{role:"columnheader",className:v(t?xL.primary:void 0,n&&xL.visuallyHidden),children:e})}const NL=f(void 0);function RL({children:e}){return e?d("div",{role:"rowgroup",className:xL.ResourceListRowGroup,children:e}):null}const ML=f(void 0);function DL({spacing:e,children:t,showLines:n=!0}){const a=r(()=>({spacing:e}),[e]),i=r(()=>({showLines:n}),[n]);return d(NL.Provider,{value:a,children:d(ML.Provider,{value:i,children:t})})}function OL({lineOffset:e=0}){const t=h(ML);
2return d("div",{"aria-hidden":!0,className:xL.ResourceItemLineContainer,style:b({[xL.lineOffsetVar]:ke(e)}),children:[d("div",{className:v(xL.ResourceItemLine,xL.ResourceItemLineVertical,t?.showLines&&xL.visibleLine)}),d("div",{className:v(xL.ResourceItemLine,xL.ResourceItemLineCurved,t?.showLines&&xL.visibleLine)})]})}function zL({alignSelf:e="auto",inlineAlignment:t,children:n,primary:r,hidden:a,minBlockSize:i,noWrap:o}){const{lineItems:s}=$m(),l=t??s?.inlineAlignment??"center",{className:c,style:u}=Um({minBlockSize:i}),p=v(xL.ResourceItemContent,xL.resourceItemContentInlineAlignment[l],e&&xL.resourceItemContentAlignSelf[e],r&&xL.resourceItemContentPrimary,a&&xL.resourceItemContentHidden,o&&xL.resourceItemContentNoWrap,c);return d("div",{role:"cell",className:p,style:u,children:a?d("div",{className:xL.visuallyHidden,children:n}):n})}function BL({children:e,blockPadding:t="none",spacing:n="base",lineOffset:r=0,className:a}){const i=h(NL),o=h(ML);i||console.warn("<ResourceItem /> components must be wrapped in a <ResourceListBody /> component.");const s=v(xL.ResourceItem,t&&xL.resourceItemBlockPaddingVariant[t],i?.spacing&&xL.rowSpacingVariant[i.spacing],n&&xL.resourceItemSpacingVariant[n],o&&xL.groupedResourceItem,a);return d("div",{role:"row",className:s,children:[d(OL,{lineOffset:r}),e]})}var VL={Badge:"_99ss3s1 _99ss3s0 _1fragem19 _1fragembj _1fragemzg _1fragemyz",displayVariant:{blockFlex:"_99ss3s6 _99ss3s2 _1fragem64",inlineFlex:"_99ss3s7 _99ss3s3 _1fragem6j",blockGrid:"_99ss3s8 _99ss3s4 _1fragem6t",inlineGrid:"_99ss3s9 _99ss3s5 _1fragem6o"},toneColorVariant:{critical:{base:"_99ss3se",subdued:"_99ss3sf"},warning:{base:"_99ss3sg",subdued:"_99ss3sh"},success:{base:"_99ss3si",subdued:"_99ss3sj"},neutral:{base:"_99ss3sl",subdued:"_99ss3sm _99ss3sk _1fragem13d"},accent:{base:"_99ss3sn",subdued:"_99ss3so"}},sizeVariant:{base:"_99ss3sc _99ss3sa _1fragemt1 _1fragemr8",small100:"_99ss3sd _99ss3sb _1fragemsw _1fragemr3"},borderRadiusVariant:{none:"_99ss3su _99ss3sp _1fragemfk _1fragemge _1fragemi2 _1fragemh8",base:"_99ss3sv _99ss3sq _1fragemfu _1fragemgo _1fragemic _1fragemhi",small:"_99ss3sw _99ss3sr _1fragemfp _1fragemgj _1fragemi7 _1fragemhd",large:"_99ss3sx _99ss3ss _1fragemfz _1fragemgt _1fragemih _1fragemhn",fullyRounded:"_99ss3sy _99ss3st _1fragemg4 _1fragemgy _1fragemim _1fragemhs"},iconVariant:"_99ss3sz _1fragem7s _1fragem9l _1fragemx7",visuallyHidden:"_99ss3s10 _1fragem121"};function FL({accessibilityLabel:e,accessibilityVisibility:t,children:n,color:r="base",borderRadius:a="fullyRounded",display:i="block",icon:o,iconPosition:s="start",id:l,size:c="base",tone
2:u="auto",visibility:p}){const m=o?d(rh,{size:c,type:o,tone:UL(u)}):null,h=d(y,{children:["start"===s?m:null,d("span",{children:n}),"end"===s?m:null]});return d("div",{id:l,className:v(VL.Badge,VL.displayVariant[o?`${i}Grid`:`${i}Flex`],VL.toneColorVariant["auto"===u?"neutral":u][r],VL.sizeVariant[qL(c)],VL.borderRadiusVariant[a],o&&VL.iconVariant,"hidden"===p&&VL.visuallyHidden),"aria-hidden":"hidden"===t||void 0,children:e?d(y,{children:[d("span",{className:VL.visuallyHidden,children:e}),h]}):h})}function UL(e){switch(e){case"accent":case"warning":case"success":return"auto";default:return e}}function qL(e="base"){switch(e){case"small":case"small-100":return"small100";default:return e}}function jL(e,t){for(const n of t){const t=n.lineAllocations.findIndex(t=>t.stableId===e),r=n.lineAllocations[t];if(t>=0&&r)return{lineAllocation:r,parent:n,index:t}}return null}function HL({stableId:e,merchandiseLines:t}){if(!e)return null;const n=jL(e,t);if(!n)return null;const{parent:r,index:a}=n;return iL(r,a)}function $L(){const{i18n:e}=ie();function t(t){return e.formatCurrency(t.amount,{currency:t.currencyCode,form:"short"})}return function({fixedPrice:n,recurringPrice:r,fixedPriceCount:a,interval:i,intervalCount:o}){const s=(()=>{switch(i){case"year":return e.translate("subscriptions.recurring_total_intervals.year",{count:o});case"month":return e.translate("subscriptions.recurring_total_intervals.month",{count:o});case"week":return e.translate("subscriptions.recurring_total_intervals.week",{count:o});case"day":return e.translate("subscriptions.recurring_total_intervals.day",{count:o});default:return""}})();return n&&a?function(t,n,r,a){return`${e.translate("subscriptions.recurring_totals_with_policies.first_cycles",{count:r,total_price:n})}${e.translate("subscriptions.recurring_totals_with_policies.following_cycles",{total_price:t,interval:a})}`}(t(r),t(n),a,s):e.translate("subscriptions.recurring_totals",{total_price:t(r),interval:s})}}function YL(){const e=$L();return function(t){return t?t.map(e):void 0}}function WL({available:e,name:t,value:n}){const r=`${t}: ${n}`;return"string"==typeof n&&0===n.lastIndexOf("https://cdn.shopify.com",0)?d(Wf,{href:n,children:d(GL,{condition:e,children:d(Vf,{size:"small",color:"subdued",children:t})})}):d(GL,{condition:e,children:d(Vf,{size:"small",color:"subdued",children:r})})}function GL({condition:e,children:t}){return!1===e?d(Vf,{type:"redundant",children:t}):t}function JL({properties:e,available:t}){const n=e.flatMap(({name:e,visible:n,value:r,sourceType:a})=>n&&"MerchandisePropertyValueJson"!==a&&""!==r&&null!==r?[d(Nf,{accessibilityRole:"list-item",children:d(WL,{available:t,name:e,value:r})},e)]:[]);return n.length>0?d(Jf,{accessibilityRole:"unordered-list",gap:"small-400",children:n}):null}function KL({id:e,deferredAmount:n,options:a,properties:i,recurringTotal:o,sellingPlan:s,subtitle:l,title:c,titleSize:u,totalPrice:p,children:m,titleAccessory:h,blockLayoutContent:g,remoteShopName:f,hasFailed:y,hideRuntimeExtensions:v}){const{lineItems:{optionsColor:_="subdued",optionsFormat:b="inline",optionsSeparator:k="comma",optionsTypography:P={},titleTypography:S={}}}=$m(),w=r(()=>e&&!v?{stableId:e}:null,[e,v]),C=u??"small",E=P.size??"small",{i18n:x,checkout:{negotiator:I}}=ie(),A=a&&a.length>0,T="middot"===k?" · ":", ",L=$L(),{value:N}=I.current.fields.merchandiseLines,R=nc(),M=Gw(t(()=>"thankYou"===R.value.currentDetour?.type?"Checkout::ThankYou::CartLineDetails::RenderAfter":"Checkout::CartLineDetails::RenderAfter").value),D=function({stableId:e,merchandiseLines:t}){const n=HL({stableId:e,merchandiseLines:t});return!n?.variantId}({stableId:e,merchandiseLines:N?.lines??[]})?[]:M,O={size:E,color:_},z={size:E,color:_};return d(Nf,{className:"dDm6x",children:[f||y?d(Jf,{direction:"inline",gap:"small-300",children:[f?d(Vf,{size:"small",color:"subdued",children:f}):null,y?d(FL,{icon:"alert-circle",tone:"critical",children:x.translate("order_summary.unconfirmed_label")}):null]}):null,d(sx,{size:C,children:[d(QL,{condition:"bold"===S.weight,children:c}),h]}),d(Jf,{children:[g,"inline"===b&&l?d(sx,{...z,children:l}):null,"inlineDescriptionList"===b&&A?d(sx,{...z,children:a?.map(({name:e,value:t})=>`${e}: ${t}`).join(T)}):null,"descriptionList"===b&&A?d(Nf,{accessibilityRole:"unordered-list",children:a?.map(({name:e,value:t})=>d(Nf,{accessibilityRole:"list-item",children:d(Vf,{...O,children:`${e}: ${t}`})},e))}
2):null,s?.name?d(sx,{...z,children:s.name}):null,o&&o.fixedPrice&&o.fixedPriceCount?d(sx,{...z,children:L(o)}):null,i&&d(JL,{properties:i}),m,w?d(mT,{customizations:D,options:w}):null]})]})}function QL({condition:e,children:t}){return e?d(Vf,{type:"strong",children:t}):t}function XL(e,t){if(t)return e?.embedder?{default:t.two,one:t.two,two:t.four,four:t.four}:{default:t.one,one:t.one,two:t.two,four:t.four}}const ZL=w({displayName:"ProductDisclosuresDetails",load:()=>C(()=>ul(()=>import("./7d468a18.CIuIZYBd.js"),__vite__mapDeps([246,2,1,3,4,5,7,8,9,10,11]))),suspense:!1});var eN={Image:"_1h3po427 _1h3po426 _1fragem5u _1fragemvo",Wrapper:"_1h3po421",aspectRatio:"_1h3po425 _1h3po424 _1fragemws _1fragemzf",aspectRatioVar:"var(--_1h3po420)",inlineSizeVariant:{fill:"_1h3po429",auto:"_1h3po42a"},skeleton:"_1h3po42c",vars:{animationDelay:"var(--_1h3po422)",animationDuration:"var(--_1h3po423)"},hidden:"_1h3po428"};const tN=Ym(function({source:e,src:t,srcSet:n,sizes:r,alt:i="",objectFit:o="contain",loading:l="eager",aspectRatio:c="1/1",accessibilityRole:u="img",border:p="none",borderRadius:m="none",borderStyle:h,borderWidth:g,className:f,id:y,inlineSize:_="fill",onError:k,onLoad:P}){const S=["presentation","none"].includes(u),{className:w}=Um({...Ne({border:p,borderStyle:h,borderWidth:g}),borderRadius:m,objectFit:o}),C=vw(t,e),E=!(t||e||n),x=t??_w(e)??n??"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",[I,A]=s(E);a(()=>{if(!E)return void A(!1);const e=setTimeout(()=>A(!1),100);return()=>{clearTimeout(e)}},[E]);const{animationEnabled:T,delay:L,onAnimationStart:N,onAnimationIteration:R}=Aw(),M=k?{onError:e=>k(e.nativeEvent)}:{},D=P?{onLoad:e=>P(e.nativeEvent)}:{};return d(nN,{condition:S,children:d(rN,{condition:"auto"!==_,aspectRatio:c,children:d(fw,{condition:Boolean(C),children:[C,d("img",{...M,...D,src:x,srcSet:n,sizes:r,className:v(eN.Image,eN.inlineSizeVariant[_],E&&T&&eN.skeleton,E&&I&&eN.hidden,w,f),style:{...b({[eN.vars.animationDelay]:`${L}ms`,[eN.vars.animationDuration]:"4000ms"})},onAnimationStart:N,onAnimationIteration:R,loading:l,id:y,role:S?u:void 0,alt:S?"":i,"aria-hidden":E?"true":void 0})]})})})});function nN({children:e,condition:t}){return t?d(Nf,{accessibilityVisibility:"hidden",children:e}):d(y,{children:e})}function rN({children:e,condition:t,aspectRatio:n}){const r=function(e){if("number"==typeof e)return e;if(null==e||"string"!=typeof e||"auto"===e)return;if(e.includes("/")){const t=0,[n,r]=e.split("/").map(e=>{const t=Number(e);return isNaN(t)||""===e.trim()?void 0:t});if(void 0!==n&&n>t&&void 0!==r&&r>t)return n/r}const t=Number(e);return isNaN(t)?void 0:t}(n);return t&&void 0!==r?d("div",{className:v(eN.Wrapper,eN.aspectRatio),style:b({[eN.aspectRatioVar]:`${r}`}),children:e}):d(y,{children:e})}const aN={small:16,large:24};function iN({disclosure:e,size:t}){const n=e.symbol;if(n){const e=`${aN[t]}px`,r="small"===t?"":n.altText??"";return d(Nf,{inlineSize:e,blockSize:e,children:d(tN,{src:n.one,srcSet:`${n.one} 1x, ${n.two} 2x, ${n.four} 4x`,alt:r,accessibilityRole:"small"===t?"presentation":"img",aspectRatio:"1/1",objectFit:"contain"})})}return d(rh,{type:"info",size:"small"===t?"small":"large-100",tone:"auto"})}const oN=jc("product-disclosure-modal-"),sN=jc("product-disclosure-tooltip-");function lN({disclosures:e,title:n}){const{checkout:{negotiator:r}}=ie(),a=rI("deliveryNext");return t(()=>!a.value&&(0===r.initialUnresolvedFields.value.size||"fetch_failed"===r.pendingFieldsNegotiation.value?.status)).value&&e?.length?d(cN,{disclosures:e,title:n}):null}function cN({disclosures:e,title:t}){const{i18n:n}=ie(),r=Hc(void 0,oN),a=Hc(void 0,sN),i=ZL.usePrefetch(),o=()=>{i()},s=n.translate("order_summary.product_disclosures.title"),l=n.translate("tooltip.accessibility_label_context",{context:t});return d(y,{children:[d(Wf,{commandFor:r,interestFor:a,accessibilityLabel:l,onFocus:o,onMouseEnter:o,textDecoration:"none",tone:"monochrome",verticalAlign:"text-bottom",children:d(rh,{type:"alert-triangle",size:"small"})}),d(sm,{id:a,children:uN(e)}),d(qx,{id:r,heading:s,children:d(ZL,{disclosures:e})})]})}function uN(e){return d(Nf,{inlineAlignment:"start",children:d(Jf,{gap:"small-200",children:e.map(e=>d(Qm,{gridTemplateColumns:"auto minmax(0, 1fr)",gap:"small-200",children:[d(Qm,{blockSize:"1lh",placeItems:"center",children:d(iN,{disclosure:e,size:"small"})}),d(sx,{textAlign:"start",children:e.title})]},e.id))})})}function dN({amount:e}){const{i18n:t}=ie();if(e.amount<=0)return null;const n=t.formatCurrency(-e.amount,{currency:e.currencyCode,form:"short"}),r=t.translate("order_summary.compare_at_sale",{sale_amount:n});return d(sx,{type:"small",color:"subdued",children:r})}const pN=f(null);var mN="_1mwdekd1 _1mwdekd0 _1fragem126 _1fragemzg _1fragem5u";function hN({children:e,id:t}){const{onToggle:n,isOpen:r,contentId:a}=h(pN)??{};return e?void 0!==r?d("button",{id:t,className:mN,onClick:n,"aria-controls":a,"aria-expanded":r,type:"button",children:[e,d(rh,{size:"small-200",type:r?"chevron-up":"chevron-down",className:"_1mwdekd3 _1mwdekd2 _1fragem6e"})]}):d("p",{id:t,className:mN,children:e}):null}const gN=jc("Details"),fN=function(e){const t=_(function(t,r){const{open:i,defaultOpen:o=!1,onToggle:l,id:c}=t,{upsertInteraction:u,deleteInteraction:p}=Fd(),[m,h]=s(o),g=i??m,f=n(()=>{const e=g?"open":"closed",t=g?"closed":"open";void 0===i&&h(!g),l?.(e,t)},[g,l,i]),y=n(()=>{g&&(void 0===i&&h(!1),l?.("open","closed"))},[g,l,i]),v=n(()=>{g||(void 0===i&&h(!0),l?.("closed","open"))},[g,l,i]);return a(()=>()=>{c&&p(c)},[c]),a(()=>{c&&u({id:c,type:"command",kind:"visibility",defaultCommand:"--toggle",hide:y,show:v,toggle:f,visible:g})},[c,g,y,v,f,u]),d(e,c&&void 0===i?{...t,open:m,onToggle:f,ref:r}:{...t,ref:r})});return t.displayName=`ToggleCommandTargetComponent(${e.displayName||e.name||"Component"})`,t}(function({open:e,defaultOpen:t=!1,onToggle:a,onAfterToggle:o,id:l,summary:c,content:u,toggleTransition:p="auto"}){const m=void 0!==e,[h,g]=s(t),f=m?e:h,y=`${Hc(l,gN)}-content`,v=i(),_=n(e=>{e?.preventDefault();const t=e=>{"function"==typeof a&&a(e?"open":"closed",e?"closed":"open")};m?t(f):g(e=>(t(e),!e))},[m,f,a]);(!u||Array.isArray(u)&&u.length<1)&&console.warn("Details: content is required for toggle functionality");const b="string"==typeof c?d(hN,{children:c}):c,k=r(()=>({isOpen:f,onToggle:_,contentId:y}),[y,_,f]);return d(pN.Provider,{value:k,children:d("div",{id:l,children:[b,d(Id,{id:y,open:f,duration:"auto"===p?"base":"none",onTransition:e=>{const t="entering"===v.current&&"entered"===e,n="exiting"===v.current&&"exited"===e;(t||n)&&"function"==typeof o&&o(t?"closed":"open",t?"open":"closed"),v.current=e},children:u})]})})});function yN({accessibilityLabel:e,accessibilityRole:t="generic",accessibilityVisibility:n="visible",alignSelf:r="auto",background:a="transparent",backgroundHoverAndFocus:i,blockSize:o="auto",border:s="none",borderColor:l,borderRadius:c="none",borderStyle:u,borderWidth:p,children:m,display:h="auto",gridColumn:g="auto",gridRow:f="auto",id:_,inlineSize:b="auto",maxBlockSize:k="none",maxInlineSize:P="none",minBlockSize:S="0",minInlineSize:w="0",overflow:C="visible",padding:E="none",paddingBlock:x,paddingBlockEnd:I,paddingBlockStart:A,paddingInline:T,paddingInlineEnd:L,paddingInlineStart:N}){const R=wd(),{Element:M,role:D}=Km(t,{defaultElement:R?"span":"div"}),{className:O,style:z,styleElement:B}=Um({alignSelf:r,backgroundColor:a,backgroundColorHoverAndFocus:i,blockSize:o,...Ne({border:s,borderColor:l,borderStyle:u,borderWidth:p}),borderRadius:c,display:h,gridColumn:g,gridRow:f,inlineSize:b,maxBlockSize:k,maxInlineSize:P,minBlockSize:S,minInlineSize:w,padding:E,paddingBlock:x,paddingBlockEnd:I,paddingBlockStart:A,paddingInline:T,paddingInlineEnd:L,paddingInlineStart:N},{transforms:{display:gd}});return d(y,{children:[B,d(M,{"aria-hidden":"hidden"===n||void 0,"aria-label":e,className:v("exclusive"===n&&"_1r0jjrp1 _1fragem121","hidden"===C&&"_1r0jjrp0 _1fragemup _1fragemv4",O),id:_,role:D,style:z,children:m})]})}const vN={auto:"block",inline:"inlineBlock",block:"block"},_N=e=>"auto"===e?"auto":e in fm?fm[e]:void 0,bN=e=>vN[e];function kN({blockSize:e="auto",display:t="auto",inlineSize:n="auto",id:r}){const{className:a,style:i}=Um({blockSize:e,display:t,inlineSize:n},{transforms:{blockSize:_N,display:bN,inlineSize:_N}});return d("div",{className:v(a),id:r,style:i})}function PN({components:e,id:t}){const a=e.some(({merchandise:e})=>e.disclosures?.length),[i,o]=s(e.length<=10||a),l=n(()=>{o(e=>!e)},[]),{i18n:c,embed:u}=ie(),{lineItems:{optionsColor:p="subdued"}}=$m(),m={size:"small",color:p},h=Gw("Checkout::CartLineDetails::RenderLineComponents"),g=r(()=>e.reduce((e,{quantity:t})=>e+t,0),[e]),f=r(()=>t?{stableId:t}:null,[t]);if(0===e.length)return null;if(f&&h.length>0){const t=e.filter(({merchandise:e})=>e.disclosures?.length);return d(Jf,{gap:"base",overflow:"hidden",children:[d(mT,{customizations:h,options:f}),t.map(({stableId:e,merchandise:t})=>d(Vf,{size:"small",children:[t.title," ",d(lN,{disclosures:t.disclosures,title:t.title})]},e))]})}const v=i?c.translate("order_summary.collapse_component_information",{count:g}):c.translate("order_summary.expand_component_information",{count:g});return d(y,{children:[d(fN,{open:i,onToggle:l,summary:d(hN,{children:d(Vf,{color:"subdued",size:"small",children:v})}),content:d(Nf,{paddingBlockStart:"small-400",children:d(Jf,{accessibilityRole:"unordered-list",gap:"small-100",children:e.map(({stableId:e,merchandise:{title:t,subtitle:n,image:r,sellingPlan:a,disclosures:i},quantity:o,properties:s})=>{const l=c.translate("order_summary.component_quantity_title",{quantity:o,product_title:t}),p=XL(u,r);return d(Qm,{accessibilityRole:"list-item",gridTemplateColumns:"auto minmax(0, 1fr)",gap:"small-300",children:[d(yN,{alignSelf:"start",children:d(Pw,{size:"small",src:p?.one,srcSet:p?`${p.one} 1x, ${p.two} 2x, ${p.four} 4x`:void 0,alt:r?.altText})}),d(yN,{alignSelf:"center",children:d(Jf,{children:[d(Vf,i?.length?{size:"small",children:[l," ",d(lN,{disclosures:i,title:t})]}:{size:"small",children:l}),n&&d(Vf,{...m,children:n}),a&&d(Vf,{...m,children:a.name}),s&&d(JL,{properties:s})]})})]},e)})})})}),d(kN,{blockSize:"small-400"})]})}function SN({parentTitle:e}){const{i18n:t}=ie(),{lineItems:{optionsColor:n}}=$m(),r={type:"small",color:n??"subdued"},a=t.translate("order_summary.group_title_label",{group_title:e});return d(sx,{...r,children:a})}function wN(e){return!0===e.checkoutHideZeroValueDiscountLines}function CN({discount:e,amount:t}){const{i18n:n,shop:r}=ie();if(wN(r)&&0===t.amount)return null;const a=t.amount>0?`(${n.formatCurrency(-t.amount,{currency:t.currencyCode,form:"short"})})`:null,i=("code"===e.type&&e.codeHidden?n.translate("order_summary.discount_title"):e.title).toUpperCase();return d(Qm,{gridAutoFlow:"column",gridAutoColumns:"1fr",gridTemplateColumns:"minmax(auto, max-content) minmax(0, 1fr)",gridTemplateRows:"minmax(0, 1fr)",gap:"small-400",alignItems:"center",alignContent:"center",children:[d(rh,{type:"discount",size:"small"}),d(Vf,{accessibilityVisibility:"exclusive",children:n.translate("order_summary.discount_code_aria_text")}
2),d(sx,{type:"small",color:"subdued",children:[d(Vf,{dir:"auto",children:i}),a?` ${a}`:null]})]},e.title)}function EN({totalAmountBeforeReductions:e,totalAmountAfterDiscounts:t,size:n}){const{i18n:r}=ie(),a=t.amount>0?r.formatCurrency(t.amount,{currency:t.currencyCode,form:"short"}):d(Vf,{letterCase:"uppercase",children:r.translate("order_summary.free_total_label")});return d(y,{children:[d(Vf,{accessibilityVisibility:"exclusive",children:r.translate("order_summary.original_price")}),d(Vf,{size:"small",color:"subdued",type:"redundant",children:r.formatCurrency(e.amount,{currency:e.currencyCode,form:"short"})}),d(Vf,{accessibilityVisibility:"exclusive",children:r.translate("order_summary.price_after_discount_aria_text")}),d(sx,{size:n,children:a})]})}function xN({totalAmountBeforeReductions:e,totalAmountAfterLineDiscounts:t,compareAtTotal:n,presentationLevel:r,hasDeferredAmount:a,hasFailed:i,size:o}){const{i18n:s}=ie(),{lineItems:{priceTypography:l={}}}=$m();let c;if(i?c="redundant":"bold"===l.weight&&(c="strong"),n&&e.amount<n.amount)return d(EN,{totalAmountAfterDiscounts:t,totalAmountBeforeReductions:n,size:o});if(e.amount>t.amount&&"LINE"===r)return d(EN,{totalAmountAfterDiscounts:t,totalAmountBeforeReductions:e,size:o});const u=0===e.amount&&!a,p=t;return d(Vf,{translate:u,letterCase:u?"uppercase":void 0,type:c,tone:i?"critical":void 0,size:o,children:u?s.translate("order_summary.free_total_label"):s.formatCurrency(p.amount,{currency:p.currencyCode,form:"short"})})}function IN({unitPrice:e}){const t=function(e){const{i18n:t}=ie(),r=function(){const{i18n:e}=ie();return n(t=>{switch(t){case"MG":return e.translate("units.milligram");case"G":return e.translate("units.gram");case"KG":return e.translate("units.kilogram");case"ML":return e.translate("units.milliliter");case"CL":return e.translate("units.centiliter");case"L":return e.translate("units.liter");case"M3":return e.translate("units.cubic_meter");case"MM":return e.translate("units.millimeter");case"CM":return e.translate("units.centimeter");case"M":return e.translate("units.meter");case"M2":return e.translate("units.square_meter");case"OZ":return e.translate("units.ounce");case"LB":return e.translate("units.pound");case"FLOZ":return e.translate("units.fluid_ounce");case"PT":return e.translate("units.pint");case"QT":return e.translate("units.quart");case"GAL":return e.translate("units.gallon");case"IN":return e.translate("units.inch");case"FT":return e.translate("units.foot");case"YD":return e.translate("units.yard");case"FT2":return e.translate("units.square_foot");case"ITEM":return e.translate("units.item");default:return t}},[e])}();if(null===e)return"";const{referenceValue:a,referenceUnit:i}=e.measurement,o=r(i),s=a.toString(),l=t.formatCurrency(e.price.amount,{currency:e.price.currencyCode,form:"short"});if("ITEM"===i){if(1===a)return t.translate("order_summary.unit_price.per_item.single",{price:l});if(a>1)return t.translate("order_summary.unit_price.per_item",{price:l,count:a})}else{if(1===a)return t.translate("order_summary.unit_price.per_unit.single",{price:l,unit:o});if(a>1)return t.translate("order_summary.unit_price.per_unit.plural",{price:l,unit:o,count:s})}return""}(e);return null===e?null:d(sx,{type:"small",color:"subdued",children:t})}function AN({unitPrice:e,itemPrice:t,quantity:n}){const{i18n:r,checkout:{negotiator:a}}=ie(),i=a.current.fields.buyerIdentity.value?.purchasingCompany,o=Boolean(i)&&!e&&n>1&&t;return e?d(IN,{unitPrice:e}):o?d(y,{children:d(sx,{type:"small",color:"subdued",children:[d(Vf,{accessibilityVisibility:"hidden",children:r.translate("order_summary.price_per_item.label",{price:r.formatCurrency(t.amount,{currency:t.currencyCode,form:"short"})})}),d(Vf,{accessibilityVisibility:"exclusive",children:r.translate("order_summary.price_per_item.accessibility_label",{price:r.formatCurrency(t.amount,{currency:t.currencyCode,form:"short"})})})]})}):null}const TN={small200:"small-200",small100:"small",base:"base",large100:"large",large200:"large-200"};function LN(e="base"){return TN[e]}function NN(e){const t=e.parentRelationship;return d(t?DL:y,{spacing:"small100",children:d(RN,{...e})})}function RN({id:e,quantity:t,itemPrice:n,compareAtPrice:a,unitPrice:i,lineDiscounts:o,deferredAmount:s,totalPrice:l,sellingPlan:c,options:u,recurringTotal:p,title:m,subtitle:h,image:g,properties:f,disclosures:v,isHsaEligible:_,totalAmountBeforeReductions:b,totalAmountAfterLineDiscounts:k,components:P,hasReturnability:S,parentTitle:w,parentRelationship:C,remoteShopName:E,hasFailed:x,hideRuntimeExtensions:I,hidePrice
2:A,className:T}){const{shop:L,i18n:N,embed:R}=ie(),M=XL(R,g),{lineItems:{quantityVisibility:D="visible",priceLayout:O="inline",priceTypography:z={},titleTypography:B={}},merchandiseThumbnail:{size:V}={}}=$m(),F=L.hasFlagEnabled(ro),U=null!==C,q=F&&a?{amount:a.amount*t,currencyCode:a.currencyCode}:null,j=r(()=>{if(F&&a&&n){const e=(a.amount-n.amount)*t;return e>0?{amount:e,currencyCode:a.currencyCode}:null}return null},[F,a,n,t]),H=z.size,$=U?"small":LN(V),Y=B.size??"base",{blockSize:W}=xw($),G="hidden"===D||1===t&&"visibleWhenMultiple"===D?void 0:t,J=A?null:d(xN,{totalAmountBeforeReductions:b,totalAmountAfterLineDiscounts:k,compareAtTotal:q,presentationLevel:o.length||j?.amount?"LINE":"CART",hasDeferredAmount:Boolean(s?.amount),hasFailed:x,size:H});return d(BL,{className:T,lineOffset:C?0:W/2,children:[d(zL,{inlineAlignment:"start",children:d(Pw,{size:$,src:M?.one,srcSet:M?`${M.one} 1x, ${M.two} 2x, ${M.four} 4x`:void 0,alt:g?.altText,totalItems:G})}),d(zL,{primary:!0,alignSelf:"baseline",minBlockSize:`${W}px`,children:d(KL,{id:e,title:m,titleSize:Y,subtitle:h,properties:f,sellingPlan:c,options:u,recurringTotal:p,totalPrice:l,deferredAmount:s,titleAccessory:v?.length?d(y,{children:[" ",d(lN,{disclosures:v,title:m})]}):void 0,blockLayoutContent:"block"===O?J:void 0,remoteShopName:E,hasFailed:x,hideRuntimeExtensions:I,children:[_?d(Vf,{size:"small",color:"subdued",children:N.translate("payment.shop_pay_hsa.eligible_product")}):null,S?d(Vf,{size:"small",color:"subdued",children:N.translate("amazon_pay.prime_returnability")}):null,d(AN,{unitPrice:i,itemPrice:n,quantity:t}),j?.amount?d(dN,{amount:j}):null,o.length>0||P.length>0?d(y,{children:[o.map(e=>d(CN,{discount:e.discount,amount:e.amount},e.id)),d(PN,{components:P,id:e})]}):null,P.length<1&&w?d(SN,{parentTitle:w}):null]})}),d(zL,{hidden:!0,children:d(Vf,{children:t})}),"inline"===O?d(zL,{alignSelf:"baseline",children:d(Nf,{className:"VnYYd",inlineAlignment:"end",children:J})}):null]})}function MN(e){switch(e){case"PICK_UP":return"kAxbv";case"SHIPPING":return"KKoGf";default:return}}function DN(e){return e!==Me.Country&&e!==Me.CountryProvince}function ON({deliveryMethod:e,localDelivery:t,subscriptionDelivery:n}){const{title:r,carrierName:a}=e;return t||n||(!a||r.toLowerCase().includes(a.replace(/[^\w\s]/,"").toLowerCase())?r:`${a} ${r}`)}function zN(e,t,n,r,a){const i=cv(n??[],e?.handle);let o,s,l,c,u=function(e,t,n,r){return t?"unavailable"===n||!r?.maxDeliveryDateTime&&!r?.minDeliveryDateTime:!e}(e?.displayCheckoutRedesign,t,a,i);return r||(o=i?.minDeliveryDateTime||e?.minDeliveryDateTime,s=i?.maxDeliveryDateTime||e?.maxDeliveryDateTime,l=function(e,t){return e?.deliveryExpectationPresentmentTitle?.short||t?.short}(i,e?.deliveryPromisePresentmentTitle),c=i?.brandedPromise||e?.brandedPromise,i?.minDeliveryDateTime&&i?.maxDeliveryDateTime&&t&&!c&&(u=!0)),{showEstimatedDeliveryLabel:u,asyncShopPromiseEnabled:t,deliveryExpectationDateTime:i?.minDeliveryDateTime&&i?.maxDeliveryDateTime,estimatedDeliveryLabelTitle:l,minDeliveryDate:o,maxDeliveryDate:s,brandedPromise:c}}function BN(e){const t=[],n=[];return e.forEach(e=>{"SUBSCRIPTION"===e.type?t.push(e):n.push(e)}),{subscriptionLines:t,oneTimePurchaseLines:n}}function VN(e,t,n){const r=cv(t,e.handle);let a;return r&&r.minDeliveryDateTime&&r.maxDeliveryDateTime&&n&&(a=r),{deliveryExpectation:a,shopPromise:r?.brandedPromise}}function FN(e){return e.reduce((e,{quantity:t})=>e+t,0)}function UN(e){return Object.values(e.reduce((e,t)=>{const{id:n,stableId:r,quantity:a}=t,i=n||r;return i?(e[i]?e[i].quantity+=a:e[i]={...t},e):e},{}))}function qN(e){if(!e)return[];const t=e.reduce((e,t)=>{const n=t?.flatRateGroupId??yl(),r=e[n];if(r){const e=r.targetMerchandiseLines.map(e=>e.digest);t.targetMerchandiseLines.filter(t=>!e.includes(t.digest)).forEach(e=>r.targetMerchandiseLines.push(e))}else e[n]=t;return e},{});return Object.values(t)}function jN(e,t){const n=i(null),r=i(new Set),a=new Set(e),o=n.current,s=null==t?null:new Set(t);if(null!=o){for(const e of a)o.has(e)||null!=s&&!s.has(e)||r.current.add(e);for(const e of r.current)a.has(e)||r.current.delete(e)}return n.current=a,r.current}const HN={position:"end",source:"magnify"};function $N({hasFilter:e,maxItems:t,merchandiseLines:n,totalLineQuantities:a,deliveryGroup:i}){const[o,l]=s(""),{i18n:c,checkout:u}=ie(),p=new Set(io(u.proposal.negotiated.fields.paymentMethods.value)),m=void 0===t?n.map(e=>e.key):n.slice(0,t).map(e=>e.key),h=jN(n.map(e=>e.key),m),g=MN(i),{value:f}=si(),{value:v}=u.negotiator.current.fields.deliveryExpectations,_=r(()=>function({deliveryLines:e,deliveryExpectations:t}){const n={};if(!e)return n;const r=function(e){const t={};
2return e?.deliveryExpectationLines?.forEach(e=>{e.deliveryStrategyHandle&&(t[e.deliveryStrategyHandle]=e)}),t}(t);return e.forEach(e=>{if("available"!==e.status)return;const t=e.methods.find(t=>t.handle===e.selectedDeliveryMethodHandle);if(!t)return;const{brandedPromise:a,handle:i}=t;if(!a)return;if(a.handle!==ao)return;const o=r[i],s=o?.returnability??!1;e.targetMerchandiseLines?.forEach(e=>n[e.stableId]={brandedPromise:a,hasReturnability:s})}),n}({deliveryLines:f,deliveryExpectations:v}),[f,v]),b=r(()=>{const e=o.toLowerCase().split(" ").filter(Boolean);return n.filter(t=>e.every(e=>t.title.toLowerCase().includes(e)||t.subtitle?.toLowerCase().includes(e)))},[o,n]),k=r(()=>b?.reduce((e,t)=>e+t.quantity,0),[b]),P=n.length;return d(y,{children:[e&&d(y,{children:[d(wA,{autoFocus:!0,icon:HN,controlledValue:o,onInput:e=>l(e),label:c.translate("order_summary.more_items_modal.search_item")}),d(kN,{blockSize:"large-300"})]}),e&&o&&d(y,{children:[d(Jf,{direction:"inline",justifyContent:"space-between",children:[d(Vf,{color:"subdued",children:c.translate("order_summary.more_items_modal.number_items_shown",{shownNumber:k,totalNumber:a||P||0})}),d(Wf,{onClick:()=>l(""),children:c.translate("order_summary.more_items_modal.clear_search")})]}),d(kN,{blockSize:"large-300"})]}),e&&0===b.length?d(Jf,{direction:"inline",justifyContent:"center",gap:"small-400",padding:"none none large-300 none",children:[d(Nf,{inlineSize:"56px",children:d(rh,{size:"fill",type:"alert-circle"})}),d(sx,{textAlign:"center",children:c.translate("order_summary.more_items_modal.empty_results",{searchText:o})})]}):d(AL,{title:c.translate("order_summary.shopping_cart_label"),titleHidden:!0,children:[d(TL,{hidden:!0,children:[d(LL,{hidden:!0,children:c.translate("order_summary.product_image_label")}),d(LL,{hidden:!0,children:c.translate("order_summary.description_label")}),d(LL,{hidden:!0,children:c.translate("order_summary.quantity_label")}),d(LL,{hidden:!0,children:c.translate("order_summary.price_label")})]}),d(RL,{children:b.map(({key:e,...n},r)=>{if(void 0!==t&&r>=t)return null;const a=e.substring(0,e.lastIndexOf("-"));return d(NN,{...n,isHsaEligible:Boolean(n.productId&&p.has(n.productId)),..._[a]??{},className:h.has(e)?g:void 0},e)})})]})]})}function YN({merchandiseLines:e,modalId:t="merchandise-lines-modal",totalLineQuantities:n,deliveryGroup:r}){const{i18n:a}=ie(),i=e.length,o=i>16?12:16;return d(y,{children:[d($N,{maxItems:o,merchandiseLines:e,totalLineQuantities:n,deliveryGroup:r}),i>o&&d(Jf,{direction:"inline",gap:"base",justifyContent:"center",padding:"large-100 none none none",children:[d(jf,{inlineAlignment:"center",commandFor:t,children:a.translate("order_summary.view_all_items",{count:n||i||0})}),d(qx,{id:t,heading:a.translate("order_summary.number_items",{count:n||i||0}),blockSize:"100%",children:d($N,{hasFilter:!0,merchandiseLines:e,totalLineQuantities:n})})]})]})}function WN({merchandiseLinesByDeliveryType:e}){const{i18n:n}=ie(),r=t(()=>{const t=new Set;return Array.from(e.value.entries()).map(([e,n])=>({group:e,merchandiseLines:n.map(e=>{const n=t.has(e.key);return t.add(e.key),n?{...e,hidePrice:n}:e}),totalLineQuantities:n.reduce((e,t)=>e+t.quantity,0)}))}),a=e=>{switch(e){case"PICK_UP":return n.translate("delivery_options.pickup");case"SHIPPING":return n.translate("delivery_options.ship");case"NOT_REQUIRED":return n.translate("delivery_options.digital_product")}},i=e=>{switch(e){case"PICK_UP":return"merchandise-lines-modal-pick-up";case"SHIPPING":return"merchandise-lines-modal-shipping";case"NOT_REQUIRED":return"merchandise-lines-modal-not-required"}};return d(Jf,{gap:"large-200",children:d($,{each:r,getKey:e=>e.group,children:({group:e,merchandiseLines:t,totalLineQuantities:n})=>d(Jf,{gap:"base",children:[d(IS,{level:2,children:a(e)}),d(YN,{merchandiseLines:t,modalId:i(e),totalLineQuantities:n,deliveryGroup:e})]})})})}function GN({merchandiseLinesByShop:e,totalLineQuantities:t}){const{i18n:n,shop:{id:i,name:o,remoteShopsConfigMap:s},observability:l}=ie(),c=new Map,u=e.get(i)??[],p=u.length>0;p&&c.set(n.translate("order_summary.from_shop_heading",{shop_name:o}),{lines:u,includeTotalLineQuantities:!0});const m=r(()=>Array.from(e.entries()).filter(([,e])=>e.length>0).filter(([e])=>e!==i),[e,i]),h=m.filter(([e])=>!s?.get(e)?.name).map(([e])=>e),g=h.length>0,f=h.join(",");a(()=>{0!==h.length&&l.error(new KN("Missing remote shop names",{metadata:{shopIdsWithMissingNames:h}}))},[f,l]);const y=g||m.length>1,v=r(()=>m.flatMap(([e,t])=>t.map(t=>({...t,...y?{remoteShopName:s?.get(e)?.name}:{}}))),[m,y,s]);if(0===v.length)l.error(new JN);else{const e=g||p?n.translate("order_summary.from_other_stores_heading"):n.translate("order_summary.from_multiple_stores_heading"),t=y?e:n.translate("order_summary.from_shop_heading",{shop_name:s.get(m[0][0]).name});c.set(t,{lines:v,includeTotalLineQuantities:!1})}return d(Jf,{gap:"large-200",children:Array.from(c.entries()).map(([e,{lines:n,includeTotalLineQuantities:r}])=>d(Jf,{gap:"base",children:[d(IS,{level:2,children:e}),d(YN,{merchandiseLines:n,totalLineQuantities:r?t:void 0})]},e))})}class JN extends cl{constructor(){super("MerchandiseLinesWithRemote should not be used if there aren't any remote merchandise lines"),this.name="MissingRemoteShopNamesError",this.defaultGroupingHash="missing_remote_shop_names"}}class KN extends cl{constructor(){super(...arguments),this.name="MissingRemoteShopNamesError",this.defaultGroupingHash="missing_remote_shop_names"}}const QN=["PICK_UP","SHIPPING","NOT_REQUIRED"];function XN(e){if(e.length)return e.includes("PICK_UP")?"PICK_UP":e.includes("SHIPPING")||e.includes("LOCAL")?"SHIPPING":e.every(e=>"NONE"===e)?"NOT_REQUIRED":void 0}function ZN(e){return XN(e.deliveryMethodTypes)}function eR(e){if("not_required"===e.status)return"NOT_REQUIRED";const t=e.methods.find(({handle:t})=>t===e.selectedDeliveryMethodHandle);return XN(t?[t.methodType]:e.methods.map(({methodType:e})=>e))}function tR(e,t){const n=e.lineAllocations[t];if(n)return{properties:e.properties,quantity:n.quantity,stableId:n.stableId,totalAmountBeforeReductions:n.checkoutPriceBeforeReductions,merchandise:e}}const nR="PP6CV",rR=jc("CollapsibleLineItems"),aR=e=>d(XT,{children:e}),iR=E(function(){const e=T(PL()),n=EL(),{i18n:r,shop:{id:a}}=ie(),i=nc(),{lineItems:{priority:o="base",blockPadding:s,quantityVisibility:l="visible",sectionLayout:c="fixed"},merchandiseThumbnail:{shadow:u}={}}=$m(),p=Boolean(s),m="hidden"!==l,h=e.value.some(e=>e.quantity>1);let g;m&&("visible"===l||h)?g="product-thumbnails-with-badge":"none"===u&&"high"===o?g=void 0:null!=u&&"extraSmall"!==u||(g="product-thumbnails");const f=t(()=>"thankYou"===i.value.currentDetour?.type?{dynamicRender:"Checkout::ThankYou::Dynamic::Render",cartLinesRenderAfter:"Checkout::ThankYou::CartLines::RenderAfter"}:{dynamicRender:"Checkout::Dynamic::Render",cartLinesRenderAfter:"Checkout::CartLines::RenderAfter"}).value,y=Gw(f.dynamicRender,"ORDER_SUMMARY1"),v=Gw(f.dynamicRender,"ORDER_SUMMARY2"),_=Gw(f.cartLinesRenderAfter),b=t(()=>Array.from(n.value.values()).reduce((e,t)=>
2e+t.reduce((e,t)=>e+t.quantity,0),0)),k=t(()=>Array.from(n.value.entries()).some(([e,t])=>e!==a&&t.length>0)),P=t(()=>e.value.length>0||k.value),S=function(){const e=fI(),n=nc(),r=T(PL()),{checkout:{negotiator:a}}=ie(),{deliveryNext:i,merchandiseLines:o}=a.current.fields,{deliveryLines:s,merchandiseLines:l}=a.parts;return t(()=>{const t=r.value,a=new Map;if(0===t.length)return a;if(!e.value)return a;const c=function(...e){const t=new Map;for(const n of e)for(const e of n??[])for(const n of e.lineComponents){if(t.has(n.stableId))continue;const r=new Map;e.lineAllocations.forEach((e,t)=>{const a=tR(n,t);a&&r.set(e.stableId,a)}),r.size>0&&t.set(n.stableId,{parentStableId:e.stableId,componentsByParentAllocationStableId:r})}return t}(o.value?.lines,l.value),u=new Map;for(const e of t){if(!e.stableId)return a;const t=u.get(e.stableId);t?t.push(e):u.set(e.stableId,[e])}const d=new Map,p=new Set,m=(e,t,n)=>{const r=d.get(e)??new Map;if(!n)return r.set(t.key,t),d.set(e,r),void p.add(t.key);const a=r.get(t.key)?.components??[];r.set(t.key,{...t,components:a.some(({stableId:e})=>e===n.stableId)?a:[...a,n]}),d.set(e,r),p.add(t.key)},h=[],g=new Map,f=(e,t)=>{const n=t.requiresShipping?e:"NOT_REQUIRED";if(!n)return!1;const r=c.get(t.stableId),a=r?.parentStableId??t.stableId;if(!r){const e=g.get(a)??new Set;e.add(n),g.set(a,e)}return h.push({bundleComponent:r,group:n,parentStableId:a}),!0};if(s.value.flatMap(e=>e.value.targetMerchandiseLines??[]).some(e=>{const t=c.get(e.stableId)?.parentStableId??e.stableId;return u.has(t)})&&!pv(n.value.currentDetour))for(const e of s.value){const t=ZN(e.value);for(const n of e.value.targetMerchandiseLines??[])if(!f(t,n))return a}else if("unavailable"!==i.value?.status)for(const e of i.value?.lines??[]){const t=eR(e);for(const n of e.targetMerchandiseLines??[])if(!f(t,n))return a}if(Array.from(g.values()).some(e=>e.size>1))return a;const y=({bundleComponent:e,group:t,parentStableId:n})=>{const r=u.get(n);if(!r)return!0;for(const a of r){if(!e){m(t,a);continue}if(!a.id)return!1;const n=e.componentsByParentAllocationStableId.get(a.id);if(!n)return!1;m(t,a,n)}return!0};for(const e of h)if(!y(e))return a;if(t.some(({key:e})=>!p.has(e)))return a;const v=new Map;for(const e of QN){const t=d.get(e);t?.size&&v.set(e,Array.from(t.values()))}return v})}(),w=t(()=>!k.value&&S.value.size>1),C="collapsible"===c&&!k.value&&e.value.length>1,E=d(oA,{bleed:g,overflow:"auto hidden",maxBlockSize:"@media (inline-size >= medium) 40vh, none",padding:p?"none":"none none small-500 none",hint:{type:"pill",content:r.translate("order_summary.scroll_order_summary")},accessibilityRole:"section",accessibilityLabel:r.translate("order_summary.shopping_cart_label"),children:d(x,{when:k,fallback:d(x,{when:w,fallback:d(YN,{merchandiseLines:e.value,totalLineQuantities:b.value}),children:d(WN,{merchandiseLinesByDeliveryType:S})}),children:d(GN,{merchandiseLinesByShop:n.value,totalLineQuantities:b.value})})});return d(x,{when:P,children:d(Jf,{gap:"large-200",children:[d(mT,{customizations:y,render:aR}),d(XT,{children:C?d(oR,{merchandiseLines:e.value,showQuantityBadges:m,children:E}):E}),d(mT,{customizations:_,render:aR}),d(mT,{customizations:v,gap:"large-200",render:aR})]})})});function oR({children:e,merchandiseLines:t,showQuantityBadges:n}){const r=m(!0),{i18n:a}=ie(),{size:i}
2=$m().merchandiseThumbnail??{},o=LN(i),s=a.translate("order_summary.number_items",{count:t.reduce((e,t)=>e+t.quantity,0)}),l=Hc(void 0,rR),{blockSize:c}=xw(o),u=function(e){return e.map(e=>({stableId:e.stableId??e.key,image:e.image,quantity:e.quantity,totalPrice:e.totalPrice}))}(t),p=()=>d(Vf,{children:s}),h=e=>d(Qm,{gridTemplateColumns:"minmax(0, 1fr) max-content",alignItems:"start",gap:"base",inlineSize:"100%",children:[d(Nf,{minInlineSize:"0",overflow:"hidden",children:e}),d(Jf,{direction:"inline",alignItems:"center",gap:"small-300",children:[p(),d(rh,{type:"chevron-down",size:"small-100"})]})]}),g=()=>d(Jf,{direction:"inline",alignItems:"center",justifyContent:"space-between",inlineSize:"100%",children:[p(),d(rh,{type:"chevron-up",size:"small-100"})]});return d(Nf,{position:"relative",minBlockSize:`${c}px`,children:[d(Id,{id:`${l}-expanded-content`,open:!r.value,renderChildrenWhenCollapsed:!0,duration:"base",properties:["height","opacity"],children:d(Jf,{gap:"base",children:[d("div",{"aria-hidden":"true",children:g()}),d("div",{id:l,children:e})]})}),d(Id,{id:`${l}-thumbnails`,open:r.value,duration:"base",properties:["height","opacity"],children:d("div",{"aria-hidden":"true",children:h(d(sR,{thumbnailMerchandise:u,thumbnailSize:o,showQuantityBadges:n}))})}),d("div",{className:"tndLB",children:[d("div",{"aria-hidden":"true",className:"anPJT",children:[d(Id,{id:`${l}-expanded-toggle-size`,open:!r.value,duration:"base",properties:["height"],children:g()}),d(Id,{id:`${l}-collapsed-toggle-size`,open:r.value,duration:"base",properties:["height"],children:h(d("div",{className:nR,children:d(UI,{variant:"inline-discrete",merchandise:u.slice(0,1),size:o,max:1,useImageAltTexts:!1,showQuantityBadges:n})}))})]}),d("div",{className:"vv9lW",children:d(Wm,{accessibilityLabel:s,"aria-controls":l,"aria-expanded":!r.value,blockSize:"100%",inlineSize:"100%",onClick:()=>{r.value=!r.value}})})]})]})}function sR({thumbnailMerchandise:e,thumbnailSize:t,showQuantityBadges:n}){const{ref:r,max:a}=rL(t);return d("div",{ref:r,className:nR,children:d(UI,{variant:"inline-discrete",merchandise:e,size:t,max:a.value,useImageAltTexts:!1,showQuantityBadges:n})})}function lR(){const e=i();return a(()=>()=>{const t=e.current;t&&vl.containers.delete(t)},[]),t=>{t&&(e.current&&vl.containers.delete(e.current),vl.containers.add(t),e.current=t)}}const cR=f({spacing:"auto"});function uR({spacing:e,children:t}){const n=r(()=>({spacing:e}),[e]);return d(cR.Provider,{value:n,children:t})}function dR(){return h(cR)}var pR={colorVariant:{base:"nfgb6p5",subdued:"nfgb6p6"},groupSpacingVariant:{auto:"nfgb6p9","small-200":"nfgb6pa","small-300":"nfgb6pb","small-400":"nfgb6pc","small-500":"nfgb6pd"},spacingVariant:{auto:"nfgb6p7",none:"nfgb6p8"},visuallyHidden:"nfgb6p4 _1fragem121",MoneyLines:"nfgb6p3 nfgb6p2 _1fragem6t"},mR={Content:"_1qy6ue68",contentColSpan:"_1qy6ue69",Header:"_1qy6ue67",MoneyLine:"_1qy6ue60",itemSizeVariant:{inherit:"_1qy6ue65",auto:"_1qy6ue66"},layoutVariant:{inherit:"_1qy6ue63 _1qy6ue61 _1fragem7x _1fragem9q _1fragem6t",stackable:"_1qy6ue64 _1qy6ue62 _1fragem64 _1fragem7s _1fragema5 _1fragem7d"}};function hR(e){return"children"in e&&mw(e.children)}function gR(e){const{spacing:t}=dR(),{moneyLines:{color:n="base"}}=$m(),{itemSize:r="inherit",layout:a="inherit",color:i}=e,o=i??n,s=v(mR.MoneyLine,r&&mR.itemSizeVariant[r],t&&pR.groupSpacingVariant[t],a&&mR.layoutVariant[a]);return d("div",{className:s,role:"row",children:hR(e)?e.children:d(y,{children:[d(fR,{children:d(Vf,{color:e.labelColor,children:e.label})}),d(yR,{loading:e.loading,children:e.loading?d(Dw,{size:e.size,emphasis:"strong"===e.type?"bold":void 0,children:e.value}):d(Vf,{type:e.type,size:e.size,translate:!1,color:o,children:e.value})})]})})}function fR({children:e}){return d("div",{className:mR.Header,role:"rowheader",children:e})}function yR({children:e,loading:t,colSpan:n}){return d("div",{className:n?mR.contentColSpan:mR.Content,role:"cell","aria-busy":t||void 0,"aria-colspan":n,children:e})}const vR=jc("MoneyLine-Heading"),_R=_(function(e,t){const{children:n,title:r,titleHidden:a=!0,spacing:i="auto"}=e,o=Hc(void 0,vR),s=Ju(),{moneyLines:{color:l="base"}}
2=$m(),c=d(IS,{id:o,children:r});return d(y,{children:[a?d("div",{className:pR.visuallyHidden,children:c}):c,d("div",{role:"table","aria-labelledby":o,children:[d("div",{role:"rowgroup",className:pR.visuallyHidden,children:d("div",{role:"row",children:[d("div",{role:"columnheader",children:s("moneyLinesHeaderItem")}),d("div",{role:"columnheader",children:s("moneyLinesHeaderValue")})]})}),d("div",{role:"rowgroup",className:v(pR.MoneyLines,pR.colorVariant[l],pR.spacingVariant[i]),ref:t,children:n})]})]})});function bR({children:e}){return"function"==typeof e?e():e}function kR({children:e}){let t,n;return Y.forEach(e,e=>{var r;W(e)&&(t||void 0===e.props.condition?n||e.type!==bR||(n=e):("function"==typeof(r=e.props.condition)?r():r)&&(t=e))}),t??n??null}function PR({condition:e,children:t,skeletonContent:n,...r}){return d(y,{children:[d(Dw,{...r,delay:!1,display:e?r.display??"auto":"none",children:n??t},"skeletonTextKey"),d(Vf,{...r,display:e?"none":r.display??"auto",children:t},"textKey")]})}kR.When=function({children:e}){return"function"==typeof e?e():e},kR.Fallback=bR;const SR=jc("TaxesTooltip");function wR({label:e,subdueText:t}){const{i18n:n,source:r}=ie(),a=Hc(void 0,SR);return d(y,{children:[d(Vf,{color:t?"subdued":void 0,children:e}),d(rh,{type:"question-circle",size:"small",interestFor:a,accessibilityLabel:n.translate("tooltip.accessibility_label_context",{context:e})}),d(sm,{id:a,children:"paymentCollection"===r.type?n.translate("order_summary.estimated_taxes_finalization_tooltip_content_short"):n.translate("order_summary.estimated_taxes_finalization_tooltip_content")})]})}function CR({totalTax:e,showMoneyLineTaxesTooltip:t,loading:n=!1,taxesLabel:r,hasLandedCostDetails:a=!1,subdueText:i}){const{i18n:o}=ie(),s=i?"subdued":void 0;return d(gR,{color:s,children:[d(fR,{children:d(kR,{children:[d(kR.When,{condition:Boolean(r),children:d(Vf,{color:s,children:r})}),d(kR.When,{condition:Boolean(a),children:d(Vf,{color:s,children:o.translate("order_summary.taxes_label")})}),d(kR.Fallback,{children:d(Jf,{direction:"inline",alignItems:"center",gap:"small-300",children:d(wR,{label:o.translate("order_summary.estimated_taxes_label"),subdueText:i})})})]})}),d(yR,{children:d(Jf,{direction:"inline",gap:"small-200",children:[t?d(Jf,{direction:"inline",alignItems:"center",gap:"small-300",children:[d(wR,{subdueText:i,label:o.translate("order_summary.estimated_taxes_label_short")}),d(Vf,{color:s,children:"â¢"})]}):null,d(PR,{condition:n,color:s,children:n?"$0.00":o.formatCurrency(e.amount,{currency:e.currencyCode,form:"short"})})]})})]})}const ER={marginTop:"0"};function xR({id:e,title:t,subdueTitle:n,tooltipText:r,children:a,item:i,hideHeaderItemWhenOpen:o=!1,defaultOpen:s=!1}){const{i18n:l}=ie(),c=m(s);return d(y,{children:[d(gR,{children:[d(fR,{children:d(Jf,{direction:"inline",gap:"small-200",alignItems:"center",children:[d(Wm,{"aria-expanded":c.value,"aria-controls":`recurring-totals-collapsible-${e}`,onClick:()=>{c.value=!c.value},children:d(Qm,{gridAutoFlow:"column",gridAutoColumns:"minmax(auto, max-content)",gridTemplateColumns:"minmax(auto, max-content)",gridTemplateRows:"minmax(0, 1fr)",gap:"small-200",alignItems:"center",alignContent:"center",justifyContent:"start",justifyItems:"start",children:[d(sx,{color:n?"subdued":void 0,textAlign:"start",children:t}),d(rh,{type:c.value?"chevron-up":"chevron-down",size:"small-200"})]})}),r?d(Wm,{accessibilityLabel:l.translate("tooltip.accessibility_label_context",{context:t}),overlay:d(sm,{children:r}),children:d(rh,{type:"question-circle",size:"small"})}):null]})}),!i||o&&c.value?null:i]}),d("div",{style:ER,children:d(Id,{open:c.value,id:`recurring-totals-collapsible-${e}`,children:a})})]})}function IR(){const{checkout:e}
2=ie(),n=e.negotiator.current.fields.taxes,r=oo();return t(()=>{const t=e.proposal.facts.tax,a=n.value,i=t||("available_total_included"===a?.status?a.totalIncludedInTarget:null);return{localTotalTaxIncluded:i,totalTaxIncluded:r.value??i}})}function AR(){const{i18n:e}=ie(),n=IR();return t(()=>{const{totalTaxIncluded:t}=n.value;return null===t?null:e.translate("order_summary.vat_label_html",{amount:e.formatCurrency(t.amount,{currency:t.currencyCode,form:"short"})})})}function TR({label:e}){return d(uR,{spacing:"small-500",children:d(gR,{children:[d(fR,{children:d(sx,{color:"subdued",children:d(dA,{children:e})})}),d(yR,{})]})})}function LR({taxesIncluded:e,variant:n,shopId:r}){const{i18n:a}=ie(),i=so(),{localTotalTaxIncluded:o,totalTaxIncluded:s}=IR().value,l=AR(),c=lo(o),u=t(()=>[...c.value.entries()]),p=t(()=>i.value&&u.value.length>1);if(r){const e=c.value.get(r);if(!e||0===e.totalTax.amount||"available_total"===e.status)return null;const t=a.translate("order_summary.vat_label_html",{amount:a.formatCurrency(e.totalTax.amount,{currency:e.totalTax.currencyCode,form:"short"})});return d(TR,{label:t})}return e&&null!==s&&null!==l.value&&0!==s.amount?"card"===n?d(Nf,{children:d(sx,{color:"subdued",children:d(dA,{children:l})})}):d(x,{when:p,fallback:d(TR,{label:l.value}),children:d(xR,{id:"included-tax-money-line",title:l.value,children:d(uR,{spacing:"small-400",children:d($,{each:u,getKey:([e])=>e,children:([,e])=>d(CR,{totalTax:e.totalTax,taxesLabel:e.shopName,showMoneyLineTaxesTooltip:"available_total"===e.status,subdueText:!0})})})})}):null}function NR({title:e,value:t,color:r,labelColor:a}){const i=function(){const{i18n:e}=ie();return n(t=>e.formatCurrency(t.amount,{currency:t.currencyCode,form:"short"}),[e])}();return d(gR,{label:e,value:i(t),color:r,labelColor:a})}function RR({variant:e,shopId:n}){const{checkout:r}=ie(),{value:a}=r.negotiator.current.fields.deferredTotal,i=ct(),o=co(),s=t(()=>o.value||Boolean(r.proposal.facts.taxesIncluded)),{value:l}=r.negotiator.current.fields.paymentFlexibilityPaymentTermsTemplate,c=a&&a.amount.amount>0,u=Ci(),p=DI(),m=t(()=>Boolean(u.value&&!p.value)),h=function(e,t){const{i18n:n}=ie(),r=EI();if(e){const t=r(e,{month:"short"});return n.translate("order_summary.deferred_total_due_date_label_next",{date:t})}return t?n.translate("order_summary.payment_terms_totals.due_on_fulfillment_next"):n.translate("order_summary.payment_terms_totals.due_later_checkout_to_draft")}(a?.dueAt||(l?.dueDate?new Date(l.dueDate):null),"FULFILLMENT"===l?.type);return!c||i.value?null:d(y,{children:["card"===e?d(Nf,{background:"subdued",padding:"small-300",borderRadius:"small",children:d(NR,{title:h,value:a.amount,color:"subdued",labelColor:"subdued"})}):d(uR,{spacing:"small-300",children:d(NR,{title:h,value:a.amount})}),"card"!==e&&d(x,{when:m,children:()=>d(LR,{taxesIncluded:s.value,shopId:n})})]})}const MR=jc("ShippingTooltip");function DR({defaultPolicy:e}){const{i18n:t,embed:n,shop:{merchantPolicies:r}}=ie(),a=Hc(void 0,MR),i="shipping-policy",o=t.translate("shop_policies.shipping_policy"),{localPolicies:s}=Li(),l=r.some(e=>e.handle===i),c=e??(l?s.find(e=>e.handle===i):void 0);if(!c)return null;const u=t.translate("tooltip.accessibility_label_context",{context:o});return yr(n?.embedder)?c.url?d(Wm,{accessibilityLabel:u,"aria-haspopup":"dialog",onClick:()=>n?.client?.windowOpenRequest(c.url),children:d(rh,{type:"question-circle",size:"small"})}):null:d(y,{children:[d(Wm,{accessibilityLabel:u,commandFor:a,children:d(rh,{type:"question-circle",size:"small"})}),d(qA,{id:a,defaultPolicy:c})]})}function OR(e){return e.reduce((e,{total:t})=>e+(t?.amount||0),0)}function zR({checkout:e}){return e.proposal.facts.requiresShipping??!0}function BR({size:e,strong:t=!0}){const{i18n:n}=ie(),r=t?"strong":void 0;return d(y,{children:[d(Vf,{size:e,type:r,accessibilityVisibility:"hidden",children:n.translate("shipping.included_rate_label")}),d(Vf,{type:r,accessibilityVisibility:"exclusive",children:n.translate("shipping.included_rate_accessibility_label")})]})}function VR({moneyLines:e,deliveryLoading:t,appearance:n,emphasis:r,included:a,shouldConsolidateRateGroupMax:i,getRateGroupMaxKey:o,getLinePrice:s,getPriceLetterCase:l}){const{i18n:c,shop:u}=ie(),p=u.hasFlagEnabled(po),m=e.length>0,h=e[0]?.currencyCode,g=e[0]?.type,{priceBeforeDiscounts:f,priceAfterDiscounts:y}=i??u.marketDrivenShippingEnabled?xl(e,o):Il(e),v=m&&f&&f>y&&!p,_=s(y,g),b=d(PR,{condition:t,color:n,type:"bold"===r?"strong":void 0,translate:!1,letterCase:l(y,g),children:_});return t?b:a?d(BR,{strong:!1}):v?d(Jf,{direction:"inline",gap:"small-300",justifyContent:"center",alignItems:"center",children:[d(Vf,{accessibilityVisibility:"exclusive",children:c.translate("order_summary.original_price")}),d(Vf,{size:"base",color:"subdued",type:"redundant",translate:!1,children:c.formatCurrency(f,{currency:h})}),d(Vf,{accessibilityVisibility:"exclusive",children:c.translate("order_summary.price_after_discount_aria_text")}),b]}):b}const FR=({getLinePrice:e,getPriceLetterCase:n,label:a,moneyLines:i,finalMoneyLines:o,forceSubduedStyle:s,discountLines:l,shippingTooltip:c,included:u,shouldConsolidateRateGroupMax:p,getRateGroupMaxKey:m})=>{const h=nc(),g=t(()=>"information"===h.value.currentPage?.id),{shop:f,checkout:v,i18n:_}=ie(),b=!f.hasFlagEnabled(po),{value:k}=v.negotiator.current.fields.deliveryNext,P=Tt(),S=vn("deliveryNext").value,w=rI("deliveryNext").value||!!P.value&&S,C=v.proposal.facts.delivery??[],E=function(e){const{checkout:t}=ie(),n=t.proposal.facts.delivery??[],r=new Set(e);return n.flatMap(({deliveryGroups:e,lines:t})=>r.size>0&&e?.length?e.filter(({methodType:e})=>r.has(e)).flatMap(({deliveryLines:e})=>e):t).flatMap(({appliedDiscounts:e})=>e).filter(e=>e.amountDiscounted?.amount&&e.amountDiscounted?.amount>0)}([...new Set(o.flatMap(({methodType:e})=>void 0===e?[]:[e]))]),x=v.configuration.layout.isOnePage.value,I=r(()=>!i.length&&!C.length||w,[]),A=Boolean("unavailable"===k?.status)||w||s,T=l?.filter(e=>Al(e))??[],L=E.length?[...new Set(E.map(e=>e.label))]:[...new Set(T.map(e=>Cl(e)&&"code"===e.discount.type&&e.discount.codeHidden?_.translate("order_summary.discount_title"):e.title))],N=b?L.map(e=>d(Qm,{gridAutoFlow:"column",gridTemplateColumns:"minmax(auto, max-content) minmax(0, 1fr)",gridTemplateRows:"minmax(0, 1fr)",gap:"small-400",alignItems:"center",alignContent:"center",children:[d(rh,{type:"discount",size:"small"}),d(fA,{children:d(Vf,{color:"subdued",children:e.toUpperCase()})})]},e)):[],R=A||s,M=(g.value||x)&&c,D=s?"subdued":void 0;return d(y,{children:[d(gR,{itemSize:I?"auto":void 0,color:D,children:[d(fR,{children:d(Jf,{direction:"inline",gap:"small-400",alignItems:"center",children:[d(Vf,{color:D,children:a}),M]})}),d(yR,{loading:w,children:d(VR,{getLinePrice:e,getPriceLetterCase:n,appearance:R?"subdued":void 0,moneyLines:o,deliveryLoading:w,included:u,shouldConsolidateRateGroupMax:p,getRateGroupMaxKey:m})})]}),N.length>0&&d(uR,{spacing:"small-400",children:d(gR,{children:d(fR,{children:N})})})]})},UR=({shopId:e,forceSubduedStyle:n})=>{const{checkout:r,i18n:a,shop:{id:o,marketDrivenShippingEnabled:s,remoteShopsConfigMap:l},source:c}=ie(),u=r.negotiator.current.fields.deliveryNext.value,p=Tt(),m=vn("deliveryNext"),h=rI("deliveryNext"),g=h.value||!!p.value&&m.value,f=r.configuration.layout.isOnePage.value,v=r.proposal.facts.delivery,_=Be(),b=Dr(_.value.enabledDeliveryMethods),k=nI(),P=k?.selected.value??[],S=P.length>0,w=mo(P).length>0,C=P.includes("PICK_UP"),E=Boolean(e),{visibility:x}
2=r.configuration,I=r.negotiator.current.fields.discountLines.value,A=ib(),T=function(){const{checkout:e}=ie(),t=e.proposal.facts.delivery??[],n=function(){const{checkout:e}=ie(),t=e.proposal.facts.delivery??[];return OR(t)-t.flatMap(e=>e.lines.flatMap(e=>e.appliedDiscounts)).reduce((e,{amountDiscounted:t})=>(t?.amount||0)+e,0)}(),r=OR(t),a=t.flatMap(({deliveryGroups:e})=>e??[]);return a.length>0?a.map(({groupType:e,methodType:t,total:n,deliveryLines:r})=>{const a=r.flatMap(({appliedDiscounts:e})=>e).reduce((e,{amountDiscounted:t})=>e+(t?.amount??0),0);return{type:e,methodType:t,cost:n.amount-a,costBeforeDiscounts:n.amount,currencyCode:n.currencyCode}}):null==t[0]?.total?null:[{type:"ONE_TIME_PURCHASE",cost:n,costBeforeDiscounts:r,currencyCode:t[0]?.total?.currencyCode}]}(),L=ho(e),{allMoneyLines:N,moneyLinesForShop:R}=L.value,M=so(),D=nc(),O="review"!==D.value.currentPage?.id&&(!g||M.value),z=a.translate("order_summary.pickup_label"),B=a.translate("order_summary.shipping_label"),V=i(b?z:B),F=t(()=>{const e=Dr(_.value.enabledDeliveryMethods)?z:B;if(!(h.value||p.value&&m.value)){const t=L.value.moneyLinesForShop,n=Hn(c)?v?.[0]?.pickupAddress:t.length>0&&t.every(e=>"PICK_UP"===e.methodType);V.current=n?z:e}return V.current}).value,U=Boolean(u&&"filled"===u.status&&u.lines.some(({status:e})=>"not_required"!==e)),q=!g&&!U&&!r.isShippingRequired.value,j=T||R,H=j.filter(function(e){return void 0!==e.methodType}),$=H.filter(e=>"PICK_UP"!==e.methodType),Y=H.filter(e=>"PICK_UP"===e.methodType),W=0===j.length||H.length>0,G=!E&&!Hn(c)&&S&&W,J=G&&C&&!w,K=G&&w,Q=J?z:B,X=t(()=>Boolean(Hn(c)&&zR({checkout:r})&&rb({checkout:r,source:c})?.lines.length));if(A.value)return null;if(!(x.showShippingLines.value&&!Hn(c)||X.value))return null;if(q)return null;if(E&&0===j.length)return null;if(E){const t=j.some(e=>le(e));return d(FR,{getLinePrice:de,getPriceLetterCase:ue,label:F,forceSubduedStyle:n,moneyLines:R,finalMoneyLines:j,discountLines:e===o?I?.lines:void 0,shippingTooltip:void 0,shouldConsolidateRateGroupMax:t,getRateGroupMaxKey:ce})}if(M.value&&j.length>1){const e=j.some(e=>le(e)),t=function(e){const t=new Map;for(const n of e){const e=n.shopId??o,r=t.get(e);r?r.lines.push(n):t.set(e,{shopName:n.shopName??F,lines:[n]})}return[...t.values()]}(j);return d(xR,{id:"shipping-money-line",title:F,hideHeaderItemWhenOpen:!0,item:d(yR,{loading:g,children:d(VR,{getLinePrice:de,getPriceLetterCase:ue,moneyLines:j,deliveryLoading:g,shouldConsolidateRateGroupMax:e,getRateGroupMaxKey:ce})}),children:d(uR,{spacing:"small-400",children:t.map(({shopName:t,lines:n})=>{const r=n.find(e=>e.shippingPolicy)?.shippingPolicy,a=n.some(e=>(e.shopId??o)===o&&e.hasLocalDiscountApplied);return d(FR,{getLinePrice:de,getPriceLetterCase:ue,label:t,forceSubduedStyle:!0,moneyLines:N,finalMoneyLines:n,discountLines:a?I?.lines:void 0,shouldConsolidateRateGroupMax:e,getRateGroupMaxKey:ce,shippingTooltip:O&&r?d(DR,{defaultPolicy:r}):void 0},n[0]?.shopId??t)})})})}if($.length>0&&Y.length>0)return oe({});if(G&&w&&C)return oe({shippingGetLinePrice:$.length>0?de:pe,shippingGetPriceLetterCase:$.length>0?ue:me,pickupGetLinePrice:he,pickupGetPriceLetterCase:ge});let Z=N,ee=j,te=de,ne=ue,re=F,ae=O?d(DR,{defaultPolicy:null}):void 0;return J?(Z=Y,ee=Y,te=he,ne=ge,re=Q,ae=void 0):K&&(Z=$,ee=$,re=Q,0===$.length&&(te=pe,ne=me)),d(FR,{getLinePrice:te,getPriceLetterCase:ne,label:re,forceSubduedStyle:n,moneyLines:Z,finalMoneyLines:ee,discountLines:I?.lines,shippingTooltip:ae});function oe({shippingGetLinePrice:e=de,shippingGetPriceLetterCase:t=ue,pickupGetLinePrice:r=de,pickupGetPriceLetterCase:a=ue}){const{shippingDiscountLines:i,pickupDiscountLines:o}=Tl(u,I?.lines);return d(y,{children:[d(FR,{getLinePrice:e,getPriceLetterCase:t,label:B,forceSubduedStyle:n,moneyLines:$,finalMoneyLines:$,discountLines:i,shippingTooltip:O?d(DR,{defaultPolicy:null}):void 0}),d(FR,{getLinePrice:r,getPriceLetterCase:a,label:z,forceSubduedStyle:n,moneyLines:Y,finalMoneyLines:Y,discountLines:o,shippingTooltip:void 0})]})}function se(e){return e.every(e=>"SUBSCRIPTION"===e.type)}function le(e){const t=e.shopId??o;if(t===o)return s;const n=l?.get(t);return n?n.marketDrivenShippingEnabled:Boolean(e.amountCombinabilityToken)}function ce(e){const t=e.amountCombinabilityToken??void 0;if(t&&le(e))return`${e.shopId??o}:${t}`}function ue(e,t){return b?"uppercase":g||void 0===e||!N.length&&!v?.length||0!==e?"none":"SUBSCRIPTION"!==t||se(N)?"uppercase":"none"}function de(e,t){if(g)return"$0.00";if(void 0!==e&&(N.length||v?.length)){const n="SUBSCRIPTION"!==t||se(N)?a.translate("order_summary.free_shipping_total_label"):a.translate("shipping.subscription_delivery_description.shipping_price_included");if(0===e)return n;const r=Hn(c)?v?.[0]?.total?.currencyCode:N[0].currencyCode;return a.formatCurrency(e,{currency:r,form:"short"})}return b?a.translate("order_summary.free_shipping_total_label"):f?a.translate("order_summary.enter_shipping_address"):a.translate("order_summary.shipping_default_value")}function pe(){return de(void 0)}function me(){return ue(void 0)}function he(e,t){return Y.length||v?.length?de(e,t):g?"$0.00":a.translate("order_summary.free_shipping_total_label")}function ge(e,t){return Y.length||v?.length||g?ue(e,t):"uppercase"}},qR=jc("ReductionTooltip");function jR({type:e}){const{i18n:t,shop:{name:n}}=ie(),r=Hc(void 0,qR),a="giftCard"===e?t.translate("order_summary.gift_cards_apply_to_local_shop",{shop_name:n}):t.translate("order_summary.order_discounts_apply_to_local_shop",{shop_name:n});return d(y,{children:[d(rh,{type:"question-circle",size:"small",interestFor:r}),d(sm,{id:r,children:d(Vf,{children:a})})]})}function HR({line:e,title:t,amount:n}){const{i18n:r,source:a,shop:i}=ie(),o=Hn(a)&&n,s=wN(i);if(e&&!Cl(e)||e&&"CART"!==e.discount.presentationLevel||e&&0===e.amount?.amount&&s)return null;if(e&&(Al(e)||0===e.allocations.length))return null;let l=e?.title;return e&&"custom"===e.discount.type&&""===e.title&&(l=r.translate("order_summary.custom_discount")),e&&"code"===e.discount.type&&e.discount.codeHidden&&(l=r.translate("order_summary.discount_title")),d(gR,{children:[d(fR,{children:d(Qm,{gridAutoFlow:"column",gridTemplateColumns:"minmax(auto, max-content) minmax(0, 1fr)",gridTemplateRows:"minmax(0, 1fr)",gap:"small-400",alignItems:"center",alignContent:"center",children:[d(rh,{type:"discount",size:"small"}),d(fA,{children:d(Vf,{color:"subdued",children:e?l?.toUpperCase():t?.toUpperCase()})})]})}),d(yR,{children:d(Vf,{translate:!1,children:o?(c=n,r.formatCurrency(-c.amount,{currency:c.currencyCode,form:"short",spacedMinusSign:!0})):e&&$R({line:e,freeShippingLabel:r.translate("order_summary.free_shipping_discount_label"),i18n:r})})})]});var c}function $R({line:e,freeShippingLabel:t,i18n:n}){if(e.allocations.some(e=>"DELIVERYLINE"===e.target.type)||0===e.allocations.length)return t;if(Cl(e)){const t=e.amount?.amount,r=e.amount?.currencyCode;if(t&&r)return n.formatCurrency(-t,{currency:r,form:"short",spacedMinusSign:!0})}}const YR=({disableTooltip:e=!1})=>{const{i18n:n,checkout:r,source:a,shop:i}
2=ie(),o=r.negotiator.current.fields.discountLines,s=r.proposal.facts.orderDiscounts??[],l=Hn(a)&&s,c=wN(i),u=so(),p=t(()=>{return e=o.value?.lines,t=c,e?.filter(e=>Cl(e)&&go(e)&&!(t&&0===e.amount?.amount))??[];var e,t}),m=t(()=>!e&&u.value),h=t(()=>p.value.length>0),g=t(()=>n.translate("order_summary.discount_order_stacking",{count:p.value.length}));return d(y,{children:[d(x,{when:h,children:()=>d(gR,{children:d(fR,{children:d(Qm,{gridAutoFlow:"column",gridTemplateColumns:m.value?"minmax(auto, max-content) minmax(auto, max-content)":"minmax(0, 1fr)",gridTemplateRows:"minmax(0, 1fr)",gap:"small-400",alignItems:"center",alignContent:"center",children:[d(Vf,{children:g}),d(x,{when:m,children:d(jR,{type:"discount"})})]})})})}),d(uR,{spacing:"small-500",children:[d($,{each:p,getKey:e=>e.title,children:e=>d(HR,{line:e})}),l&&s.map(e=>d(HR,{title:e.label,amount:e.amount},e.label))]})]})};function WR(e,t){return e||("available_total"===t?.status?t.totalDuty:null)}const GR=jc("DutyMoneyLineTooltip");function JR({shopId:e}){const{i18n:t,checkout:n,shop:r}=ie(),{value:a}=n.negotiator.current.fields.landedCostDetails,i=vn("landedCostDetails").value,o=vn("duties").value,s=n.proposal.facts.duty,{value:l}=n.negotiator.current.fields.duties,c=Hc(void 0,GR);if(e&&e!==r.id)return null;const u=WR(s,l),p=a?.incoterm===Ll.Ddu&&a.reason===Nl.ErrorOccured,m=(o||i)&&!s&&!p,h=u||p,g=p?"subdued":void 0,f=d(Jf,{direction:"inline",alignItems:"center",gap:"small-400",children:[d(Vf,{children:t.translate("order_summary.duties_label")}),p&&!m&&d(y,{children:[d(rh,{type:"question-circle",interestFor:c,accessibilityLabel:t.translate("tooltip.accessibility_label_context",{context:t.translate("order_summary.duties_label")})}),d(sm,{id:c,children:t.translate("order_summary.error_duties_tooltip")})]})]}),v=p?t.translate("order_summary.may_be_charged_on_delivery"):u&&t.formatCurrency(u.amount,{currency:u.currencyCode,form:"short"});return d(y,{children:h&&d(gR,{color:g,children:[d(fR,{children:f}),d(yR,{children:d(Jf,{direction:"inline",gap:"small-200",children:d(PR,{condition:m,children:m?"$0.00":v})})})]})})}function KR({data:e,loading:t,totalTax:n}){const{i18n:r,shop:a}=ie(),i=QR(),o=a.hasFlagEnabled(fo)&&e.length>2,s=e.map(({description:e,amount:n},r)=>d(CR,{loading:t,totalTax:n,taxesLabel:i({description:e}),subdueText:o},`${e}-${r}`));return o?d(xR,{id:"tax-breakdown-money-line",title:r.translate("order_summary.taxes_label"),defaultOpen:!0,hideHeaderItemWhenOpen:!0,item:n?d(yR,{loading:t,children:d(PR,{condition:t,children:r.formatCurrency(n.amount,{currency:n.currencyCode,form:"short"})})}):void 0,children:d(uR,{spacing:"small-400",children:s})}):d(uR,{spacing:"small-400",children:s})}const QR=()=>{const{i18n:e}=ie();return({description:t})=>{switch(t){case"HST":return e.translate("order_summary.tax_line.hst");case"GST":return e.translate("order_summary.tax_line.gst");case"PST":return e.translate("order_summary.tax_line.pst");case"RST":return e.translate("order_summary.tax_line.rst");case"QST":return e.translate("order_summary.tax_line.qst");case"VPT":return e.translate("order_summary.tax_line.vpt");default:return t}}};function XR({shopId:e}){const{i18n:n,checkout:r,shop:a}=ie(),{hasNegotiatedOnce:i}=r.negotiator,o=vn("taxes"),s=rI("taxes"),l=vn("landedCostDetails"),c=vn("remoteTaxDetails"),u=so(),p=wk(),m=function(){const{checkout:e}=ie(),n=vn("taxes"),{taxes:r}=e.negotiator.current.fields;return t(()=>{const t=e.proposal.facts.taxBreakdown;if(t?.length)return{data:t.map(({title:e,amount:t})=>({description:e,amount:t})),loading:!1};if(!r.value||"available_total"!==r.value.status)return null;const{taxBreakdown:a}=r.value;return a?.length?{data:a,loading:n.value}:null})}(),h=t(()=>{if(r.proposal.facts.tax)return r.proposal.facts.tax;const e=r.negotiator.current.fields.taxes.value;return"available_total"===e?.status?e.totalTax:null}),g=t(()=>Boolean(r.negotiator.current.fields.landedCostDetails.value)),f=t(()=>{const e=r.negotiator.current.fields.taxes.value;return void 0!==e&&"pending"!==e.status}),y=t(()=>!r.proposal.facts.tax&&(!!s.value||!f.value&&(o.value||!i.value))),v=t(()=>(y.value||o.value||l.value||c.value)&&!r.proposal.facts.tax),_=t(()=>{const e=h.value;return e&&e.amount>0?e:y.value?{amount:0,currencyCode:a.currencyCode}:void 0}),b=lo(h.value),k=t(()=>[...b.value.entries()]),P=oo(),S=t(()=>P.value??h.value),w=t(()=>u.value&&k.value.length>1);if(e){const t=b.value.get(e);return t&&0!==t.totalTax.amount&&"available_total_included"!==t.status?d(CR,{loading:v.value,totalTax:t.totalTax,hasLandedCostDetails:e===a.id&&g.value}):null}if(p?.applied&&S.value)return d(CR,{totalTax:S.value});if(!(S.value&&0!==S.value.amount||y.value))return null;if(w.value&&S.value){const e=g.value?n.translate("order_summary.taxes_label"):n.translate("order_summary.estimated_taxes_label"),t=g.value?void 0:n.translate("order_summary.estimated_taxes_finalization_tooltip_content");return d(xR,{id:"tax-money-line",title:e,tooltipText:t,item:d(yR,{loading:v.value,children:d(PR,{condition:v.value,children:v.value?"$0.00":n.formatCurrency(S.value.amount,{currency:S.value.currencyCode,form:"short"})})}),children:d(uR,{spacing:"small-400",children:d($,{each:k,getKey:([e])=>e,children:([,e])=>d(CR,{loading:v.value,totalTax:e.totalTax,taxesLabel:e.shopName,subdueText:!0})})})})}return d(x,{when:m,fallback:d(x,{when:_,children:e=>d(CR,{loading:v.value,totalTax:e,taxesLabel:y.value?n.translate("order_summary.taxes_label"):void 0,hasLandedCostDetails:g.value})}),children:e=>d(KR,{data:e.data,loading:e.loading||v.value,totalTax:h.value})})}const ZR=jc("CombinedDutiesAndTaxesTooltip"),eM=({loading:e,shopId:t})=>{const{i18n:n,shop:r}=ie(),a=Hc(void 0,ZR);if(t&&t!==r.id)return null;const i=e.value;return d(gR,{children:[d(fR,{children:d(Jf,{direction:"inline",alignItems:"center",gap:"small-400",children:[d(Vf,{children:n.translate("order_summary.duties_and_taxes_label")}),d(rh,{type:"question-circle",interestFor:a,accessibilityLabel:n.translate("tooltip.accessibility_label_context",{context:n.translate("order_summary.duties_and_taxes_label")})}),d(sm,{id:a,children:n.translate("order_summary.error_duties_tooltip")})]})}),d(yR,{children:d(PR,{condition:i,children:i?"$0.00":n.translate("order_summary.may_be_charged_on_delivery")})})]})},tM=({shopId:e})=>{const{checkout:n}=ie(),r=Boolean(n.proposal.facts.taxesIncluded),a=Boolean(n.proposal.facts.dutiesIncluded),i=co(),o=yo(),s=n.negotiator.current.fields.landedCostDetails,l=vn("landedCostDetails"),c=rI("landedCostDetails"),u=n.negotiator.current.fields.optionalDuties,p=v
2n("optionalDuties"),m=t(()=>Boolean(u.value?.refuseDutiesPermitted)&&Boolean(u.value?.buyerRefusesDuties)&&s.value?.incoterm===Ll.Ddu),h=t(()=>c.value||p.value||l.value),g=t(()=>!(o.value||a)),f=t(()=>Boolean(e)||!(i.value||r));return d(x,{when:m,fallback:d(y,{children:[d(x,{when:g,children:d(JR,{shopId:e})}),d(x,{when:f,children:d(XR,{shopId:e})})]}),children:d(eM,{loading:h,shopId:e})})};function nM({line:e,disableTooltip:t=!1}){const{i18n:n}=ie(),{value:r}=so(),a=!t&&r,i=vo(e.method).toUpperCase();return d(gR,{itemSize:"auto",children:[d(fR,{children:d(Jf,{direction:"inline",gap:"small-400 small-300",children:[d(Vf,{children:n.translate("order_summary.gift_card_label")}),d(Jf,{direction:"inline",alignItems:"center",gap:"small-400",children:[d(rh,{type:"gift-card"}),d(Vf,{color:"subdued",accessibilityVisibility:"hidden",children:n.translate("order_summary.gift_card_masked",{last_characters:i})}),d(Vf,{accessibilityVisibility:"exclusive",children:n.translate("order_summary.gift_card_ending",{last_characters:i})}),a&&d(jR,{type:"giftCard"})]})]})}),d(yR,{children:d(Vf,{children:e.cost?n.formatCurrency(-e.cost.amount,{currency:e.cost.currencyCode,form:"short",spacedMinusSign:!0}):""})})]})}function rM({disableTooltip:e=!1}){const n=MI(),r=so(),{shop:a,i18n:i}=ie(),o=a.hasFlagEnabled(_o),s=t(()=>!e&&r.value),l=t(()=>r.value?"minmax(auto, max-content) minmax(auto, max-content)":"minmax(0, 1fr)"),c=t(()=>({total:n.value.reduce((e,t)=>e+(t.cost?.amount||0),0),currencyCode:n.value[0]?.cost?.currencyCode}));if(0===n.value.length)return null;if(o){const{total:e,currencyCode:t}=c.value;return d(gR,{children:[d(fR,{children:d(Qm,{gridAutoFlow:"column",gridTemplateColumns:l.value,gridTemplateRows:"minmax(0, 1fr)",gap:"small-400",alignItems:"center",alignContent:"center",children:[d(Vf,{children:i.translate("order_summary.gift_card_label")}),d(x,{when:s,children:d(jR,{type:"giftCard"})})]})}),d(yR,{children:d(Vf,{children:i.formatCurrency(-e,{currency:t,form:"short",spacedMinusSign:!0})})})]})}return d($,{each:n,getKey:e=>bo(e.method),children:t=>d(nM,{line:t,disableTooltip:e})})}function aM(e){return"children"in e&&mw(e.children)}function iM(e){const{spacing:t}=dR(),n=v("_1x41w3p1 _1x41w3p0 _1fragem6t _1fragem19",t&&pR.groupSpacingVariant[t]);return d(y,{children:d("div",{className:n,role:"row",children:aM(e)?e.children:d(y,{children:[d(oM,{children:d(Vf,{type:"strong",size:"large",children:e.label})}),d(sM,{children:d(Jf,{direction:"inline",gap:"small-300",alignItems:"baseline",children:[d(BI,{children:d(Vf,{size:"small",color:"subdued",children:e.prefix})}),d(Vf,{type:"strong",size:"large",children:e.value})]})})]})})})}function oM({children:e}){return d("div",{className:"_1x41w3p2",role:"rowheader",children:e})}function sM({children:e,accessibilityColumnIndex:t}){return d("div",{className:"_1x41w3p3",role:"cell","aria-colindex":t,children:e})}const lM={Wrapper:"_3KD7m",Char:"kxIMD",Price:"_3XbdQ","Price-enter":"baSEe","Price-exit":"dhH4n","Price-exiting":"ldszB","Price-exited":"ZOhB6"};let cM=0;function uM({formatted:e,money:t}){const{orderSummary:{priceReductionAnimation:r}}=vv(),s=qc(),l=i(o(()=>t.value)),c=m([{id:cM++,formatted:o(()=>e.value)}]),u=Tt(),p="base"===r;a(()=>{const n=l.current,r=t.value.currencyCode===n.currencyCode&&t.value.amount<n.amount;c.value=r?[...c.value,{id:cM++,formatted:e.value}]:[{id:cM++,formatted:e.value}],l.current=t.value},[t.value.amount,t.value.currencyCode,e.value]);const h=n(e=>{c.value=c.value.filter(t=>t.id!==e)},[c]);return p?d("span",{className:lM.Wrapper,style:{"--delay":(s?0:30)+"ms"},children:d(x,{when:u,fallback:e,children:()=>c.value.map((e,t)=>d(dM,{formatted:e.formatted,current:t===c.value.length-1,onDisappear:h,snapshotId:e.id,animated:c.value.length>1},e.id))})}):d(y,{children:e})}function dM({formatted:e,current:t,animated:n,onDisappear:r,snapshotId:i}){const o=qc(),s=Ed(t,"fast",n),l=e.split("");return a(()=>{let t;return"exited"===s&&(o?r(i):t=setTimeout(()=>r(i),30*e.length)),()=>{clearTimeout(t)}},[s,o,e,r,i]),d("span",{className:v(lM.Price,n&&lM[`Price-${s}`]),"aria-label":t?e:void 0,"aria-hidden":t?void 0:"true",style:{"--total":l.length},children:l.map((e,t)=>d("span",{className:lM.Char,style:{"--index":t},children:e},t))})}function pM(e){const{checkout:{negotiator:n}}=ie(),{initialUnresolvedFields:r}=n;return t(()=>function(e,t){return t.some(t=>e.has(t))}(r.value,e))}const mM=["deliveryNext","taxes","duties","landedCostDetails","remoteTaxDetails"];function hM({alignItems:e="baseline",freeLabel:n,outOfStockLabel:r,paymentDue:a,showCurrencyBadge:i,hideCurrencyCode:o,size:s}){const{i18n:l,embed:c,checkout:{negotiator:u}}=ie(),p=_v(),{orderSummary:h}=vv(),g=function(){const{checkout:{negotiator:e}}=ie(),{allViolations:n}=e.current.fields;return t(()=>$y(n.value??[]))}(),f=Tt(),y=vn("deliveryNext"),v=vn("taxes"),_=vn("duties"),b=vn("landedCostDetails"),k=vn("remoteTaxDetails"),S=t(()=>void 0!==u.current.fields.deliveryNext.value||void 0!==u.current.fields.taxes.value||void 0!==u.current.fields.duties.value||void 0!==u.current.fields.landedCostDetails.value||void 0!==u.current.fields.remoteTaxDetails.value),w=pM(mM),C=m(w.peek()),E=m(!w.peek()&&S.peek());P(()=>{!w.value&&S.value&&(E.value=!0)});const I=t(()=>y.value||v.value||_.value||b.value||k.value),A=t(()=>(!c||!yr(c.embedder))&&(c?!S.value||I.value:C.peek()&&!E.value)),T=!o&&p,L=t(()=>r&&g.value?r:n&&0===a.value.amount?n:l.formatCurrency(a.value.amount,{currency:a.value.currencyCode,form:"short"})),N=n?"uppercase":void 0,R=h.totalDueTypography;let M,D;R?(M="bold"===R.weight?"strong":"generic",D=R.size??"base"):(M="strong",D="large");const O=d(Vf,{size:i?"extraSmall":"small",color:"subdued",translate:!1,children:a.value.currencyCode}),z=t(()=>T&&L.value!==r&&L.value!==n&&(!f.value||!G(a.value.currencyCode,L.value)));
2return d(Jf,{alignItems:e,gap:"small-300",direction:"inline",children:[d(x,{when:z,children:d(BI,{children:i?d(FL,{color:"subdued",size:"small",children:O}):O})}),d(PR,{condition:A.value,type:M,size:s??D,translate:!1,letterCase:N,skeletonContent:L.value,children:E.value?d(uM,{formatted:L,money:a}):null})]})}const gM=1e8;function fM(e,t){const n=e/t*100,r=Math.round(n*gM)/gM;return Math.ceil(r)/100}function yM(e){return e?.installmentPlans?.some(e=>"MSI"===e.type)??!1}function vM(e,t){return e.map(e=>"direct"===e.method.type||e.method.type===pe.CreditCard?{...e,method:{...e.method,creditCardInstallments:t}}:"wallet"===e.method.type&&"SHOP_PAY"===e.method.name&&e.method.walletContent?{...e,method:{...e.method,walletContent:{...e.method.walletContent,creditCardInstallments:t}}}:e)}function _M(e){return e.map(e=>"direct"===e.method.type||e.method.type===pe.CreditCard?{...e,method:{...e.method,creditCardInstallments:void 0}}:e)}function bM(){const e=Ai(),n=zI(),{i18n:r,checkout:{negotiator:a}}=ie(),{installmentMonthsSignal:i}=a.context,o=a.current.fields.paymentMethods,s=t(()=>o.value?.some(e=>"direct"===e.type&&!e.alternative&&yM(e))??!1);return{amount:t(()=>{const t=i.value,n=e.value;return s.value&&Boolean(t)&&n&&t?{...n,amount:fM(n.amount,t)}:n}),label:t(()=>{const t=i.value;return s.value&&Boolean(t)&&Boolean(e.value)?r.translate("order_summary.installment_due_today_label"):n.value}),isInstallment:t(()=>s.value&&Boolean(i.value))}}function kM(){const{checkout:{negotiator:e}}=ie(),n=e.current.fields.paymentFlexibilityPaymentTermsTemplate,r=Ci(),a=xI(),i=ct();return t(()=>{if(r.value||a.value)return!1;const e=Boolean(n.value),t=i.value;return e||t})}function PM({label:e,amount:t,hideCurrencyCode:n}){const{moneySummary:{labelTypography:r}}=$m();return d(iM,{children:[d(oM,{children:d(Vf,{type:"strong",size:r?.size??"large",children:e})}),d(sM,{children:d(hM,{paymentDue:t,hideCurrencyCode:n})})]})}function SM({variant:e,showLoadingPlaceholder:n}){const r=Ai(),{i18n:a,shop:o}=ie(),s=zI(),l=t(()=>!r.value),c=t(()=>r.value?a.formatCurrency(r.value.amount,{currency:r.value.currencyCode,form:"short"}):void 0),u=i({amount:0,currencyCode:o.currencyCode}),p=t(()=>{const e=r.value;return null!=e&&(u.current=e),u.current});return l.value&&!n?null:"card"===e?d(Nf,{background:"subdued",padding:"small-300",borderRadius:"small",children:d(Qm,{gridAutoFlow:"column",gridTemplateColumns:"minmax(0, 1fr) minmax(auto, max-content)",gridTemplateRows:"minmax(0, 1fr)",alignItems:"center",alignContent:"center",children:[d(Vf,{color:"subdued",children:s}),d(Vf,{color:"subdued",children:c})]})}):d(uR,{spacing:"small-500",children:d(PM,{label:s,amount:p,hideCurrencyCode:l.value})})}function wM({children:e}){return d(uR,{spacing:"small-500",children:d(gR,{children:[d(fR,{children:d(sx,{color:"subdued",children:d(dA,{children:e})})}),d(yR,{})]})})}function CM(){return d(Nf,{children:[d(kN,{blockSize:"small-200"}),d(gw,{accessibilityRole:"presentation"}),d(kN,{blockSize:"small-200"})]})}function EM(){const{shop:e,checkout:{negotiator:n}}=ie(),r=n.current.fields.buyerIdentity,a=Ai(),i=e.hasFlagEnabled(ko);return t(()=>{if(i)return;const e=r.value,t="BG"===e?.countryCode&&"EUR"===e?.presentmentCurrency,n=a.value;return!t||!n||n.amount<=0?void 0:Number((1.95583*n.amount).toFixed(2))})}function xM({bgnAmount:e}){const{i18n:t}=ie();return d(gR,{children:d(yR,{children:d(Vf,{color:"subdued",children:t.formatCurrency(e,{currency:"BGN",form:"short"})})})})}const IM=["taxes","duties"];function AM({shopId:e}){const n=Ai(),r=Po(),a=t(()=>e?r.value.get(e):n.value),{checkout:o,embed:s,i18n:l,shop:c}=ie(),u=pM(IM),p=vn("deliveryNext"),m=vn("taxes"),h=vn("duties"),g=vn("landedCostDetails"),f=vn("remoteTaxDetails"),{visibility:v}=o.configuration,{moneySummary:{labelColor:_="base",labelTypography:b},moneyLines:{divided:k}}=$m(),P=o.proposal.facts.previouslyPaidTotal,S=Ci(),w=DI(),C=(()=>{const{shopPay:e,checkout:t}=ie();if(Yg().value&&t.installments.isSupported.value&&t.installments.config.value?.availableLoanTypes.includes("SPLIT_PAY")&&e.session.isInstallmentsSelected.value)return t.installments.chargeAmount.value})(),{value:E}=kt(),I=E?.currencyCode,A=kM(),T=c.hasFlagEnabled(So),L=Boolean(o.proposal.facts.taxesIncluded),N=Boolean(o.proposal.facts.dutiesIncluded),R=co().value||L,M=yo().value||N,{value:D}=o.negotiator.current.fields.landedCostDetails,O=wk(),z=o.proposal.facts.landedCostDetails,{amount:B,label:V,isInstallment:F}=bM(),U="COMPACT"===o.configuration.orderSummary?.layoutStyle,q=AR(),j=EM(),H=t(()=>e&&e!==c.id?l.translate("order_summary.total_label"):V.value),$=t(()=>!a.value),Y=t(()=>(!s||!yr(s.embedder))&&u.value),W=i(a.peek()),G=t(()=>{const e=a.value;return null!=e&&(W.current=e),W.current}),J=t(()=>G.value??{amount:0,currencyCode:c.currencyCode}),K=i(B.peek()),Q=t(()=>{const e=B.value;return null!=e&&(K.current=e),K.current??J.value}),X=t(()=>F.value?a.value:void 0),Z=null!=G.value&&(p.value||m.value||h.value||g.value||f.value);if(($.value||!B.value)&&!Y.value&&!Z)return null;const ee=(v.showSubtotal.value||P)&&k?d(CM,{}
2):null,te=!S.value&&!w.value,ne=O?.applied&&R&&q.value?d(wM,{children:q.value}):te?d(LR,{taxesIncluded:R,shopId:e}):null;if(e)return d(y,{children:[d(PM,{label:H,amount:J,hideCurrencyCode:$.value}),ne]});if(U){const e="base"===b?.weight?"generic":"strong";return d(y,{children:[ee,d(iM,{children:[d(oM,{children:d(Jf,{children:d(x,{when:q,fallback:d(Vf,{type:e,color:_,size:b?.size??"large",children:V.value}),children:d(y,{children:[d(Vf,{type:e,color:_,size:b?.size,children:V.value}),ne]})})})}),d(sM,{children:d(hM,{paymentDue:Q,hideCurrencyCode:$.value,showCurrencyBadge:!0,alignItems:"center"})})]})]})}const re=[D,z].some(e=>e?.incoterm===Ll.Ddp),ae=M&&re?d(y,{children:[d(kN,{blockSize:"small-400"}),d(gw,{accessibilityRole:"presentation"}),d(kN,{blockSize:"small-400"}),d(sx,{type:"small",color:"subdued",children:d(dA,{children:l.translate("order_summary.duties_included_label")})})]}):null,oe=T?d(SM,{showLoadingPlaceholder:Y.value||Z}):d(uR,{spacing:"small-500",children:d(PM,{label:H,amount:J,hideCurrencyCode:$.value})}),se=l.translate("order_summary.payment_terms_totals.due_today_next");return d(y,{children:[ee,d(x,{when:A,children:d(iM,{children:[d(oM,{children:d(Vf,{children:se})}),d(sM,{children:d(Jf,{direction:"inline",gap:"small-200",alignItems:"baseline",children:d(PR,{condition:$.value,size:"medium",translate:!1,children:l.formatCurrency(0,{currency:J.value.currencyCode,form:"short"})})})})]})}),d(x,{when:X,children:e=>d(gR,{label:l.translate("order_summary.total_label"),value:l.formatCurrency(e.amount,{currency:e.currencyCode,form:"short"})})}),d(x,{when:A,fallback:d(PM,{label:H,amount:Q,hideCurrencyCode:$.value}),children:oe}),ne,void 0!==C&&I?d(iM,{children:d(sM,{accessibilityColumnIndex:2,children:d(Vf,{size:"small",translate:!1,children:l.translate("payment.pay_in_installments_split_pay_short",{amount:l.formatCurrency(C,{currency:I,form:"short"})})})})}):null,null!=j.value&&d(xM,{bgnAmount:j.value}),ae]})}const TM=jc("PriceBreakdownItemTooltip");function LM({title:e,tooltipText:t,itemText:n,layout:r}){const{i18n:a}=ie(),i=Hc(void 0,TM),o="strong",s="base";return d(gR,{layout:r,children:[d(fR,{children:d(Jf,{direction:"inline",alignItems:"center",gap:"small-300",children:[d(Vf,{color:s,type:o,children:e}),t?d(y,{children:[d(rh,{type:"question-circle",size:"small",interestFor:i,accessibilityLabel:a.translate("tooltip.accessibility_label_context",{context:e})}),d(sm,{id:i,children:t})]}):null]})}),d(yR,{children:d(Vf,{color:s,type:o,children:n})})]})}const NM=jc("RecurringTotalsTooltip"),RM=jc("RecurringTotalsLabel");function MM({cardStyle:e}){const{i18n:t,checkout:{negotiator:n}}=ie(),{value:r}=n.current.fields.recurringTotals,a=$L(),i=Hc(void 0,NM),o=Hc(void 0,RM);if(!r?.length)return null;const s=t.translate("order_summary.recurring_subtotal_label");if(e){const e=1===r.length;return d(Nf,{accessibilityRole:e?"group":void 0,"aria-labelledby":e?o:void 0,background:"subdued",padding:"small-300",borderRadius:"small",children:e?d(Qm,{gridAutoFlow:"column",gridTemplateColumns:"minmax(0, 1fr) minmax(auto, max-content)",gridTemplateRows:"minmax(0, 1fr)",alignItems:"center",alignContent:"center",children:[d(Jf,{direction:"inline",alignItems:"center",gap:"small-300",children:[d(Vf,{id:o,color:"base",type:"strong",children:s}),d(Vf,{color:"base",type:"strong",children:a(r[0])})]}),d(rh,{type:"question-circle",size:"small",interestFor:i,accessibilityLabel:t.translate("tooltip.accessibility_label_context",{context:s})}),d(sm,{id:i,children:t.translate("order_summary.recurring_total_tooltip")})]}):d(Vf,{color:"base",type:"strong",children:t.translate("order_summary.recurring_total_multiple_label")})})}return d(y,{children:[d(gw,{accessibilityRole:"presentation"},"recurringTotalsDivider"),1===r.length?d(uR,{spacing:"small-300",children:d(LM,{title:s,tooltipText:t.translate("order_summary.recurring_total_tooltip"),itemText:a(r[0]),layout:"stackable"})}):d(Vf,{color:"base",type:"strong",children:t.translate("order_summary.recurring_total_multiple_label")})]})}function DM({line:e}){const{i18n:t}=ie();if(!e.cost)return null;const{amount:n,currencyCode:r}=e.cost,a=t.formatCurrency(-n,{currency:r,form:"short",spacedMinusSign:!0}),i=TI(e.method.redemptionContent);return d(gR,{children:[d(fR,{children:d(Jf,{direction:"inline",gap:"base",children:[d(Vf,{children:t.translate("order_summary.gift_card_label")}),d(Jf,{direction:"inline",alignItems:"center",gap:"small-400",children:[d(rh,{type:"gift-card"}),d(Vf,{accessibilityVisibility:"hidden",children:LI(i)}),d(Vf,{accessibilityVisibility:"exclusive",children:t.translate("order_summary.gift_card_ending",{last_characters:i||""})})]})]})}),d(yR,{children:d(Vf,{type:"strong",children:a})})]})}function OM({line:e}){const{checkout:t,i18n:n}=ie(),r=t.proposal.negotiated.fields.shopPromotion.value,a="filled"===r?.status?new Map(r.promotions.map(({promotionId:e,type:t})=>[e,t])):void 0;return e.method.redemptionContent?.details?.map(e=>{const{amount:t,currencyCode:r}=e.destinationAmount,i=n.formatCurrency(-parseFloat(t),{currency:r,form:"short",spacedMinusSign:!0}),o={SHOP_DISCOUNT_OFFER:n.translate("order_summary.exclusive_deal"),SHOP_CASH_BALANCE:n.translate("order_summary.shop_cash_title"),SHOP_PROMOTION:n.translate("order_summary.shop_promotion")},s=e.promotionType??(null==e.redemptionId?void 0:a?.get(e.redemptionId)),l="SHOP_PROMOTION"===e.redemptionType&&"DOORBUSTER"===s?n.translate("order_summary.flash_deal"):o[e.redemptionType];return l?d(gR,{type:"strong",label:l,value:i},e.redemptionId):null})}function zM({line:e}){const{i18n:t}=ie();if(!e.cost)return null;const n=t.translate("payment.store_credit.label"),r=t.formatCurrency(-e.cost.amount,{currency:e.cost.currencyCode,form:"short",spacedMinusSign:!0});return d(gR,{type:"strong",label:n,value:r})}function BM({line:e}){switch(e.method.redemptionSource){case"SHOP_CASH":return d(OM,{line:e});case"STORE_CREDIT":return d(zM,{line:e});case"CUSTOM":{const t=e;return d(DM,{line:t},t.method.redemptionContent?.redemptionAttributes[0].value)}default:return null}}
2function VM(){const e=Si("STORE_CREDIT","SHOP_CASH"),{paymentLines:t}=RI(),n=[...e.value,...t];return 0===n.length?null:d(y,{children:n.map(e=>d(BM,{line:e},function(e){if("CUSTOM"===e.method.redemptionSource){const t=e,n=t.method.redemptionContent?.redemptionAttributes[0]?.value||"";return e.method.redemptionSource+n}return e.method.redemptionSource}(e)))})}function FM(e){const{shop:{id:n},checkout:r}=ie(),a=r.negotiator.current.fields.merchandiseLines,i=r.proposal.facts.merchandiseLines??[],{value:o}=r.negotiator.current.fields.legacyRepresentProductsAsFees,s=t(()=>wo(a.value?.lines??[],r.negotiator.current.fields.remoteMerchandiseDetails.value)),l=Co(),c=e?e!==n?{lines:s.value.get(e),factLines:void 0}:{lines:l.value,factLines:i}:{lines:a.value?.lines,factLines:i},u=function(e,t){return t?e?.reduce((e,t)=>t.legacyFee?e:e+t.quantity,0):e?.reduce((e,t)=>e+t.quantity,0)}(c?.lines,o),d=c?.lines?.filter(({quantity:e})=>e>0),p=c?.factLines?.reduce((e,t)=>e+t.quantity,0);return{totalLineQuantities:u,totalLineQuantitiesFact:p,merchandiseLinesWithCount:d?.length||0}}function UM({shopId:e}){const{subtotalLabel:n,subtotalValue:r,subtotalOriginalValue:a}=function(e){const{checkout:n,i18n:r}=ie(),a=function(e){const{shop:{id:n},checkout:{negotiator:r}}=ie(),{remoteTotalDetails:a,legacyRepresentProductsAsFees:i,legacySubtotalBeforeTaxesShippingAndFees:o,subtotal:s}=r.current.fields,l=Et();return t(()=>{const t=i.value?o.value:l.value;return e?n===e?s.value:a.value?.perShopRemoteTotals.get(e)?.subtotal:t})}(e),i=function(e){const{embed:t,i18n:n}=ie(),{totalLineQuantities:r,merchandiseLinesWithCount:a}=FM(e);return yr(t?.embedder)?n.translate("order_summary.number_items",{count:r??0}):a>1&&r?n.translate("order_summary.subtotal_label_with_quantity",{count:r}):n.translate("order_summary.subtotal_label")}(e);return t(()=>{const e=a.value?r.formatCurrency(a.value.amount,{currency:a.value.currencyCode,form:"short"}):void 0,t=n.latestReceipt.value&&"consolidatedProposedSubtotalBeforeTaxesAndShipping"in n.latestReceipt.value&&n.latestReceipt.value.consolidatedProposedSubtotalBeforeTaxesAndShipping||void 0,o=t?r.formatCurrency(t.amount,{currency:t.currencyCode,form:"short"}):void 0;return{subtotalLabel:i,subtotalValue:e,subtotalOriginalValue:o}})}(e).value;return r?d(gR,{children:[d(fR,{children:d(Vf,{children:n})}),d(yR,{children:a?d(Jf,{direction:"inline",gap:"small-300",children:[d(Vf,{tone:"critical",type:"redundant",translate:!1,children:a}),d(Vf,{translate:!1,children:r})]}):d(Vf,{translate:!1,children:r})})]}):null}function qM(){const{i18n:e,checkout:n,source:r}=ie(),a=n.negotiator.current.fields.tipLines,i=n.proposal.facts.tip,o=t(()=>{const e=a.value?.[0]?.amount,t=Hn(r)?i:e;return t&&t.amount>0?t:void 0});return d(x,{when:o,children:t=>d(gR,{label:e.translate("order_summary.tip_label"),value:e.formatCurrency(t.amount,{currency:t.currencyCode,form:"short"})})})}function jM({variant:e}){const n=function(){const e=Eo(),{shop:n,embed:r}=ie(),a=n.hasFlagEnabled(xo);return t(()=>{const t=Boolean(r?.embedder)&&!yr(r?.embedder);return!Boolean(a||!e.value||0===e.value.amount||t)})}(),r=Eo();return n.value&&r.value?d(HM,{variant:e,totalSavings:r.value}):null}function HM({variant:e,totalSavings:n}){const{i18n:r,embed:a,checkout:{negotiator:i}}=ie(),{deferredTotal:o}=i.current.fields,s=yr(a?.embedder)?r.translate("universal.iframes.savings_label").toUpperCase():r.translate("order_summary.total_savings").toUpperCase(),l=r.formatCurrency(n.amount,{currency:n.currencyCode,form:"short"}),c=d(Vf,{type:"strong",translate:!1,children:l}),u=t(()=>o.value&&o.value.amount.amount>0?"small-200":"small-400");return"card"===e?d(Nf,{children:d(Jf,{direction:"inline",alignItems:"center",gap:"small-400",children:[d(Jf,{direction:"inline",alignItems:"center",gap:"small-500",children:[d(rh,{type:"savings",size:"small",color:"base"}),d(Vf,{color:"subdued",children:r.translate("order_summary.total_savings")})]}),d(Vf,{color:"subdued",translate:!1,children:l})]})}):d(uR,{spacing:u.value,children:d(iM,{children:[d(oM,{children:d(Jf,{direction:"inline",alignItems:"center",gap:"small-300",children:[d(rh,{type:"savings",size:"base",color:"strong"}),d(Vf,{type:"strong",children:s}),c]})}),d(sM,{})]})})}function $M(){const{i18n:e,checkout:{negotiator:n}}=ie(),{alternativePaymentCurrency:r}=n.current.fields,a=vn("alternativePaymentCurrency"),{hasNegotiatedAlternativePaymentCurrencySignal:i}=n.context,o=t(()=>{const t=r.value,n=a.value;if(t||n&&i.value)return{loading:n,text:t&&e.translate("order_summary.alternative_payment_currency_total",{amount_due:e.formatCurrency(t.totalWithoutGiftCards.amount,{currency:t.totalWithoutGiftCards.currencyCode,form:"explicit"})})}});return d(x,{when:o,children:({loading:e,text:t})=>d(gR,{children:d(yR,{children:d(PR,{condition:e,size:"small",color:"subdued",children:e?"$0.00":t})})})})}function YM(){const{moneyLines:{divided:e}}
2=$m(),{checkout:{negotiator:n}}=ie(),{legacyRepresentProductsAsFees:r,legacyMerchandiseLinesAsFees:a}=n.current.fields,i=t(()=>r.value&&a.value?a.value.lines:[]);return d($,{each:i,getKey:e=>e.title,children:t=>d(y,{children:[e&&d(CM,{}),d(WM,{...t})]})})}function WM({title:e,description:t,total:n}){const{i18n:r}=ie(),a=t?d(Jf,{direction:"inline",alignItems:"center",gap:"small-400",children:d(Vf,{children:[e,d("span",{style:{position:"absolute"},children:d(Wm,{padding:"small-500 none none small-500",overlay:d(sm,{children:t}),accessibilityLabel:r.translate("general.tooltip_accessibility_label"),children:d(rh,{type:"question-circle",size:"small"})})},"description-with-tooltip")]})}):d(Vf,{children:e});return d(gR,{label:e,children:[d(fR,{children:a}),d(yR,{children:d(Vf,{translate:!1,children:r.formatCurrency(n.amount,{currency:n.currencyCode,form:"short"})})})]})}function GM({content:e}){return function(e){const t=i(!1);P(()=>{const n=e.value;if(t.current){if(n)return ju({content:n})}else t.current=!0})}(e),d(x,{when:e,children:e=>d(y,{children:JM(e).map(({id:e,line:t})=>d(gR,{layout:"stackable",children:[d(Nf,{inlineSize:"100%",children:d(fR,{children:d(sx,{type:"small",color:"subdued",textAlign:"end",children:t})})}),d(yR,{})]},e))})})}function JM(e){const t=new Map;return e.split("\n").filter(Boolean).map(e=>{const n=t.get(e)??0;return t.set(e,n+1),{id:`${e}:${n}`,line:e}})}function KM(){const{moneyLines:{divided:e}}=$m(),{i18n:t,checkout:n,shop:r}=ie(),{value:a}=kt(),{value:i}=n.negotiator.current.fields.deferredTotal,o=n.proposal.facts.previouslyPaidTotal,s=n.proposal.facts.updatedTotal,l=n.proposal.facts.waivedTotal,c=(n.proposal.facts.merchandiseLines??[]).some(e=>e.quantityChange&&e.quantityChange.delta),u=Boolean(s&&a&&c),p=i&&i.amount.amount>0,m=o&&Number(o.amount)>0,h=r.hasFlagEnabled(Io)&&l&&Number(l.amount)>0,g=(u||o||h)&&e;return g||u||m||h||p&&a?d(y,{children:[g&&d(CM,{}),p&&a&&d(gR,{label:t.translate("order_summary.total_label"),value:t.formatCurrency(a.amount,{currency:a.currencyCode,form:"short"})}),u&&s&&d(gR,{type:"strong",label:t.translate("order_summary.order_total_updated_label"),value:t.formatCurrency(Number(s.amount),{currency:s.currencyCode,form:"short"})}),m?d(gR,{type:"strong",label:t.translate("order_summary.total_already_paid_label"),value:t.formatCurrency(-Number(o.amount),{currency:o.currencyCode,form:"short"})}):null,h&&l?d(gR,{type:"strong",label:t.translate("order_summary.waived_label"),value:t.formatCurrency(-Number(l.amount),{currency:l.currencyCode,form:"short"})}):null]}):null}function QM(){const{moneyLines:{divided:e}}=$m(),t=function(){const{i18n:e,checkout:t}=ie(),n=t.proposal.facts.returnFees,r=Number(n?.aggregatedReturnShippingFees?.amount)>0,a=Number(n?.aggregatedRestockingFees?.amount)>0;return r||a?{shippingFee:r?{label:e.translate("order_summary.return_shipping_fee_label"),value:e.formatCurrency(Number(n?.aggregatedReturnShippingFees?.amount),{currency:n?.aggregatedReturnShippingFees?.currencyCode,form:"short"})}:null,restockingFee:a?{label:e.translate("order_summary.return_restocking_fee_label"),value:e.formatCurrency(Number(n?.aggregatedRestockingFees?.amount),{currency:n?.aggregatedRestockingFees?.currencyCode,form:"short"})}:null}:null}();if(!t)return null;const{shippingFee:n,restockingFee:r}=t;return d(y,{children:[n&&d(y,{children:[e&&d(CM,{}),d(gR,{type:"strong",label:n.label,value:n.value})]}),r&&d(gR,{type:"strong",label:r.label,value:r.value})]})}function XM(){const{i18n:e,checkout:t,embed:n}=ie(),{value:r}=Ao(),a=DI(),i=MI(),o=Boolean(t.proposal.facts.taxesIncluded),s=co().value||o;if(!a.value||!r)return null;const l=d(LR,{taxesIncluded:s});return yr(n?.embedder)&&i.value.length>0?l:d(y,{children:[d(gR,{label:e.translate("order_summary.total_price_label"),value:e.formatCurrency(r.amount,{currency:r.currencyCode,form:"short"})}),l]})}const ZM=E(function(){const{checkout:e,i18n:n,embed:r}=ie(),{visibility:a}=e.configuration,{orderSummary:i}=vv(),o=e.configuration.orderSummary?.headerPosition??i.headerPosition,s=i.isCollapsible??!1,l=!1===i.isCollapsible,{currentDetour:c}=nc().value,u="thankYou"===c?.type,p=lR(),m=e.proposal.negotiated.fields.additionalMoneyLines.value,h=e.proposal.negotiated.fields.lpmDisclosure,g=vn("lpmDisclosure"),f=t(()=>g.value?void 0:h.value),y=t(()=>{const t=e.latestReceipt.value;return"processed"===t?.status?t.lpmDisclosure:void 0});return d(XT,{children:[d(_R,{ref:p,title:n.translate("order_summary.cost_table_title"),children:[d(x,{when:a.showSubtotal,children:[d(UM,{}),d(YR,{}),d(UR,{}),d(YM,{}),d(QM,{}),d(tM,{}),d(qM,{}),d(XM,{}),d(VM,{})]}),d(KM,{}),d(rM,{}),m?.map(e=>d(gR,{label:e.label,value:n.formatCurrency(e.amount.amount,{currency:e.amount.currencyCode,form:"short"})},e.id)),"BOTTOM"===o&&s?d(kN,{blockSize:"small-500"}):d(AM,{}),!u&&d(x,{when:()=>!f.value,children:d($M,{})}),d(GM,u?{content:y}:{content:f}),d(RR,{}),!yr(r?.embedder)&&d(jM,{}),!l&&d(MM,{})]}),l&&d(x,{when:()=>e.negotiator.current.fields.recurringTotals.value,children:d(Nf,{paddingBlockStart:"small-300",children:d(MM,{cardStyle:!0})})})]})});
2var eD="km09ry0 _1fragem5z";const tD=jc("Form");function nD({onSubmit:e,children:t,implicitSubmit:n=!0,disabled:a=!1,id:i,contentsClassName:o}){const s=Ju(),l=Hc(void 0,tD),c=i??l,u=null!=bd(),p=r(()=>({id:c,nested:u}),[c,u]);let m=null;n&&(m=d(Nf,{accessibilityVisibility:"exclusive",children:d(rD,{disabled:a,form:p,children:"string"==typeof n?n:s("submit")})}));const h=t=>{t.preventDefault(),t.stopPropagation(),a||"function"==typeof e&&e()},g=d("div",{className:v("km09ry1 _1fragemws",o),children:t});return u?d(y,{children:[d(_d.Provider,{value:p,children:[g,m]}),d(eu,{children:d("form",{action:"",method:"POST",noValidate:!0,className:eD,id:c,onSubmit:h})})]}):d("form",{action:"",method:"POST",noValidate:!0,className:eD,id:c,onSubmit:h,children:d(_d.Provider,{value:p,children:[g,m]})})}function rD({form:e,children:t,disabled:n}){return d("button",{type:"submit",disabled:n,tabIndex:-1,"aria-hidden":!0,form:e.nested?e.id:void 0,children:t})}const aD=["extraSmall","small","medium","large"];function iD({above:e,below:t,children:n}){const r=wd()?"span":"div",{hiddenOnExtraSmall:a,hiddenOnSmall:i,hiddenOnMedium:o,hiddenOnLarge:s}=function(e,t){if(e===t)return{hiddenOnExtraSmall:!0,hiddenOnSmall:!0,hiddenOnMedium:!1,hiddenOnLarge:!0};const n=e?aD.indexOf(e)+1:0,r=t?aD.indexOf(t)-1:aD.length-1,a=aD.slice(n,r+1);return{hiddenOnExtraSmall:a.indexOf("extraSmall")>=0,hiddenOnSmall:a.indexOf("small")>=0,hiddenOnMedium:a.indexOf("medium")>=0,hiddenOnLarge:a.indexOf("large")>=0}}(e,t),l=v("_123qrzt0 _1fragem5z",a&&"_123qrzt1",i&&"_123qrzt2",o&&"_123qrzt3",s&&"_123qrzt4");return d(r,{className:l,children:n})}function oD({targetSelector:e,label:t,icon:r}){const a=n(()=>{const t=document.querySelector(e);t&&(t.focus(),t.scrollIntoView({behavior:"smooth"}))},[e]);return d(Nf,{display:"@media (inline-size >= medium) auto, none",children:d(jf,{variant:"secondary",size:"small",onClick:a,className:Se({screenReaders:"untilFocus"}),children:d(Jf,{direction:"inline",gap:"small-400",alignItems:"center",children:[d(rh,{type:r,size:"small-100"}),d(Vf,{children:t})]})})})}const sD=({violations:e,noticeType:t,noticeTitle:n,noticeHeader:r,noticeFooter:a})=>({code:t,tone:"critical",localizedTitle:n,localizedMessage:d(y,{children:[r,d("ul",{style:{listStyle:"inside"},children:e.map(e=>d("li",{children:e.localizedMessageHtml?d("span",{dangerouslySetInnerHTML:{__html:e.localizedMessageHtml}}
2):e.localizedMessage||e.nonLocalizedMessage},e.code))}),a]})}),lD=()=>{const{i18n:e,shop:n,checkout:{negotiator:r}}=ie(),a=Uc(),i=vn("shippingAddress"),{allViolations:o}=r.current.fields,s=nc(),{shippingAddress:l}=r.parts;return t(()=>{const t=l.peek();if(a.value&&"information"===s.value.currentPage?.id&&Wn(t,{...To,countryCode:t?.countryCode}))return null;const r=o.value?.filter(e=>Gn.has(e.code))||[];return 0===r.length||!a.value||i.value?null:sD({violations:r,noticeType:uv.DeliveryViolations,noticeTitle:e.translate("notice_banner.violations_title",{violation:e.translate("notice_banner.individual_violations_title",{scope:uv.DeliveryViolations})}),noticeHeader:e.translate("notice_banner.editable_shipping_address_violations_message_title"),noticeFooter:e.translate("notice_banner.editable_shipping_address_violations_message_footer",{emailLink:d(Wf,{href:`mailto:${n.contactEmail}`,children:e.translate("notice_banner.editable_shipping_address_violations_email_link")})})})})};var cD={Banner:"sdr03s1 sdr03s0 _1fragemk5 _1fragemjl _1fragemkp _1fragemj1 _1fragemm8 _1fragemlo _1fragemms _1frageml4 _1fragempz _1fragemrs _1fragemo6 _1fragemtl _1fragemws _1fragem6t",Button:"sdr03sb sdr03sa _1fragem64 _1fragem19 _1fragembj _1fragem12u",Content:"sdr03sc",ControlCollapsible:"sdr03sf sdr03se _1fragem28",ControlDismiss:"sdr03sg",Icon:"sdr03s9",Heading:"sdr03sd",toneVariant:{critical:"sdr03s3",info:"sdr03s4",success:"sdr03s5",warning:"sdr03s6"},colorVariant:{base:"sdr03s7",subdued:"sdr03s8"},withHeading:"sdr03s2"};const uD=jc("Banner"),dD=new Map([["info","info"],["success","check-circle"],["warning","alert-triangle"],["critical","alert-circle"]]);function pD({autoFocus:e,focusable:t,children:n,collapsible:r,dismissible:o,iconHidden:l,color:c="base",id:u,tone:p="auto",heading:m,hidden:h=!1,onDismiss:g,onAfterHide:f}){const _="auto"===p?"info":p,b=Ju(),[k,P]=s(h),[S,w]=s(!0),C=i(),E=Hc(void 0,uD),x=Sf({active:"critical"===_}),I=i(k),A=Pd(),T=qc(),L=i(T);L.current=T,a(()=>{if(!e)return;const t=C.current;if(!t)return;const n=()=>{t.focus({preventScroll:!0}),""===t.style.scrollMarginTop&&(t.style.scrollMarginTop="var(--x-spacing-large-500)"),t.scrollIntoView?.({behavior:L.current?"auto":"smooth"})};if(t.getBoundingClientRect().height>0)return void n();if("undefined"==typeof ResizeObserver){const e=setTimeout(n,300);return()=>clearTimeout(e)}const r=new ResizeObserver(()=>{0!==t.getBoundingClientRect().height&&(r.disconnect(),n())});return r.observe(t),()=>r.disconnect()},[e]),a(()=>{!I.current&&k&&f?.(),I.current=k},[k,f]),a(()=>{P(h)},[h]);const N=v(cD.Banner,_&&cD.toneVariant[_],m&&cD.withHeading,cD.colorVariant[c]),R=Boolean(r&&m),M=!R||R&&!S,D=o&&d("button",{type:"button",className:cD.Button,onClick:()=>{"function"==typeof g&&g(),P(!0)},"aria-label":b("closeNotification"),"aria-hidden":!!A||void 0,tabIndex:A?-1:void 0,children:d(rh,{type:"x",size:"small"})}),O=d("button",{type:"button",className:cD.Button,onClick:()=>w(e=>!e),"aria-expanded":!S,"aria-controls":`${E}-collapsible-area`,"aria-label":b("expandNotification"),"aria-hidden":!!A||void 0,tabIndex:A?-1:void 0,children:d(rh,{size:"small",type:S?"chevron-down":"chevron-up"})});return k?null:d("div",{className:N,role:"critical"===_?"alert":"status",...(e||t)&&{tabIndex:-1},ref:function(e){C.current=e,x.current=e},id:u,children:[!l&&d("div",{className:cD.Icon,children:d(rh,{type:dD.get(_),size:"fill"})}),m&&d("div",{className:cD.Heading,children:d(IS,{level:3,children:m})}),R&&d("div",{className:cD.ControlCollapsible,children:O}),mw(n)&&d("div",{className:cD.Content,children:d(wu.Provider,{value:"Banner",children:d(yu,{children:R?d(Id,{open:M,id:`${E}-collapsible-area`,children:[m&&d(kN,{blockSize:"small-200"}),n]}):d(y,{children:[m&&d(kN,{blockSize:"small-200"}),n]})})})}),D&&d("div",{className:cD.ControlDismiss,children:D})]})}const mD=["cart","cart.billingAddress.address1","cart.billingAddress.address2","cart.billingAddress.city","cart.billingAddress.company","cart.billingAddress.countryCode","cart.billingAddress.district","cart.billingAddress.firstName","cart.billingAddress.lastName","cart.billingAddress.line2","cart.billingAddress.neighborhood","cart.billingAddress.phone","cart.billingAddress.provinceCode","cart.billingAddress.streetName","cart.billingAddress.streetNumber","cart.billingAddress.subdistrict","cart.billingAddress.zip","cart.buyerIdentity","cart.buyerIdentity.email","cart.buyerIdentity.phone","cart.deliveryGroups[0].deliveryAddress","cart.deliveryGroups[0].deliveryAddress.address","cart.deliveryGroups[0].deliveryAddress.address1","cart.deliveryGroups[0].deliveryAddress.address2","cart.deliveryGroups[0].deliveryAddress.city","cart.deliveryGroups[0].deliveryAddress.company","cart.deliveryGroups[0].deliveryAddress.countryCode","cart.deliveryGroups[0].deliveryAddress.district","cart.deliveryGroups[0].deliveryAddress.firstName","cart.deliveryGroups[0].deliveryAddress.lastName","cart.deliveryGroups[0].deliveryAddress.line2","cart.deliveryGroups[0].deliveryAddress.neighborhood","cart.deliveryGroups[0].deliveryAddress.phone","cart.deliveryGroups[0].deliveryAddress.provinceCode","cart.deliveryGroups[0].deliveryAddress.streetName","cart.deliveryGroups[0].deliveryAddress.streetNumber","cart.deliveryGroups[0].deliveryAddress.subdistrict","cart.deliveryGroups[0].deliveryAddress.zip","cart.discountCode","cart.paymentLines[0]","cart.paymentLines[0].billingAddress","cart.paymentLines[0].billingAddress.address1","cart.paymentLines[0].billingAddress.address2","cart.paymentLines[0].billingAddress.city","cart.paymentLines[0].billingAddress.company","cart.paymentLines[0].billingAddress.countryCode","cart.paymentLines[0].billingAddress.district","cart.paymentLines[0].billingAddress.firstName","cart.paymentLines[0].billingAddress.lastName","cart.paymentLines[0].billingAddress.line2","cart.paymentLines[0].billingAddress.neighborhood","cart.paymentLines[0].billingAddress.phone","cart.paymentLines[0].billingAddress.provinceCode","cart.paymentLines[0].billingAddress.streetName","cart.paymentLines[0].billingAddress.streetNumber","cart.paymentLines[0].billingAddress.subdistrict","cart.paymentLines[0].billingAddress.zip","cart.paymentLines[0].card","cart.paymentLines[0].card.expiry","cart.paymentLines[0].card.issueDate","cart.paymentLines[0].card.issueNumber","cart.paymentLines[0].card.name","cart.paymentLines[0].card.number","cart.paymentLines[0].card.verificationValue","cart.poNumber","order.deliveryUpdates","order.deliveryUpdates.email"].map(e=>{const t=e.replace(/\$/g,"\\$").replace(/\./g,"\\.").replace(/\[0\]/g,"\\[\\d+\\]");return new RegExp(`^${t}$`)}),hD=()=>{const e=ae(mf),{observability:t}=ie();return n(n=>{const r=function(e){switch(e){case"postalCode":return"zip";case"zone":case"zoneCode":return"provinceCode";case"country":return"countryCode";default:return e}}(n),a=r?`${e}.${r}`:e;return i=a,mD.some(e=>e.test(i))?a:(t.error(new gD(`Invalid target (${e}) and field (${r}
2) combination`)),"cart");var i},[e,t])},gD=class extends Error{constructor(){super(...arguments),this.name="InvalidTargetError"}},fD=new Set([bP.InputInvalid,bP.InputRequired]);function yD(e){return!fD.has(e)}function vD(e,t){return!!e&&e.target===t.target&&e.errorType===t.errorType&&e.value===t.value&&e.message===t.message}function _D(e){const{message:t,errorType:n,errorValue:r,children:o}=e,s=hD()(),l=Fg(),c=i(null),u=i(),p=i(!0),m=oe(l),h=e=>{m.current({...e,timestamp:new Date})},g=Lo(e=>{p.current&&vD(u.current,e)&&yD(e.errorType)&&h(e)},250);return a(()=>{const e=n||function(e){switch(e){case"cart.buyerIdentity":return bP.ContactError;case"cart.deliveryGroups[0].deliveryAddress":return bP.DeliveryError;case"cart.paymentLines[0].billingAddress":case"cart.paymentLines[0]":return bP.PaymentError;case"cart.discountCode":return bP.DiscountError;default:return bP.CheckoutError}}(s),a=t??c.current?.textContent??"",i={target:s,errorType:e,value:r||null,message:a};vD(u.current,i)||(u.current=i,yD(e)?g(i):h(i))}),a(()=>()=>{p.current=!1},[]),d("div",{ref:c,children:o})}function bD(e){const{errorType:t,errorValue:n,children:r,...a}=e;return d(pD,{...a,children:d(_D,{errorType:t,errorValue:n,children:r})})}function kD({notice:e,iconHidden:t=!1,errorType:n}){const r=e.localizedMessageHtml||e.localizedMessage||e.nonLocalizedMessage;if(!r)return null;const a=e.tone??"info",i={key:e.code,tone:a,onDismiss:e.onDismiss,dismissible:Boolean(e.onDismiss),heading:e.localizedTitle,collapsible:e.collapsible,iconHidden:t},o="string"==typeof e.localizedMessageHtml?d("div",{dangerouslySetInnerHTML:{__html:e.localizedMessageHtml}}
2):r;return["critical","warning"].includes(a)?d(bD,{...i,errorType:n??bP.CheckoutError,children:o}):d(pD,{...i,children:o})}function PD(){const e=lD().value;return e?d(kD,{notice:e,errorType:bP.DeliveryError}):null}function SD(){const{checkout:{negotiator:e}}=ie(),n=e.current.fields.allViolations,r=t(()=>(n.value?.filter(e=>No(e.code))??[]).filter((e,t,n)=>t===n.findIndex(t=>t.code===e.code))),a=t(()=>r.value.length>0);return d(x,{when:a,children:d(Jf,{gap:"base",children:d($,{each:r,getKey:e=>e.code,children:({localizedMessage:e,nonLocalizedMessage:t})=>d(bD,{errorType:bP.PaymentError,tone:"critical",children:e||t})})})})}function wD(){const{checkout:{negotiator:e}}=ie(),{allViolations:n}=e.current.fields;return t(()=>{const e=n.value?.filter(e=>mk.has(e.code))||[];return{violations:e,hasViolations:e.length>0}})}const CD=()=>{const{violations:e,hasViolations:t}=wD().value;return t?d(Jf,{gap:"base",children:e.map(({code:e,localizedMessage:t,nonLocalizedMessage:n})=>d(bD,{errorType:bP.DiscountError,tone:"warning",children:t||n},e))}):null};function ED(){const{router:e,checkout:{identity:n,negotiator:r}}=ie(),o=r.current.fields.allViolations,s=m(null),{shippingAddress:l}=r.parts,c=T(Mt(l.value.countryCode)),u=t(()=>Yy(o.value??[])),d=t(()=>function(e=[]){const t=e.filter(({code:e})=>Ro.has(e));if(1===t.length&&"MERCHANDISE_CART_UPDATED_BASED_ON_COUNTRY"===t[0].code)return t[0]}(o.value));a(()=>e.beforeNavigate(()=>{s.value=null}),[s,e]);const p=i(n.current.value);return P(()=>{const e=n.current.value;e!==p.current&&void 0!==p.current&&(s.value=null),p.current=e}),P(()=>{const e=d.value;e&&e!==s.peek()&&(s.value=e)}),t(()=>{const e=d.value??s.value,t=e?{...e,tone:"info"}:void 0;let n;return u.value||c.value.loading||(n=o.value?.find(e=>"MERCHANDISE_CART_AND_CURRENCY_UPDATED_BASED_ON_COUNTRY"===e.code)),{banner:t,toast:n}})}function xD(){const e=ED(),t=ph(),n=i(null),r=Lo(e=>{if(!e)return;const r=e.localizedMessage;if(r===n.current?.message)return;n.current?.hide();const a=t?.(r);a&&(n.current={...a,message:r})},250);return P(()=>{const t=e.value.toast;t&&o(()=>{r(t)})}),null}function ID(){const{shopPay:e,embed:t,mobileCheckoutSdk:n,checkout:{identity:r}}=ie(),a=e.app.config,i=Boolean(t?.isCheckoutKit()||t&&"shopPay"!==r.current.value)||n.enabled||Ei(a);return{isAppLayout:i,isWebLayout:!i}}class AD extends Error{constructor(){super(...arguments),this.name="BuyWithPrimeChangeLinkError"}}function TD(e){const{checkout:{negotiator:n}}=ie(),r=n.parts.paymentLines;return t(()=>function(e,t){const[n]=cn(e,[t]);if(!n?.method?.walletParams)return null;const{checkout_session_id:r}=n.method.walletParams;return r}(r.value,e))}function LD(){const{i18n:e}=ie(),{href:t,onClick:n}=GP();return d(Wf,{href:t,onClick:n,children:e.translate("account_management.checkout_as_guest_link")})}const ND=new Map([["AMOUNT_TOO_SMALL","amount_too_small"],["AUTHENTICATION_ERROR","three_d_secure_failed"],["AUTHENTICATION_REQUIRED","generic_error"],["AUTHORIZATION_ERROR","processing_error"],["CALL_ISSUER","call_issuer"],["CANCELED_PAYPAL_BILLING_AGREEMENT","processing_error"],["CANCELLED_PAYMENT","cancelled_payment"],["CARD_DECLINED","card_declined"],["EXPIRED_BUYER_ACTION","expired_buyer_action"],["EXPIRED_CARD","expired_card"],["FUNDING_ERROR","processing_error"],["INCORRECT_ADDRESS","cannot_verify"],["INCORRECT_CVC","cannot_verify"],["INCORRECT_NUMBER","cannot_verify"],["INCORRECT_PIN","cannot_verify"],["INCORRECT_ZIP","cannot_verify"],["INSUFFICIENT_FUNDS","insufficient_funds"],["INVALID_CURRENCY","processing_error"],["INVALID_CVC","invalid_cvc"],["INVALID_EXPIRY_DATE","invalid_expiry_date"],["INVALID_ITEM_TOTAL","processing_error"],["INVALID_NUMBER","invalid_number"],["INVALID_PAYMENT_METHOD","cannot_verify"],["INVALID_SHIPPING_ADDRESS","invalid_shipping_address"],["INVALID_TOKEN","processing_error"],["INVOICE_ALREADY_PAID","processing_error"],["MISSING_SHIPPING_ADDRESS","missing_shipping_address"],["NAME_MISMATCH","name_mismatch"],["PAYMENT_ABOVE_THRESHOLD","payment_above_threshold"],["PAYMENT_METHOD_EXPIRED","payment_method_expired"],["PICK_UP_CARD","pick_up_card"],["PUBLIC_PAYMENT_ERROR","generic_error"],["RISKY","risky"],["SHOP_PAY_DECLINED","processing_error_checkout_as_guest"],["SUCCESSFUL_OFFSITE_WITH_GIFT_CARD_ERROR","successful_offsite_with_gift_card_error"],["TEST_MODE_LIVE_CARD","test_mode_live_card"],["THIRD_PARTY_INTERNAL_ERROR","processing_error"],["TOKEN_EXPIRED","processing_error"],["TRANSIENT_ERROR","transient_error"],["UNILATERAL_AUTH_ERROR","processing_error"],["UNPROCESSABLE_TRANSACTION","processing_error"],["CAPTCHA_REQUIRED","captcha_required"],["DECISION_RULE_BLOCK","generic_error"],["CVV_ATTEMPTS_EXCEEDED","cvv_attempts_exceeded"],["CUSTOM_REDEEMABLE_NO_LONGER_AVAILABLE","custom_redeemable_no_longer_available"]]),RD=["
2SHOP_PAY_DECLINED"];function MD(e){const{i18n:t}=ie();let n="generic_error";return e&&(n=ND.get(e.code)||"generic_error"),t.translate("payment_errors",{scope:n,...e&&RD.includes(e.code)&&{checkout_as_guest_link:d(LD,{})}})}const DD=["AMOUNT_TOO_SMALL"];function OD(){const[e]=[{isBuyWithPrime:!0,checkoutSessionId:TD(wn.BuyWithPrime).value},{isBuyWithPrime:!1,checkoutSessionId:TD(wn.AmazonPay).value}].filter(({checkoutSessionId:e})=>Boolean(e)),{i18n:n,observability:r}=ie(),{error:a,hasError:i}=ev(Mo),o=a&&DD.includes(a),s=MD(o?{type:"payment",code:a}:void 0),{inMemoryAmazonPayParts:{hasPaymentSheetError:l,sdkStatus:c}}=gn(),u=t(()=>{const e=c.value;return e.status===jv.Available?e.sdk:void 0});if(!i||!e)return null;const{isBuyWithPrime:p,checkoutSessionId:m}=e;return d(x,{when:u,children:e=>d(bD,{tone:"critical",errorType:bP.PaymentError,children:d(sx,{children:o?s:d(y,{children:[n.translate("amazon_pay.error_page.payment_decline.message"),d(Wf,{onClick:()=>{try{p?e.buywithprime.changePaymentMethod({amazonPayOptions:{amazonCheckoutSessionId:m,isDeclined:!0}}):e.Pay.changePaymentMethod({amazonCheckoutSessionId:m,isDeclined:i})}catch(t){l.value=!0,r.error(new AD(`Error on changing buyer payment method. Details: ${t}`,{cause:t}))}},children:n.translate("amazon_pay.error_page.payment_decline.link")})]})})})})}const zD=new Map([["invalid_config","critical"],["config_missing_required_fields","critical"],["unusable_partial_address","critical"],["recovery_notice","critical"],[ka,"info"]]),BD=()=>{const e=m(!1),n=m(!1),r=hv(),{checkout:{negotiator:a}}=ie(),i=a.current.fields.allViolations,o=t(()=>i.value?.some(e=>Do.has(e.code))??!1);return P(()=>{o.value&&(n.value=!0),!o.value&&e.value&&(e.value=!1,n.value=!1)}),t(()=>{const t=n.value&&!e.value,a=r.value;return t&&a?{code:uv.PaymentMethodIncompatibleWithPaymentTerms,localizedMessage:a,tone:"info",onDismiss:()=>{e.value=!0}}:null})};function VD(){!function(){const{checkout:{negotiator:e}}=ie(),{shippingAddress:t}=e.parts,{inMemoryGooglePayParts:{paymentSheetError:n},inMemoryPayPalParts:{paymentSheetError:r}}=gn();a(()=>{let e=!0;return t.fields.countryCode.subscribe(()=>{e?e=!1:(n.value?.type===ka&&(n.value=void 0),r.value?.type===Pa&&(r.value=void 0))})},[t,n,r])}();const e=function(){const{i18n:e}=ie(),{paymentSheetError:n}=gn().inMemoryApplePayParts,r=e.translate("wallets.errors.generic",{walletName:e.translate("brand.apple_pay")}),a={unhandled_completion_status:e.translate("payment_errors.generic_error"),exceptional_completion_status:r,exceptional_negotiation_status:r,session_terminated:r,failed_to_create_session:r,shipping_options_changed:e.translate("wallets.errors.outdated.shipping_method"),unusable_partial_address:e.translate("wallets.errors.terminal",{walletName:e.translate("brand.apple_pay")}),new_tax_must_be_accepted:e.translate("payment_errors.order_total_changed"),payment_cancelled_while_processing:void 0,ineligible_discount:e.translate("wallets.errors.discount_code"),payment_terms_changed:e.translate("wallets.errors.outdated.payment_terms"),captcha_required:void 0,recovery_notice:e.translate("wallets.recovery_notice")};return t(()=>{const e=n.value?.type,t=n.value?.tone;if(e&&a[e])return{code:uv.PaymentSheetViolations,tone:t??"critical",localizedMessage:a[e],nonLocalizedMessage:a[e]}})}(),i=function(){const{i18n:e,checkout:{negotiator:n}}=ie(),{shippingAddress:r}=n.parts,{inMemoryGooglePayParts:{paymentSheetError:a}}=gn(),i=T(Mt(r.value.countryCode));return t(()=>{const t=a.value?.type,n=(()=>{if("invalid_config"===t||"config_missing_required_fields"===t)return e.translate("wallets.errors.generic",{walletName:e.translate("brand.google_pay")});if("unusable_partial_address"===t)return e.translate("wallets.errors.terminal",{walletName:e.translate("brand.google_pay")});if("unexpected_terminal_error"===t)return e.translate("wallets.errors.terminal",{walletName:e.translate("brand.google_pay")});if(t===ka){const t=i.value.details?.name;return t?e.translate("wallets.errors.unavailable.unavailable_for_c
2ountry",{walletName:e.translate("brand.google_pay"),countryName:t}):e.translate("wallets.errors.unavailable.description",{walletName:e.translate("brand.google_pay")})}return"recovery_notice"===t?e.translate("wallets.recovery_notice"):void 0})(),r=t?zD.get(t):"critical";if(n)return{code:uv.PaymentSheetViolations,tone:r,localizedMessage:n,nonLocalizedMessage:n,onDismiss:"info"===r?()=>a.value=void 0:void 0}})}(),o=T(function(){const{shop:e,i18n:t,checkout:{configuration:n,negotiator:a}}=ie(),{shippingAddress:i,paymentLines:o}=a.parts,s=i.value,{value:l}=a.current.fields.paymentMethods,{inMemoryPayPalParts:{paymentSheetError:c}}=gn(),{details:u,loading:d}=Mt(s.countryCode),{value:p}=a.current.fields.allViolations,m=Iy(s.countryCode),h=e.hasFlagEnabled(_a),g=r(()=>ba({paymentLines:o.value,isOnePage:n.layout.isOnePage.value})?p?.filter(VS)??[]:[],[p,o,n.layout.isOnePage.value]),f=r(()=>h&&function({violations:e,getAddressErrorsFromViolations:t}){const n=Array.from(e);return 1===n.length&&OS({missingAddressField:DS({addressErrors:t("shipping",n)}),violations:n})}({violations:g,getAddressErrorsFromViolations:m}),[g,m,h])?void 0:g[0],y=c.value?.type===ka,v=c.value?.type===Pa,_=r(()=>{const e=Sa(l,"PAYPAL_EXPRESS");if(y&&!e){const e=d?s.countryCode:u?.name;return e?t.translate("wallets.errors.unavailable.unavailable_for_c
2ountry",{walletName:t.translate("brand.paypal"),countryName:e}):t.translate("wallets.errors.unavailable.description",{walletName:t.translate("brand.paypal")})}},[u?.name,d,l,y,s.countryCode,t]);if(v){const e=t.translate("shipping_errors.unavailable_address_country");return{code:uv.PaymentSheetViolations,tone:"critical",localizedMessage:e,nonLocalizedMessage:e,onDismiss:()=>{c.value=void 0}}}return _?{code:uv.PaymentSheetViolations,tone:"info",localizedMessage:_,nonLocalizedMessage:_,onDismiss:()=>{c.value=void 0}}:f?{code:uv.PaymentSheetViolations,tone:"critical",localizedMessage:t.translate("wallets.recovery_notice"),nonLocalizedMessage:t.translate("wallets.recovery_notice")}:void 0}()),s=function(){const{receiptErrorSignal:e}=gn();return t(()=>{const t=e.value;if(t)return{code:uv.PaymentSheetViolations,tone:"critical",localizedMessage:t,nonLocalizedMessage:t}})}(),l=US(),c=FS({isPayWithPayPalButton:!1}),u=Pv(),d=T(function(){const{inMemoryApplePayParts:{paymentSheetError:e,subscriptionReviewTransition:t}}=gn(),{i18n:r,checkout:a,shop:i}=ie(),o=i.hasFlagEnabled(fn),s=a.configuration.layout.isOnePage.value,l=Hl({applePayThreePageVaultedReviewEnabled:o,isOnePageCheckout:s}),{queryParam:c,errorMessage:u,errorTitle:d,tone:p,shouldSuppressNotice:m}=Rv({applePayPaymentSheetError:e,applePaySubscriptionReviewTransition:t,isApplePaySubscriptionReviewLayoutSupported:l}),h=n(()=>({code:uv.PaymentSheetViolations,tone:"warning",localizedMessage:r.translate("wallets.errors.subscription_review_required")}),[r]);if(c&&!m)return c===yn?h():{code:uv.PaymentSheetViolations,localizedTitle:d,tone:p,localizedMessage:u}}()),p=BD();return t(()=>{const t="error"===c.value.status,n=Boolean(p.value),r=u.value||s.value||d.value||e.value||i.value||(n?null:o.value)||(t?null:l.value);if(r)return"string"==typeof r?{code:uv.PaymentSheetViolations,localizedMessage:r,nonLocalizedMessage:r,tone:"critical"}:r})}const FD=new Set([...new Set(["CART_METAFIELD_GENERIC_ERROR"]),...new Set(["CART_METAFIELD_DISALLOWED_ACCESS","CART_METAFIELD_INVALID_KEY_LENGTH","CART_METAFIELD_INVALID_NAMESPACE_LENGTH","CART_METAFIELD_INVALID_TYPE","CART_METAFIELD_INVALID_VALUE"])]),UD=["noAddressLocation","stockProblems","thankYou"],qD=new Set(["TIP_TIPS_NOT_ALLOWED_FOR_B2B"]),jD=new Set(["PAYMENTS_METHOD","PAYMENTS_TERMS_CHANGED"]),HD=[...Gn,...Oo,...zo,...mk,...Bo,...qD,...jD,...Vo,...Fo,...Uo,...qo,...jo,...dk,...Ho,...pa,...$o,...Kn,...nn,...ri,...Do,...Yo,...FD,"DELIVERY_WRONG_NUMBER_OF_DELIVERY_LINES","DELIVERY_DELIVERY_LINE_DETAIL_CHANGED","DELIVERY_ONLY_EMPTY_TERMS_ACCEPTED","DELIVERY_LOCAL_PICKUP_DELIVERY_LINE_DETAIL_CHANGED","DELIVERY_SELECTED_PICKUP_OPTION_NO_LONGER_AVAILABLE","LOCALIZATION_EXTENSION_FIELD_ERROR","MERCHANDISE_CART_UPDATED_BASED_ON_COUNTRY","MERCHANDISE_CART_AND_CURRENCY_UPDATED_BASED_ON_COUNTRY","MERCHANDISE_EXPECTED_PRICE_MISMATCH","MERCHANDISE_ONLY_EMPTY_TERMS_ACCEPTED","TAX_NEW_TAX_MUST_BE_ACCEPTED","TAX_TAX_INCLUSIVITY_MISMATCH","TIP_NOT_ACCEPTED_BY_SHOP","DISCOUNTS_CUSTOM_DISCOUNT_NOT_HONOURED","PAYMENTS_PAYMENT_FLEXIBILITY_TERMS_ID_MISMATCH","PAYMENTS_PAYPAL_OVER_CAPTURE_DETECTED","WAITING_PENDING_TERMS","ALTERNATIVE_PAYMENT_CURRENCY_UNACCEPTABLE_INPUT_ERROR","ALTERNATIVE_PAYMENT_CURRENCY_INPUT_PROVIDED_BUT_NOT_APPLICABLE_ERROR","REQUIRED_ARTIFACTS_UNAVAILABLE","NON_NEGOTIABLE_TERMS_MISSING_NON_NEGOTIABLE_TERMS","DISCOUNTS_DISCOUNT_TITLE_TOO_LONG"];function $D({children:e,id:t}){return d("li",{id:t,className:"_1585eob1 _1585eob0 _1fragemws _1fragemzh",children:e})}var YD={UnorderedList:"_70q41o2 _70q41o1 _1fragemqt _1fragemsm _1fragemp0 _1fragemuf _1fragem6t _1fragemws _1fragem11h",Wrapper:"_70q41o0",listStyleVariant:{disc:"_70q41o3",none:"_70q41o4"}};function WD({gap:e="base",listStyle:t="disc",accessibilityLabel:n,children:r,id:a}){const{className:i}=Um({gap:e}),o=v(YD.UnorderedList,t&&YD.listStyleVariant[t],i);return d("div",{className:YD.Wrapper,children:d("ul",{className:o,role:"none"===t?"list":void 0,"aria-label":n,id:a,children:r})})}function GD(){const{checkout:{negotiator:e}}=ie(),n=e.current.fields.buyerIdentity,r=Uc(),{shippingAddress:a}=e.parts;return t(()=>{const e=n.value?.purchasingCompany,t=!!e?.location.shippingAddress&&Wn(a.value,e.location.shippingAddress);return r.value&&!t})}function JD(){const{i18n:e,shop:n,checkout:r}=ie(),{allViolations:a,paymentLines:i,paymentMethods:o}=r.negotiator.current.fields,s=Uc(),l=r.configuration.layout.isOnePage.value,c=nc();return t(()=>{const{currentPage:t}=c.value,r=o.value?.some(e=>"deferred"===e.type)&&i.value?.lines?.some(e=>"deferred"===e.method.type);if(!(l&&r||!l&&!s.value||"payment"===t?.id))return null;const u=a.value?.filter(e=>No(e.code))||[];return 0===u.length?null:{violations:u,noticeType:uv.PaymentsViolations,noticeTitle:e.translate("notice_banner.violations_title",{violation:e.translate("notice_banner.individual_violations_title",{scope:uv.PaymentsViolations})}),noticeHeader:e.translate("notice_banner.all_violations_content",{emailLink:d("a",{href:`mailto:${n.contactEmail}`,children:e.translate("notice_banner.all_violations_email_link")})})}})}function KD(){const{client:e,router:t}=ie(),n=e.unstable_getSerialization("amazonQueryParams"),a=gn().inMemoryAmazonPayParts.serializedAmazonParams,i=a.value,{searchParams:o}=t.currentUrl.value;return r(()=>{const e=function(){if(o&&"function"==typeof o.entries){const e=o.entries();if(e&&"function"==typeof e[Symbol.iterator])return Object.fromEntries(e)}return{}}();let t=i;null===i&&n&&(a.value=n,t=n);const r={...t,...e};return Object.fromEntries(Wo.map(e=>[e,r[e]]))},[o,i,n,a])}function QD(){const{router:e}=ie();return{searchParams:KD(),isThankYouPage:e.currentUrlMatches("/thank-you")}}function XD(){const{checkout:{negotiator:e}}=ie(),{paymentMethods:n}=e.current.fields,{paymentLines:r}=e.parts,{searchParams:a,isThankYouPage:o}=QD(),s=T(a),l=T(o),c=i(!1),u=i(!1);return t(()=>
2{const e=s.value,t=r.value,a=n.value,i=e.wallet===wn.BuyWithPrime&&!e.amazon_cancelled,[o]=cn(t,[wn.BuyWithPrime]),d=Boolean(o);return i&&(c.current=!0),d&&(u.current=!0),!u.current||d||i||(c.current=!1,u.current=!1),Go({paymentLines:t,paymentMethods:a,urlParams:{wallet:c.current?wn.BuyWithPrime:null,amazon_cancelled:null},isThankYouPage:l.value})})}function ZD(){const{checkout:e}=ie(),{paymentLines:n}=e.negotiator.parts,r="shopPay"===e.identity.current.value;return t(()=>Jo({paymentLines:n.value,isOnePage:e.configuration.layout.isOnePage.value,isShopPayActive:r}))}function eO(){const e=function(){const{i18n:e,url:n,checkout:{negotiator:r}}=ie(),a=r.current.fields.allViolations;return t(()=>{const t=a.value?.filter(e=>Vo.has(e.code))??[];if(!t.length)return null;const r=d(y,{children:e.translate("notice_banner.return_to_cart_to_update_quantities",{return_to_cart_link_text:d(Wf,{tone:"monochrome",href:n.cart(),children:e.translate("notice_banner.return_to_cart_link_text")})})});return 1===t.length?{code:t[0].code,localizedTitle:t[0].localizedMessage||t[0].nonLocalizedMessage,localizedMessage:r,collapsible:!1,tone:"critical"}:{code:uv.MerchandiseQuantityRulesNotMet,localizedTitle:e.translate("general.errors.merchandise.quantity_rules_not_met"),localizedMessage:r,collapsible:!1,tone:"critical"}})}(),a=VD(),o=function(){const{checkout:e,i18n:t}=ie(),{configuration:n}=e,a=e.latestReceipt.value,{lastJourneyProgression:i}=e.negotiator,o=n.layout.isOnePage.value,s=XD(),l=r(()=>"failed"===a?.status&&"payment"===a.failure?.type&&"PRE_CHARGE_ERROR"===a?.failure.code&&"success"!==i.value.type,[i.value,a])&&(o||s.value),{inMemoryAmazonPayParts:{buyerDetails:c}}=gn(),u=l||c.value.error,d=r(()=>l?uv.PaymentsViolations:uv.OtherViolations,[l]);return u?{code:d,localizedMessage:t.translate("wallets.errors.generic",{walletName:t.translate("brand.amazon_pay")}),tone:"critical"}:null}(),l=function(){const{i18n:e,checkout:{negotiator:n}}=ie(),r=n.current.fields.merchandiseLines;return t(()=>r.value?.sellingPlanMismatch?{code:uv.SellingPlanDigest,localizedMessage:e.translate("notice_banner.subscription_changed"),status:"warning"}:void 0)}(),c=ED().value.banner,u=function(){const{i18n:e,checkout:{negotiator:n}}=ie(),{taxes:r,merchandiseLines:a}=n.current.fields,o=i("unset"),s=i(),l=nc();return t(()=>{const t=r.value,n=a.value?.priceMismatch,i="information"===l.value.currentPage?.id,c="pending"===t?.status?void 0:t?.status;return"unset"===o.current&&c&&(o.current=c),n&&"unset"!==o.current&&c&&o.current!==c?(s.current={code:uv.TaxExemption,localizedMessage:e.translate("change_country.cart_updated_based_on_country")},o.current=c):n&&!i||(s.current=void 0),s.current})}(),p=function(){const{checkout:{negotiator:e,configuration:n}}=ie(),a=e.current.fields.buyerIdentity.value?.purchasingCompany,i=!n.layout.isOnePage.value,o=function(){const{i18n:e,shop:n,checkout:{negotiator:r}}=ie(),a=r.current.fields.allViolations;return t(()=>0===(a.value?.filter(e=>ri.has(e.code))||[]).length?null:{code:uv.ContactInformationViolations,localizedTitle:e.translate("notice_banner.contact_information.title"),tone:"critical",localizedMessage:e.translate("notice_banner.contact_information.header",{emailLink:d(Wf,{href:`mailto:${n.contactEmail}`,children:e.translate("notice_banner.contact_information.email_link")})})})}().value,l=function(){const{i18n:e,router:t}=ie(),n=t.currentUrl.value,[a,i]=s(void 0),o="true"===n.searchParams.get("company_location_changed");return r(()=>!0!==a&&o?(i(!1),{code:uv.CompanyLocationChanged,localizedMessage:e.translate("notice_banner.company_location_changed"),onDismiss:()=>i(!0)}):null,[a,e,o])}(),c=function(){const{i18n:e,shop:t,checkout:n}=ie(),[r,a]=s(!1),i=ib(),o=Uc(),l=n.configuration.layout.isOnePage.value;return r||!i.value||o.value||l||!n.isShippingRequired.value?null:{code:uv.ShippingAddressIsMissing,localizedTitle:e.translate("thank_you.missing_shipping_address_banner.title"),localizedMessage:d(dA,{children:e.translate("thank_you.missing_shipping_address_banner.text_html",{contact_us:d(Wf,{href:`mailto:${t.contactEmail}`,children:e.translate("thank_you.missing_shipping_address_banner.contact_us")})})}),status:"info",onDismiss:()=>a(!0)}}(),u=function(){const{i18n:e,shop:n,checkout:r}=ie(),a=Uc(),i=GD(),o=_S(),s=r.configuration.layout.isOnePage;return t(()=>{const{deliveryAddressErrors:t}=o.value,[r]=t;if(s.value||i.value||!r)return null;const l=a.value?d(Vf,{children:e.translate("notice_banner.delivery_address_validation_errors_banner.use_different_address")}):d(Vf,{children:e.translate("notice_banner.delivery_address_validation_errors_banner.text_html",{contact_us:d(Wf,{href:`mailto:${n.contactEmail}`,tone:"monochrome",children:e.translate("notice_banner.delivery_address_validation_errors_banner.contact_us")})})}),c=1===t.length;return{code:uv.DeliveryAddressValidationErrors,tone:"critical",localizedTitle:c?r.message:e.translate("notice_banner.delivery_address_validation_errors_banner.title"),localizedMessage:c?l:d(y,{children:[d(WD,{children:t.map(e=>d($D,{children:d(Vf,{children:e.messageNode??e.message})},`${e.target}${e.message}`))}),l]})}})}().value,p=(()=>{const e=m(!1),{checkout:{negotiator:n}}=ie(),{allViolations:r}=n.current.fields;return t(()=>{const t=r.value?.filter(e=>qD.has(e.code))||[],n=t.length>0?t[0]:null;return e.value||!n?null:{code:uv.TipsViolations,localizedMessage:n.localizedMessage||n.nonLocalizedMessage,status:"warning",onDismiss:()=>e.value=!0}})})().value,h=lD().value,g=(()=>{const{i18n:e,checkout:{negotiator:n}}=ie(),r=n.current.fields.allViolations;return t(()=>0===(r.value?.filter(e=>jD.has(e.code))||[]).length?null:{code:uv.PaymentsViolations,localizedMessage:e.translate("payment_errors.available_methods_updated")})})().value,f=JD().value,v=function(){const{i18n:e,shop:n,checkout:r}=ie(),{allViolations:a}=r.negotiator.current.fields,i=Uc(),{paymentLines:o}=r.negotiator.parts;return t(()=>{if(Boolean(Nt(o.value,"APPLE_PAY"))&&!r.isShippingRequired.value)return null;if(i.value)return null;const t=a.value?.filter(e=>Gn.has(e.code))||[];return 0===t.length?null:{violations:t,noticeType:uv.DeliveryViolations,noticeTitle:e.translate("notice_banner.violations_title",{violation:e.translate("notice_banner.individual_violations_title",{scope:uv.DeliveryViolations})}),noticeHeader:e.translate("notice_banner.all_violations_content",{emailLink:d("a",{href:`mailto:${n.contactEmail}`,children:e.translate("notice_banner.all_violations_email_link")})})}})}().value,_=function(){const{i18n:e,shop:n,observability:r,checkout:{negotiator:a}}=ie(),{buyerIdentity:i,allViolations:o}=a.current.fields;return t(()=>{if(!i.value?.purchasingCompany)return null;const t=(o.value||[]).filter(e=>!HD.includes(e.code));for(const e of t)r.counter({name:"b2b_unhandled_violations",value:1,attributes:{violation:e.code}});return 0===t.length?null:{violations:t,noticeType:uv.OtherViolations,noticeTitle:e.translate("notice_banner.violations_title",{violation:e.translate("notice_banner.individual_violations_title",{scope:uv.OtherViolations})}),noticeHeader:e.translate("notice_banner.all_violations_content",{emailLink:d("a",{href:`mailto:${n.contactEmail}`,children:e.translate("notice_banner.all_violations_email_link")})})}})}().value,{currentDetour:b}=nc().value,k=b?.type&&UD.includes(b.type),{shippingAddress:P}=e.parts;if(!a||k)return[];const S=P.peek(),w=a?.location.shippingAddress||{},C=Wn(S,w);return[...f?[sD(f)]:[],...v?[sD(v)]:[],..._?[sD(_)]:[],...o?[o]:[],...l?[l]:[],...c?[c]:[],...u?[u]:[],...p?[p]:[],...h&&i&&C?[h]:[],...g&&i?[g]:[]]}(),h=function(){const{checkout:{negotiator:e}}=ie(),{allViolations:a}=e.current.fields,{lastJourneyProgression:i}=e,o=function(){const{client:e,i18n:t}=ie(),a=e.unstable_getSerialization("logoutUrl")||"",i=r(()=>function(e,t){return{PAYMENTS_WALLET_PAYPAL_EXPRESS_ADDRESS_INVALID:e.translate("wallets.errors.terminal",{walletName:e.translate("brand.paypal")}),PROPOSAL_SESSION_IDENTIFIER_NOT_UNIQUE:e.translate("session_errors.session_not_unique"),PROPOSAL_SESSION_ALREADY_FINISHED:e.translate("session_errors.session_already_finished"),DISCOUNTS_CURRENTLY_INACTIVE:e.translate("discount_errors.generic_error"),DISCOUNTS_NO_ENTITLED_LINE_ITEMS:e.translate("discount_errors.generic_error"),DISCOUNTS_USAG
2E_LIMIT_REACHED:e.translate("discount_errors.generic_error"),DISCOUNTS_CUSTOMER_NOT_ELIGIBLE:e.translate("discount_errors.generic_error"),DISCOUNTS_CUSTOMER_USAGE_LIMIT_REACHED:e.translate("discount_errors.generic_error"),BUYER_IDENTITY_COMPANY_PURCHASE_PERMISSION_REQUIRED:e.translate("b2b_errors.lost_b2b_purchasing_permissions",{logout_url:d(Wf,{href:t,children:e.translate("b2b_errors.log_out_link_text")})}),BUYER_IDENTITY_LOST_ACCESS_TO_COMPANY:e.translate("b2b_errors.lost_b2b_purchasing_permissions",{logout_url:d(Wf,{href:t,children:e.translate("b2b_errors.log_out_link_text")})}),ARTIFACT_DISSATISFACTION:e.translate("artifact_errors.artifact_dissatisfaction_without_violation"),BUYER_IDENTITY_PRESENTMENT_CURRENCY_DOES_NOT_MATCH:e.translate("general.errors.buyer_identity.buyer_identity_presentment_currency_does_not_match"),[ts]:e.translate("remote.errors.currency_mismatch_removal")}}(t,a),[t,a]);return n((e,t)=>{const n=i[e.code];return{...e,localizedMessageHtml:n??e.localizedMessageHtml,localizedMessage:n??e.localizedMessage,tone:t}},[i])}(),s=ZD();return t(()=>{const t=e.current.fields.paymentLines?.value?.lines,n=Boolean(Nt(t,"APPLE_PAY")),r=("success"===i.value.type||"error"===i.value.type)&&"completion"===i.value.negotiationStage,l=[],c=[];for(const e of a.value||[])"ConfirmChangeViolation"!==e.__typename&&"UnprocessableTermViolation"!==e.__typename&&"RemoveTermViolation"!==e.__typename&&"ArtifactDissatisfactionViolation"!==e.__typename||(Ko.has(e.code)&&l.push(o(e,"info")),Qo.has(e.code)&&c.push(o(e,"warning")),Xo.has(e.code)&&r&&l.push(o(e,"critical")),Zo.has(e.code)&&l.push(o(e,"critical")),n&&!s.value&&es.has(e.code)&&l.push(o(e,"critical")));const u=l.length>=1?l.map(e=>e.priority??0).reduce((e,t)=>e>t?e:t):0,d=l.length>=1?l.filter(e=>(e.priority??0)>=u):l;return c.concat(d)})}().value,g=function(){const{source:e,checkout:{negotiator:n}}=ie(),{paymentLines:r,buyerIdentity:a}=n.current.fields,i=JD(),o="draftOrder"===e.type;return t(()=>o&&!a.value?.purchasingCompany&&r.value?.lines?.some(e=>"deferred"===e.method.type)?i.value:null)}(),f=function(){const{i18n:e,checkout:{negotiator:n}}=ie(),r=n.current.fields.allViolations,a=nc(),i=m(void 0);return ac(e=>{"complete"!==e.type&&"invalid"!==e.type&&"failed"!==e.type&&(i.value=e.negotiationStage)}),t(()=>{const t=r.value?.filter(({code:e})=>"DELIVERY_DELIVERY_LINE_DETAIL_CHANGED"===e);if(!t?.length)return;const n="payment"===a.value.currentPage?.id;return"completion"===i.value||"negotiation"===i.value&&n?{...t[0],tone:"critical",localizedMessage:e.translate("payment.shipping_rate_updated"),localizedMessageHtml:e.translate("payment.shipping_rate_updated"),priority:1}:void 0})}(),{checkout:{configuration:v,negotiator:_}}=ie(),b=v.layout.isOnePage.value,{allViolations:k}=_.current.fields,P=t(()=>Yy(k.value??[])),S=BD();return[...h,...g.value?[sD(g.value)]:[],...u.value?[u.value]:[],...l.value?[l.value]:[],...e.value?[e.value]:[],...a.value?[a.value]:[],...o?[o]:[],...p,...c&&!P.value?[c]:[],...S.value?[S.value]:[],...f.value&&!b?[f.value]:[]].filter(ns("localizedMessage"))}function tO(e,t){const n=e.peek()||{};Object.entries(t).some(([e,t])=>n[e]!==t)&&(e.value={...n,...t})}function nO(){const e=TD(wn.AmazonPay),t=TD(wn.BuyWithPrime),{hasError:r}=ev(Mo),{checkout:a}=ie(),i=a.latestReceipt.value,o=i?.id,{persistedAmazonSignal:s}=gn();return{hasError:Boolean(r&&(e.value||t.value))&&o!==s.value?.receiptIdForPaymentDecline,clearError:n(()=>tO(s,{receiptIdForPaymentDecline:o}),[s,o])}}function rO(){const{checkout:e}=ie(),t=e.latestReceipt.value,{persistedApplePaySignal:i,inMemoryApplePayParts:{paymentSheetError:o}}=gn(),s=m(!1),l=m(!1),c=i.value,u=ZD(),d=n(()=>{s.value=!0,l.value=!1},[s,l]),p=s.value,h=l.value;ac(e=>{if("error"===e.type&&"completion"===e.negotiationStage){const t=e.violations.some(e=>"PAYMENTS_APPLE_PAY_SESSION_EXPIRED"===e.code);l.value=t}});const g=r(()=>!(!u.value||!h&&(!t||p||"failed"!==t.status||"payment"!==t.failure.type||c?.receiptIdForPaymentFailure!==t.id)),[t,u.value,c,p,h]);return a(()=>{g&&(o.value=void 0)},[g,o]),{hasError:g,clearError:d}}function aO(e,t,n,r){if("failed"!==e?.status)return!1;const a="draftOrder"===n&&"payment"===e.failure.type&&!0!==e.failure.hasOffsitePaymentMethod&&r===e.id;return t===e.id||a}function iO(){const[e,t]=Wg(Ct.LastSeenErrorReceiptId),n=Tt(),{checkout:r,client:i,source:o}=ie(),l=r.latestReceipt.value,c=i.unstable_getSerialization("receipt")?.latestReceipt,u="FailedReceipt"===c?.__typename?c.id:void 0,[d,p]=s(()=>!n.peek()||aO(l,e,o.type,u));return a(()=>{const n=aO(l,e,o.type,u);p(n),"failed"===l?.status&&e!==l.id&&t(l.id),"failed"!==l?.status&&t(void 0)},[l?.id,l?.status]),d}function oO(e){return e.some(({code:e})=>fk.has(e))}function sO(e,t){if(!e)return null;const n="code"in t?t.code:void 0,r="ids"in t?t.ids:void 0,a=e.filter(e=>n?!cO(e,n):!r||!r.includes(e.id));return a.length>0?a:null}const lO=(e,t)=>e.toUpperCase()===t.toUpperCase(),cO=({discountLine:e},t)=>Boolean(t&&lO(e.discount.title,t));function uO({inputRef:e,headingId:t,monorailSection:l}={}){const{checkout:c,i18n:u,userEvents:d,shop:p,shopPay:h,source:g}=ie(),{discountCodeWarningSignal:f,reductionsErrorsSignal:y,reductionsValueSignal:v,derivedErrorMessageSignal:_,refreshNegotiationSignal:b,currentDiscountCodeAttemptSignal:k}=c.negotiator.context,{negotiate:S}=rc(),w=m(v.peek()),[C,E]=s(v.peek().length>0),x=f.value,{discountLines:I,paymentLines:A,reduction:T}=c.negotiator.parts,L=c.negotiator,N=as(p),R="shopPay"===c.identity.current.value,M=I.value,[D,O]=s([]),z=function(){const{i18n:e,checkout:{negotiator:t}}=ie(),{voidedGiftCardsSignal:a}=t.context,i=a.peek(),o=r(()=>new Set([...dk,"REDUCTION_GIFT_CARD_ALREADY_APPLIED"]),[]),s=r(()=>({REDUCTION_GIFT_CARD_ALREADY_APPLIED:()=>e.translate("field_errors.gift_card_already_applied"),PAYMENTS_GIFT_CARD_DISABLED:()=>
2e.translate("field_errors.gift_card_invalid",{last_four_characters:(i[0]??"").slice(-4).toUpperCase()})}),[i,e]);return n(e=>e.reduce((e,t)=>o.has(t.code)?(e.push(s[t.code]()),e):e,[]),[s,o])}(),B=bf(),{currentPage:V}=nc().value,F=vn("discountLines").value,U=i(0),[q,j]=s(!1),H=r(()=>M?.reduce((e,t)=>(t.message&&!D.includes(t.discount.title)&&e.push({id:yl(),discountCode:t.discount.title,message:t.message??"",discountLine:t,tone:"info"}),e),[]),[M,D]);a(()=>{F&&(U.current+=1)},[F,U]),a(()=>{F||j(!1)},[F]),a(()=>{ee(q&&F)},[x,F,U,q]);const $=i(V?.id);a(()=>{$.current!==V?.id&&($.current=V?.id,y.value=[])},[V?.id]);const Y=n(e=>{const t=f.value??[];f.value=sO(t,{ids:e}),B()},[B,f]),W=n(e=>{const t=H.filter(({id:t})=>e.includes(t)).map(({discountCode:e})=>e);O(e=>[...e,...t]),B()},[H,B]),G=n(e=>{v.value=e,e&&(w.value=e)},[v,w]),J=n(({clearWarnings:e=!0,preserveValue:t=!1}={})=>{t||(G(""),E(!1),k.value=null),e&&(f.value=null)},[k,f,G]),K=n(()=>{t&&document.getElementById(t)?.focus()},[t]),Q=n(e=>{G(e?.trim()),y.value.length>0&&(y.value=[])},[G,y]),X=n(()=>{y.value.length>0&&(y.value=[])},[y]),[Z,ee]=s(!1),te=n((e,t)=>{const n=[],r=[],a=f.value??[],i=k.value;for(const o of e){const e=ol===o.code;switch(o.type){case"InputValidationError":case"UnprocessableTermViolation":if(pk.has(o.code)){n.push(o);break}"negotiation"!==t&&dk.has(o.code)&&n.push(o);break;case"RemoveTermViolation":case"ConfirmChangeViolation":{const a="ConfirmChangeViolation"===o.type,s=Rl(o.targetEntity),l=Boolean(i&&s&&lO(s.title,i));if(sl.has(o.code)&&"completion"!==t&&!l)break;if(pk.has(o.code)){n.push(o);break}if("discountCodeTrigger"!==s?.discount.type||!rl.has(o.code))break;const c=gk.has(o.code),u={message:o.localizedMessage??o.nonLocalizedMessage,messageHtml:o.localizedMessageHtml,discountLine:s,tone:c?"info":"warning",discountCode:s.discount.title,id:yl(),errorCode:o.code,isConfirmChangeViolation:a};if(e){r.push(u);break}i&&!l||r.push(u);break}}}return y.value=n.slice(-1),i||r.unshift(...a.filter(e=>e.errorCode===ol)),f.value=r.length>0?r:null,{hasWarnings:r.length>0,hasPreserveInputErrors:e.some(e=>pk.has(e.code))}},[k,f,y]),ne=n(async()=>{await S({silenceViolations:[...nr],onComplete:e=>{c.unstable_overwriteLatestReceipt(void 0),b.value=!1,"success"!==e.status&&"error"!==e.status||te(e.errors)}})},[te,S,c,b]);P(()=>{const e=c.latestReceipt.value;!b.peek()&&e&&Oy(e)&&"discount"===e.failure?.type&&(b.value=!0,o(()=>{ne()}))}),ac(n(e=>{"errors"in e&&te(e.errors,e.negotiationStage)},[te])),P(()=>{const e=L.lastJourneyProgression.value;"error"===e.type&&"completion"===e.negotiationStage&&o(()=>te(e.errors,"completion"))}),is(({parts:e,reason:t})=>{const n=f.peek()??[],r=k.peek(),a=r&&n.every(e=>!cO(e,r));if(0===n.length)return{behavior:"allow"};if("completion"===t||a)return f.value=null,{behavior:"allow"};if("progression"!==t&&"negotiation"!==t)return{behavior:"allow"};const i=e.discountLines.peek(),o=((e,t,n)=>{const r=t.reduce((t,r)=>{if(r.errorCode===ol||((e,t)=>t.some(t=>("discountCodeTrigger"===t.discount.type||"code"===t.discount.type)&&cO(e,t.discount.title)))(r,e))return t;const a=cO(r,n);return!n||a?t.set(r.discountCode.toUpperCase(),r):t},new Map);return[...r.values()]})(i,n,r);return o.length>0&&(e.discountLines.value=[...i,...o.map(({discountLine:e})=>e)]),{behavior:"allow"}});const re=n(e=>(e||A.value).filter(e=>"giftCard"===e.method.type&&"code"in e.method).map(e=>e.method.code),[A]),ae=n(()=>I.value.filter(e=>"code"===e.discount.type).map(e=>e.discount.title),[I]),oe=n(async()=>{j(!0);const t=v.value,n=JSON.parse(JSON.stringify(A.value));k.value=t,e?.current?.blur(),K();const r=ae(),a=new Set(I.value.filter(e=>"code"===e.discount.type&&e.discount.codeHidden).map(e=>e.discount.title));await S({silenceViolations:Fe(["deliveryNext"]),fieldsToResolve:[...uk],loading:["deliveryNext","discountLines"],customizeNegotiation:e=>({...e,reduction:{code:t}}),onComplete:e=>{if("success"===e.status||"error"===e.status){const{hasWarnings:i,hasPreserveInputErrors:o}=te(e.errors);J({clearWarnings:!i,preserveValue:o});const s=oO(e.errors);if(s&&e.errors.some(e=>gk.has(e.code))){const e=ae(),n=r.filter(t=>!e.includes(t));n.length>0&&(1===n.length&&a.has(n[0])?(ju({content:u.translate("order_summary.discount_has_been_removed")}),ju({content:u.translate("order_summary.discount_code_applied_with_code",{code:t})})):ju({content:n.length>1?u.translate("order_summary.discount_code_replaced_multiple",{code:t}):u.translate("order_summary.discount_code_replaced",{old_code:n[0],code:t})}))}const m=e.negotiated.paymentLines?.lines||[],h=re(n),f=re(m),y=h.reduce((e,t)=>
2(e[t]=!0,e),{}),v=f.some(e=>void 0===y[e]),_=n.reduce((e,t)=>("giftCard"===t.method.type&&null!=t.cost&&t.cost.amount>0&&(e[bo(t.method)]=!0),e),{}),b=N&&m.some(e=>"giftCard"===e.method.type&&null!=e.cost&&e.cost.amount>0&&void 0===_[bo(e.method)]);if(!s){if(N&&(v||b)){const e=A.peek();A.value=[...e.filter(e=>!os(e)),...m.filter(os)]}const{runningTotal:r,merchandiseLines:a}=e.negotiated,i=r&&r.amount<=0;Boolean(!i||ss(a?.lines))||n.some(e=>"walletsPlatformPaymentMethod"===e.method.type&&e.method.name===wn.BuyWithPrime)||function(e,t){const n=rs(t);e.value=n}(A,N&&(v||b)?m:n);const o=u.translate("order_summary.discount_code_applied_with_code",{code:t});ju({content:v||b?u.translate("order_summary.gift_card_applied"):o}),G(""),E(!1)}const k=e.errors.find(e=>fk.has(e.code)),P=()=>{if(!s)return v?"gift_card":"discount_code"};d.monorailEvent({schemaId:"checkout_reduction_attempted/2.0",payload:{shopId:parseInt(le(p.id),10),checkoutToken:g.checkoutSessionIdentifier??"checkout_identifier_undefined",event:s?"apply_reduction_failure":"apply_reduction_success",reductionType:P(),errorMessage:k?.nonLocalizedMessage,page:"checkout",section:l}}),R&&(s?d.monorailEvent({schemaId:"shopify_pay_payment_page_ui_interaction/1.2",payload:{...ra(g,c,p),action:"add_discount_failure"}}):d.monorailEvent({schemaId:"shopify_pay_payment_page_ui_interaction/1.2",payload:{...ra(g,c,p),action:v?"add_gift_card":"add_discount_success"}}))}},force:!0}),B()},[J,k,B,K,re,te,e,R,S,I,A,G,u,v,d,g,c,p,N,l,ae]),se=n(async e=>{const t=I.value,n=ae(),r=t.some(t=>"code"===t.discount.type&&t.discount.title===e&&t.discount.codeHidden);if(1===t.length&&K(),Bi(h)){const t=h.discountCodes.value.filter(t=>t!==e);h.updateDiscountCodes(t)}I.value=t.filter(t=>"code"!==t.discount.type||t.discount.title!==e),f.value=sO(f.value,{code:e}),O(t=>t.filter(t=>t!==e));const a=T.value;a?.code===e&&(T.value=void 0),R&&d.monorailEvent({schemaId:"shopify_pay_payment_page_ui_interaction/1.2",payload:{...ra(g,c,p),action:"remove_discount"}}),await S({silenceViolations:Fe(["deliveryNext"]),fieldsToResolve:[...uk],loading:["discountLines","deliveryNext"],force:!0,onComplete:t=>{"success"!==t.status&&"error"!==t.status||te(t.errors),ju({content:r?u.translate("order_summary.discount_has_been_removed"):u.translate("order_summary.discount_code_removed",{code:e}),role:"status"});const a=ae().filter(e=>!n.includes(e));a.length>0&&ju({content:I.value.some(e=>"code"===e.discount.type&&e.discount.title===a[0]&&e.discount.codeHidden)?u.translate("order_summary.discount_has_been_applied"):u.translate("order_summary.discount_code_applied_with_code",{code:a[0]}),role:"status"})}}),B()},[h,I,T,R,S,B,K,d,g,c,p,te,f,ae,u]),ce=n(async e=>{const t=A.value;A.value=t.filter(t=>"giftCard"!==t.method.type||!("code"in t.method)||t.method.code!==e),1===A.value.length&&K(),R&&d.monorailEvent({schemaId:"shopify_pay_payment_page_ui_interaction/1.2",payload:{...ra(g,c,p),action:"remove_gift_card"}}),await S({silenceViolations:Fe(["paymentLines"])}),B()},[A,R,S,B,d,g,c,p,K]),ue=v.value,de=y.value,pe=r(()=>({value:ue,valueSignal:w,onChange:Q,onInput:X,error:ls(de),errorSignal:_}),[_,w,Q,X,de,ue]),me=r(()=>z(de),[z,de]);return{loading:Z,handleSubmit:oe,handleNegotiationErrors:te,dirty:C,setDirty:E,removeDiscount:se,getGiftCards:re,removeGiftCard:ce,reductionCodeField:pe,discountCodeWarning:x,discountMessages:H,removeDiscountCodeWarnings:Y,removeDiscountCodeMessage:W,giftCardBannerErrors:me}}function dO(){const{negotiate:e}=rc(),{inMemoryApplePayParts:{asPaymentMethod:t}}=gn(),{checkout:{wallets:r,negotiator:a}}=ie(),{email:i,phone:o,billingAddress:s,paymentLines:l}=a.parts,{value:c}=a.current.fields.buyerIdentity,u=Boolean("CustomerProfile"===c?.customerProfile?.__typename),d=c?.purchasingCompany,p=Cv(),m=ok(),h=cs({availableDeliveryAddresses:a.current.fields.availableDeliveryAddresses?.value,mustSelectProvidedAddress:a.current.fields.mustSelectProvidedAddress?.value}),g=n(()=>{const e={shouldResetBuyerInfo:!1,shouldRemoveWalletContent:!1,shouldRemoveBillingAddress:!1,forceClearLocalPickupFields:!1},n=t.value;return r.activeSession.value?{...e}:u?{...e,shouldRemoveWalletContent:n,shouldResetBuyerInfo:!n,shouldRemoveBillingAddress:!0}:n?{...e,shouldRemoveWalletContent:!0,shouldRemoveBillingAddress:!d}:p.value?{...e,shouldRemoveBillingAddress:!0,forceClearLocalPickupFields:!0}:{...e,shouldResetBuyerInfo:!0}},[r,u,t,p,d]),f=EP(),y=CP();return n(async({shouldPersist:n=!0}={})=>{const{shouldResetBuyerInfo:a,shouldRemoveWalletContent:c,shouldRemoveBillingAddress:u,forceClearLocalPickupFields:d}=g();c&&(l.value=Cn(l.value,{method:{type:"wallet",name:"APPLE_PAY"}})),y.value||f({shouldResetCustomerInfo:a,shouldRemovePaymentLine:!t.value,isConstrainedAddress:h}),d&&(i.value="",o.value=""),u&&(s.value=m("billing")??$l(s.value)),n&&!r.activeSession.value&&await e({silenceViolations:["non-stock"]})},[f,r,l,i,o,s,e,g,t,y,m,h])}
2function pO({shouldPersist:e}){const t=dO(),{walletUsedForSubmissionSignal:r,persistedApplePaySignal:a,inMemoryApplePayParts:{paymentSheetError:i,subscriptionReviewTransition:o}}=gn();return n(()=>{i.value=void 0,o.value=void 0,r.value=void 0,a.value={},t({shouldPersist:e})},[i,o,r,a,t,e])}function mO(){const e=pO({shouldPersist:!1}),{clearError:t,hasError:r}=rO(),{checkout:a,router:i}=ie(),{clearForcedCheckoutLayout:o}=bv(fn);return xP({onClick:n(()=>{e(),o({wallet:"APPLE_PAY"}),a.unstable_evaluateSupportsSplitShipping(i.currentUrl.value),r&&t()},[e,a,o,i,t,r]),shouldResetCustomerInfo:!1,shouldRemovePaymentLine:!1,skipRedirect:!0})}function hO(){const{i18n:e}=ie(),{onClick:t}=mO(),n=e.translate("wallets.errors.processing_error_checkout_as_guest",{checkout_as_guest_link:d(Wf,{onClick:t,children:e.translate("account_management.checkout_as_guest_link")})});return d(bD,{errorType:bP.PaymentError,tone:"critical",children:d(Jf,{alignItems:"start",gap:"small-500",children:d(sx,{children:n})})})}function gO(){const{inMemoryAmazonPayParts:{buyerDetails:e,buyerDetailsContentLoaded:n}}=gn(),r=vn("shippingAddress");return t(()=>n.value&&!e.value.loading&&!r.value)}function fO(e){const t=gO(),{violations:n}=Ky(e),r=n.value;if(0===r.size||!t.value)return null;const a=new Set;for(const i of r)a.add(i.localizedMessage??i.nonLocalizedMessage);return Array.from(a)}function yO({ignorePrefixes:e}={ignorePrefixes:[]}){const{i18n:t}=ie(),n=fO(new Set([...us].filter(t=>e.every(e=>!t.startsWith(e))))),r=fO(new Set([...Gn,...jo].filter(t=>e.every(e=>!t.startsWith(e)))));return n?{errors:[t.translate("shipping_errors.shipping_method_not_available_generic.one")],type:"no delivery strategy"}:r?{errors:r,type:"invalid address"}:{errors:null,type:null}}function vO(){return yO({ignorePrefixes:["DELIVERY_PHONE_NUMBER","DELIVERY_COMPANY"]}).errors??[]}function _O(){const{i18n:e}=ie(),t=vO();return t?.length?d(bD,{tone:"critical",errorType:bP.PaymentError,children:[e.translate("wallets.errors.select_different_shipping_address_to_resolve_errors"),d(WD,{children:t.map(e=>d($D,{children:d(Vf,{children:e})},e))})]},"amazon-pay-errors"):null}function bO(){const e=XD(),n=T(vO()),{persistedAmazonSignal:r,inMemoryAmazonPayParts:{hasPaymentSheetError:a}}=gn();return t(()=>{const t=r.value;return t?.primeError||e.value?t?.primeError?"terminal error":a.value?"payment sheet error":n.value?.length?"amazon pay error messages":null:null})}function kO(){const e=bO();return e.value?d(PO,{errorMessagesType:e.value}):null}function PO({errorMessagesType:e}){const{i18n:t,checkout:n}=ie(),r=n.configuration.layout.isOnePage.value,{value:i}=n.negotiator.current.fields.paymentLines,{persistedAmazonSignal:o}=gn();return function(e="unknown"){const{observability:t}=ie();a(()=>{t.counter({name:"WalletsPlatform_buy_with_prime_prime_unavailable_detour_count",value:1,attributes:{reason:e}}),t.log("use_mark_prime_not_available_shown",`Buy with Prime is not available because ${e}`,{cause:e,severity:"warning"})},[])}(),a(()=>{const e=i?.lines.filter(e=>!("walletsPlatformPaymentMethod"===e.method.type&&e.method.name===wn.BuyWithPrime));e?.length&&tO(o,{primeError:void 0})},[i,o]),"payment sheet error"===e||"terminal error"===e?d(bD,{errorType:bP.PaymentError,tone:"critical",children:t.translate("wallets.errors.generic",{walletName:t.translate("brand.buy_with_prime")})},"amazon-pay-errors"):"amazon pay error messages"===e?r?null:d(_O,{}):null}function SO({errors:e,errorType:t}){return d(y,{children:e.map(e=>d(bD,{tone:"critical",errorType:t,children:e.messageNode??e.message},`${e.target}${e.message}`))})}function wO(e){if(e.startsWith("DISCOUNTS")||"ReductionViolations"===e)return bP.DiscountError;switch(e){case"NOTE_LENGTH_EXCEEDS_MAXIMUM":case"PROPOSAL_LINE_ITEM_LIMIT_REACHED":case"MERCHANDISE_LINE_LIMIT_REACHED":case"MERCHANDISE_QUANTITY_RULES_INCREMENT_NOT_MET":case"MERCHANDISE_QUANTITY_RULES_MINIMUM_NOT_MET":case"MERCHANDISE_QUANTITY_RULES_MAXIMUM_EXCEEDED":case"MERCHANDISE_CART_UPDATED_BASED_ON_COUNTRY":case"MerchandiseQuantityRulesNotMet":return bP.MerchandiseError;case"PAYMENTS_SHIPPING_MUST_MATCH_BILLING":case"ShippingAddressIsMissing":case"DeliveryViolations":case"DeliveryAddressValidationErrors":return bP.DeliveryError;case"PAYMENTS_WALLET_PAYPAL_EXPRESS_ADDRESS_INVALID":case"PAYMENT_MANUA
2L_PAYMENTS_NOT_ALLOWED_FOR_B2B":case"PaymentViolations":return bP.PaymentError;default:return bP.CheckoutError}}function CO(){const e=eO();return e.length>0?e.map(e=>d(kD,{notice:e,errorType:wO(e.code)},e.code)):null}function EO(){const{globalErrors:e}=_S().value;return e.length>0?d(SO,{errors:e,errorType:bP.CheckoutError}):null}function xO(){const{merchandiseLineTransformerErrors:e}=function(){const{checkout:{negotiator:e}}=ie(),{allViolations:n}=e.current.fields,r=vn("allViolations");return t(()=>{const e=["MERCHANDISE_LINE_TRANSFORMERS_RUN_ERROR"];return r.value||!n.value?{merchandiseLineTransformerErrors:[]}:{merchandiseLineTransformerErrors:[...n.value.reduce((t,n)=>("UnprocessableTermViolation"===n.__typename&&e.includes(n.code)&&t.push({message:n.localizedMessage||n.nonLocalizedMessage,target:n.target}),t),[])].filter(mS())}})}().value;return e.length>0?d(SO,{errors:e,errorType:bP.MerchandiseError}):null}function IO(){const{contactErrors:e}=_S().value,t=px();return 0===e.length?null:t.value.contact?d(SO,{errors:e,errorType:bP.ContactError}):null}function AO(){const e=bO();return Boolean(e.value)?d(kO,{}):null}function TO(){const{hasError:e}=nO(),t=iO();return e&&!t?d(OD,{}):null}function LO(){const{hasError:e}=rO();return e?d(hO,{}):null}function NO(){const{giftCardBannerErrors:e}=uO(),{checkout:{configuration:t,negotiator:n}}=ie(),r=t.layout.isOnePage.value,{value:a=[]}=n.current.fields.allViolations,i=r?void 0:e?.[0],o=a.find(e=>"PAYMENTS_GIFT_CARDS_UNAVAILABLE"===e.code);return o?d(bD,{errorType:bP.DiscountError,tone:"critical",children:o.localizedMessage}):i?d(bD,{errorType:bP.DiscountError,tone:"critical",children:i}):null}const RO=()=>{const{isAppLayout:e}=ID(),{embed:t,checkout:n}=ie(),r=n.configuration.layout.isOnePage.value,{lineItems:{priority:a="base"}}=$m(),i=[CO(),EO(),xO(),IO(),AO(),TO(),NO(),LO()].filter(Boolean);if(0===i.length)return null;const o=e?"none large-200 base large-200":r?"none none base none":"none",s=Boolean(t?.isFlagshipPartner)&&"high"===a;return d(Jf,{gap:"small-200",padding:`@media (inline-size >= extraSmall) ${s?"none none small-100 none":"none"}, ${o}`,children:i})},MO=E(function({section:e="top"}){return{toast:d(xD,{}),top:d(RO,{}),reductions:d(CD,{}),delivery:d(PD,{}),payment:d(SD,{})}[e]});function DO({sectionId:e,children:t}){const{source:n}=ie(),o="simulated"===n.type,{sectionRef:s}=function(e){const{source:t,checkout:{negotiator:n}}=ie(),o="simulated"===t.type,s=i(null),{allRenderedSections:l,getRenderedSection:c}
2=n.context,u=c({sectionId:e}),d=u.value;return a(()=>{if(o&&s?.current){if(!d.rendered&&s?.current){u.value={rendered:!0};const t=l.value;l.value={...t,[e]:!0}}return()=>{if(d.rendered){u.value={rendered:!1};const t={...l.value};e in t&&delete t[e],l.value=t}}}},[o,s,d,e,u,l]),r(()=>({sectionRef:s}),[s])}(e);return d(y,o?{children:[d("div",{ref:s,style:{display:"none"}}),t]}:{children:t})}const OO={id:"18855ddcbbe672966b615922c0349b29db289bb4e82c4444a93b2c3bfed688bb",type:"mutation",name:"UserDiscountDelete",source:"mutation UserDiscountDelete($code:String!,$shopifyDomain:String!){userDiscountDelete(code:$code,shopifyDomain:$shopifyDomain){userErrors{field message __typename}__typename}}"};function zO({children:e}){const{formStatus:t}=function(){const{negotiate:e}=rc(),{handleNegotiationErrors:t,discountCodeWarning:r}=uO(),{shop:i,source:o,checkout:l,userEvents:c,shopPay:u}=ie(),{discountLines:d,reduction:p}=l.negotiator.parts,m=u.user.wallet.value,h=function(){const{graphql:{shopPayGraphql:e},shop:{myshopifyDomain:t}}=ie();return n(async n=>{const{data:r,error:a}=await e.mutate(OO,{variables:{code:n,shopifyDomain:t}});if(a||!r?.userDiscountDelete)return{status:"failed"};const{userDiscountDelete:i}=r;return i.userErrors.length>0?{status:"failed",errors:i.userErrors}:{status:"success"}},[e,t])}(),[g,f]=s(!1),[y,v]=s(""),_=u.user.shopAccountUuid,b=n((e,t)=>
2{c.monorailEvent({schemaId:"shopify_pay_login_with_shop_sdk_discount_wallet_events/2.0",payload:{...ra(o,l,i),action:e,shopAccountUuid:t,shopPermanentDomain:i.myshopifyDomain,discountCode:y}})},[c,o,l,i,y]),k=n(async e=>{"success"===(await h(y)).status&&b("invalidated - discount had been deleted",e)},[h,b,y]),[P,S]=s(()=>d.value.length?"open":"closed"),w=n(e=>{const t=["InputValidationError","UnprocessableTermViolation","RemoveTermViolation"],n=new Set([...pk,"DISCOUNTS_CUSTOMER_USAGE_LIMIT_REACHED","DISCOUNTS_USAGE_LIMIT_REACHED",ol]);return e.some(e=>t.includes(e.type)&&n.has(e.code))},[]),C=n(e=>{const t=["InputValidationError","UnprocessableTermViolation","RemoveTermViolation"],n=["DISCOUNTS_PURCHASE_NOT_IN_RANGE","DISCOUNTS_QUANTITY_NOT_IN_RANGE","DISCOUNTS_NO_ENTITLED_LINE_ITEMS"];return e.some(e=>t.includes(e.type)&&n.includes(e.code))},[]);return a(()=>{v(m.latestDiscount?.code??""),y&&S("negotiating_app_discount")},[y,m]),a(()=>{0===d.value.length&&S(e=>"negotiating_app_discount"===e?e:r?"open":"closed")},[r,d.value.length]),a(()=>{const n=y;if(!g&&"negotiating_app_discount"===P&&n){f(!0),p.value={code:n};const a=_.value;e({onComplete:async e=>{if(f(!1),"success"===e.status||"error"===e.status){const i=e.negotiated.discountLines?.lines.some(e=>e.discount.title.toLowerCase()===n?.toLowerCase());y&&(t(e.errors),i?b("applied",a):w(e.errors)?k(a):C(e.errors)&&b("failed to apply - invalid cart",a),p.value=void 0),S(i||r?"open":"closed")}},force:!0})}},[g,t,r,e,y,P,w,b,C,k,c,p,_.value]),{discountLines:d.value,formStatus:P,setFormStatus:S,walletDiscountCode:y}}();return"negotiating_app_discount"===t?d(Nf,{inlineAlignment:"center",children:d(Df,{})}):d(y,{children:e})}function BO({children:e,state:t,errors:n}){const r=hD(),o=Fg(),s=i([]);return a(()=>{const e=s.current;return Object.entries(n).forEach(([n,a])=>{e.push(a.subscribe(e=>{if(!e)return;const a=r(n),i=t[n]?.value??"",s=i?bP.InputInvalid:bP.InputRequired,l="string"==typeof(c=e)||"number"==typeof c?c.toString():Ji(c)?c.message:ds(c)?c.textValue:"";var c;o({target:a,errorType:s,value:i,message:l,timestamp:new Date})}))}),()=>{e.forEach(e=>e()),s.current=[]}},[]),e}function VO(){const{source:e,checkout:{negotiator:n}}=ie(),r=n.current.fields.canUpdateDiscountCodes;return t(()=>(r.value??!0)&&!Hn(e))}function FO(){const{checkout:{negotiator:e}}=ie(),n=e.current.fields.paymentFlexibilityPaymentTermsTemplate,r=ct(),a=e.current.fields.paymentMethods;return t(()=>(!e.current.fields.buyerIdentity.value?.purchasingCompany||!n.value&&!r.value)&&a.value?.some(e=>"giftCard"===e.type))}const UO="_1MTFx";function qO({messages:e}){const t=e=>{return d(dA,{children:e.messageHtml?(t=e.messageHtml,null==t?null:d("span",{dangerouslySetInnerHTML:{__html:t}})):e.message});var t};return 1===e.length?d("div",{className:UO,children:t(e[0])}):d(WD,{children:e.map(e=>d($D,{children:d("div",{className:UO,children:t(e)})},e.id))})}const jO=E(function({removeBanner:e,messages:t,grouped:a=!1}){const{i18n:i}=ie(),o=r(()=>function(e,t){return t?[...e.reduce((e,t)=>{const n=e.get(t.tone)??{tone:t.tone,linkedMessages:[]};return n.linkedMessages.push({...t}),e.set(t.tone,n)},new Map).values()]:e.map(e=>({tone:e.tone,linkedMessages:[e]}))}(t,a),[t,a]),s=n((e,t)=>{const n=e.filter(({isConfirmChangeViolation:e})=>e).length;return n===e.length?i.translate("payment.discount_codes_modified_summary",{count:t}):n>0?i.translate("payment.discount_codes_removed_or_modified_summary",{count:t}):i.translate("payment.discount_codes_removed_summary",{count:t})},[i]);return 0===t.length?null:d(hf,{target:"cart.discountCode",children:o.map(({tone:t,linkedMessages:n})=>{if(0===n.length)return null;const r=["critical","warning"].includes(t),a=n.map(({id:e})=>e),i=[...[...n.reduce((e,t)=>e.set(t.discountCode.toLocaleUpperCase(),t),new Map).values()].reduce((e,t)=>e.set(t.message.toLocaleUpperCase(),t),new Map).values()],o=n.reduce((e,t)=>(e.add(t.discountCode.toLocaleUpperCase()),e),new Set).size,l=i.length>1,c={iconHidden:!0,onDismiss:()=>e(a),dismissible:!0,tone:t,collapsible:l,heading:l?s(i,o):void 0};return r?d(bD,{...c,errorType:bP.DiscountError,children:d(qO,{messages:i})},a[0]):d(pD,{...c,children:d(qO,{messages:i})},a[0])})})});function HO({accessibilityLabel:e,children:t,graphic:n,id:r}){const a=mw(t);return d("div",{className:"_14brw1 _14brw0 _1fragempf _1fragemnm _1fragemt6 _1fragemrd _1fragem13d _1fragemzg _1fragem11x _1fragemzi",id:r,children:[d(Jf,{columnGap:"small-400",alignItems:"center",direction:"inline",children:[n&&d("span",{className:a?"_14brw2":void 0,children:d(rh,{type:n})}),a&&d("span",{className:"_14brw3",children:d(Vf,{accessibilityVisibility:e?"hidden":void 0,dir:"auto",children:d(fA,{children:t})})})]}),e&&d(Vf,{accessibilityVisibility:"exclusive",dir:"auto",children:e})]})}var $O="_14gomm23 _14gomm22 _1fragemyb _1fragem11v _1fragem11z",YO="_14gomm27 _14gomm26 _1fragem6y",WO="_14gomm25 _14gomm24 _1fragemyk";const GO=hm(_(function({accessibilityLabel:e,children:t,disabled:n=!1,graphic:r,hidden:o=!1,href:s,id:l,removable:c=!1,removeTrackingEvent:u,onAfterHide:p,onClick:m,onMouseEnter:h,onMouseLeave:g,onFocus:f,onBlur:y,onRemove:_,"aria-describedby":b},k){const P=Pd(),S=Ju(),w=i(o);a(()=>{!w.current&&o&&p?.(),w.current=o},[o,p]);const C=v("_14gomm21 _14gomm20 _1fragemeg _1fragemdw _1fragemf0 _1fragemdc _1fragem64 _1fragem13d _1fragemzg _1fragemzi",{[$O]:n||P,[YO]:o}),E=e?S("removeItem",{label:e}):S("removeChip");return d("div",{id:l,className:C,role:"group",children:[d(JO,{"aria-describedby":b,disabled:n,href:s,inert:P,onClick:m,onMouseEnter:h,onMouseLeave:g,onFocus:f,onBlur:y,ref:k,removable:c,children:d(HO,{accessibilityLabel:e,graphic:r,children:t})}),c&&d("button",{"aria-hidden":!!P||void 0,"aria-label":E,className:v("_14gomm2b _14gomm2a _1fragempf _1fragemnm _1fragemt6 _1fragemrd",WO),"data-event-name":u,disabled:n,tabIndex:P?-1:void 0,type:"button",onClick:()=>n||P||"function"!=typeof _?void 0:_(),children:d(rh,{type:"x",size:"small"})})]})})),JO=_(function({children:e,disabled:t,href:n,inert:r,removable:a,onClick:i,onMouseEnter:o,onMouseLeave:s,onFocus:l,onBlur:c,"aria-describedby":u},p){const m=Np(p),h=t??r??!1,g=h?void 0:n,f=()=>h||"function"!=typeof i?void 0:i(),y={onMouseEnter:o,onMouseLeave:s,onFocus:l,onBlur:c};return g||i||!a?g?d(jm,{"aria-describedby":u,className:v(WO,"_14gomm29 _14gomm28 _1fragem128"),href:g,onClick:f,ref:m,...y,children:e}):d("button",{"aria-describedby":u,"aria-hidden":!!r||void 0,className:WO,disabled:t,onClick:f,ref:m,tabIndex:r?-1:void 0,type:"button",...y,children:e}):d("div",{className:WO,ref:m,children:e})});function KO({reductionTags:e,headingId:t}){const{i18n:n}
2=ie(),r=VO(),a=lR(),{removeDiscount:i,removeGiftCard:o}=uO({headingId:t});if(0===e.length)return null;let s=0;const l=e.map(e=>e.hideLabel?(s+=1,s):0),c=s;return d(Jf,{direction:"inline",gap:"small-300",accessibilityRole:"unordered-list",accessibilityLabel:n.translate("order_summary.gift_card_and_discount_label"),ref:a,children:e.map((e,t)=>{const a=e.hideLabel?n.translate("order_summary.discount_title"):e.code,s="giftCard"===e.originType?n.translate("order_summary.gift_card_masked",{last_characters:e.code.slice(-4)}):a;let u=s;"giftCard"===e.originType?u=n.translate("order_summary.gift_card_ending",{last_characters:e.code.slice(-4)}):e.hideLabel&&c>1&&(u=n.translate("order_summary.discount_title_with_position",{position:l[t]}));const p="giftCard"===e.originType?"giftFill":"discount",m="giftCard"===e.originType?"remove_gift_card":"remove_discount_code",h="discountCode"!==e.originType||r.value?()=>{"discountCode"===e.originType?i(e.code):o(e.code)}:void 0,g="automatic"===e.originType?`automatic-discount-tooltip-${t}`:void 0;return d(Nf,{accessibilityRole:"list-item",className:"ZWcPq",children:[d(GO,{accessibilityLabel:u,graphic:p,id:`tag-${t}`,interestFor:g,removable:!g,onRemove:h,removeTrackingEvent:m,children:s.toUpperCase()}),g&&d(sm,{id:g,children:n.translate("order_summary.automatic_discount_tooltip")})]},`${e.originType}-${e.code}`)})})}function QO({headerLevel:e,monorailSection:t,autoFocus:n,autoScroll:r}){return d(Pf,{children:d(hf,{target:"cart",children:d(ez,{headerLevel:e,monorailSection:t,autoFocus:n,autoScroll:r})})})}const XO=jc("ReductionsInput"),ZO=jc("ReductionsHeading");function ez({headerLevel:e,monorailSection:i,autoFocus:o,autoScroll:s}){const{i18n:l,shopPay:c,shop:{discountCodesEnabled:u,giftCardsEnabled:p},checkout:h}=ie(),g="shopPay"===h.identity.current.value,f=h.negotiator,v=h.configuration.layout.isOnePage.value,{reductions:{applyButtonPosition:_,discountTagsDisplay:b,automaticTagsDisplay:k,position:P,spacing:S}}=vv(),w=Tt(),C=Ql({base:!0,medium:!1}),E=!w.value||(C??!1),x=m(!1),I=n(()=>{x.value=!x.value},[x]),A=VO(),T=sC(),{control:{labelPosition:L="inside"}}=$m(),{reductions:{labelPosition:N=L}}=vv(),{discountLines:R,paymentLines:M}=h.negotiator.parts,D=R.value,O=M.value.reduce((e,t)=>("giftCard"===t.method.type&&"code"in t.method&&e.push({originType:"giftCard",code:t.method.code}),e),[]),z=Bi(c)&&c.discountCodes.value.length?c.discountCodes.value:null,B=z?[...new Set(z)].map(e=>{const t=D.find(t=>"code"===t.discount.type&&t.title===e),n="code"===t?.discount.type&&Boolean(t.discount.codeHidden);return{originType:"discountCode",code:e,...n?{hideLabel:!0}:{}}}):[...D.reduce((e,{discount:t,title:n})=>("code"!==t.type||e.has(n)||e.set(n,{originType:"discountCode",code:n,...t.codeHidden?{hideLabel:!0}:{}}),e),new Map).values()],V=D.reduce((e,{discount:{type:t},title:n})=>("automatic"!==t&&"custom"!==t||e.push({originType:"automatic",code:n}),e),[]),F=[..."hidden"===k?[]:V,...A.value?B:[],...O];0===F.length&&(x.value=!1);const U="always_visible"===b||"base"===b&&F.length>0&&(!E||x.value);let q=!1;"error"===f.lastJourneyProgression.value.type&&"completion"===f.lastJourneyProgression.value.negotiationStage&&(q=oO(f.lastJourneyProgression.value.errors));const j=Hc(void 0,XO),H=Hc(void 0,ZO),$=Sf({active:q});a(()=>{s&&$.current&&$.current.scrollIntoView({behavior:"smooth"})},[s,$]);const{currentDetour:Y,currentPage:W}=nc().value,G=Gw("Checkout::Reductions::RenderBefore"),J=Gw("Checkout::Reductions::RenderAfter"),K=u&&A.value,Q=FO(),X=p&&Q.value,{loading:Z,reductionCodeField:ee,dirty:te,setDirty:ne,handleSubmit:re,discountCodeWarning:ae,discountMessages:oe,removeDiscountCodeWarnings:se,removeDiscountCodeMessage:le}=uO({inputRef:$,headingId:H,monorailSection:i});a(()=>{if(ae&&ae.length>0){const e=ae[0].message.trim();if(!e)return;return ju({content:e,role:"status"})}},[ae]);const{label:ce,title:ue,placeholder:de}=function(){const{i18n:e,shop:{discountCodesEnabled:n}}=ie(),r=VO(),a=FO();return t(()=>{const t=n&&r.value;return a.value&&t?{label:e.translate("order_summary.gift_card_and_discount_label"),placeholder:e.translate("order_summary.gift_card_and_discount_placeholder"),title:e.translate("order_summary.gift_card_and_discount_title")}:a.value?{label:e.translate("order_summary.gift_card_label"),placeholder:e.translate("order_summary.gift_card_placeholder"),title:e.translate("order_summary.gift_card_t
2itle")}:t?{label:e.translate("order_summary.discount_label"),placeholder:e.translate("order_summary.discount_placeholder"),title:e.translate("order_summary.discount_title")}:{label:"",placeholder:"",title:""}})}().value,pe=r(()=>({state:{discountCode:ee.valueSignal},errors:{discountCode:ee.errorSignal}}),[ee]);if(Y&&"shopPayLogin"!==Y.type)return null;const me=ae?d(jO,{messages:ae,removeBanner:se,grouped:!0}):null,he=oe&&oe.length?d(jO,{removeBanner:le,messages:oe}):null,ge="base"===_,fe=null!=e&&"base"===P&&"outside"===N&&ue===ce,ye=!ge&&"outside"===N&&!fe,ve="base"===b&&E&&F.length>0?d(Nf,{colorLayer:"control",className:"OuqRS",children:d(Wm,{className:"U9F9G",onClick:I,accessibilityLabel:l.translate("order_summary.discount_code_applied_count",{count:F.length}),"data-event-name":x.value?"discount_tags_hide":"discount_tags_show",border:"base",children:d(Jf,{paddingInline:"small-300",direction:"inline",gap:"small-400",alignItems:"center",children:[d(rh,{type:"discount",tone:"monochrome"}),d("strong",{children:F.length})]})})}):null,_e=ge?d(jf,{variant:"primary",type:"submit",loading:Z,disabled:!te,accessibilityLabel:l.translate("payment.discount_button_action_label"),"data-event-name":"apply_discount",ref:T("apply_discount"),children:l.translate("order_summary.apply_discount_button_label")}):void 0;let be=ee.error;ge||(be=!!ee.error||void 0);const ke=d(SA,{ref:$,id:j,name:"reductions",label:ce,placeholder:de,...ee,error:be,onInput:e=>ne(e.length>0),autoFocus:o,accessoryStart:ve,accessoryEnd:_e,labelPosition:ye?void 0:N,labelAccessibilityVisibility:ye||fe?"exclusive":void 0}),Pe=d(Nf,{children:[d(Jf,{gap:"base",children:[d(nD,{onSubmit:re,children:ge?ke:d(y,{children:[ye&&d(y,{children:[d(vA,{variant:"outside",htmlFor:j,label:ce}),d(kN,{blockSize:"small-400"})]}),d(Jf,{gap:"small-300",children:[d(Qm,{gap:ps(["small400",S??"small100"]),gridTemplateColumns:"minmax(0, 1fr) minmax(auto, max-content)",gridAutoColumns:"1fr",gridTemplateRows:"minmax(auto, max-content)",gridAutoRows:"minmax(auto, max-content)",children:[ke,d(jf,{variant:"primary",type:"submit",loading:Z,disabled:!te,accessibilityLabel:l.translate("payment.discount_button_action_label"),"data-event-name":"apply_discount",ref:T("apply_discount"),children:v?l.translate("order_summary.apply_discount_button_label"):d(y,{children:[d(iD,{below:"medium",children:l.translate("order_summary.apply_discount_button_label")}),d(iD,{above:"small",children:d(rh,{type:"arrow-right"})})]})})]}),ee.error?d(hA,{controlID:j,children:ee.error}):null]})]})}),me,he]}),d(Id,{id:"reduction-tags",open:U,duration:"fast",children:d(Nf,{paddingBlockStart:F.length>0?"base":void 0,children:d(KO,{reductionTags:F,headingId:H})})})]});return d(y,{children:[d(Id,{id:"gift-card-field",open:X||K,duration:"fast",children:d(XT,{children:[d(IS,{id:H,tabIndex:-1,...e?{level:e}:{visibility:"hidden"},children:ue}),e&&d(kN,{blockSize:"base"}),d(Jf,{gap:"base",children:[d(mT,{customizations:G}),d(DO,{sectionId:"reductions",children:g&&v?d(zO,{children:Pe}):d(BO,{...pe,children:Pe})}),d(mT,{customizations:J}),h.configuration.showPayButton&&K&&(v||"payment"===W?.id)&&d(oD,{targetSelector:"#checkout-pay-heading",icon:"credit-card",label:l.translate("order_summary.discount_discovery.back_to_finalize_order")})]})]})}),!X&&!K&&d(MO,{section:"reductions"})]})}const tz={};function nz(e){const t=function(e){return tz[e]||(tz[e]=function(){const e=S(null),t=new Set,n=S(),r=S(!1),a=S();let i=[];function o(){for(const e of i)e.disconnect();if(e.value&&a.value&&null!=a.value.floatingElementBlockSize&&"undefined"!=typeof IntersectionObserver){i=[new IntersectionObserver(([e])=>{n.value=e.isIntersecting},{threshold:[0,1],rootMargin:`0px 0px -${a.value.blockEndOffset??0}px 0px`}),new IntersectionObserver(([e])=>{r.value=1===e.intersectionRatio||e.boundingClientRect.bottom<e.rootBounds?.bottom},{threshold:[0,1],rootMargin:`999999px 0px -${(a.value.blockEndOffset??0)+(a.value.floatingElementBlockSize??0)}px 0px`})];for(const t of i)t.observe(e.value)}}const s=e.subscribe(o),l=a.subscribe(o),c=k(()=>Boolean(e.value&&a.value&&null!=n.value)),u=k(()=>{const e=Boolean(n.value),t=r.value,i=a.value?.floatingElementHiddenBelowTrigger;return i?e||t:e&&!t});return{triggerVisible:n,triggerAboveFloatingElement:r,triggerNode:e,triggerNodes:t,config:a,ready:c,floatingElementHidden:u,subscriptions:0,dispose(){s(),l();for(const e of i)e.disconnect();i=[],t.clear()}}}()),tz[e]}(e);return a(()=>(t.subscriptions++,()=>{t.subscriptions--,0===t.subscriptions&&function(e){tz[e]?.dispose(),delete tz[e]}(e)}),[t,e]),t}function rz(e){const t=nz(e),r=i(null),a=n(e=>{const n=r.current;n&&n!==e&&t.triggerNodes.delete(n),e&&t.triggerNodes.add(e),r.current=e,t.triggerNode.value===n&&n!==e?t.triggerNode.value=e??t.triggerNodes.values().next().value??null:e&&null===t.triggerNode.value&&(t.triggerNode.value=e)},[t]);return{floatingElementHidden:t.floatingElementHidden,ready:t.ready,config:t.config,triggerNode:t.triggerNode,setTriggerNode:a}}const az=e=>d(XT,{children:e});function iz({skipWrappingSection:e=!1,hideMerchandiseLines:t=!1,hideAccessibilityTitle:n=!1,monorailSection:a="order_summary",hideReductions:i=!1,reductionsFieldAutoFocus:o=!1,reductionsFieldAutoScroll:s=!1}){const{ready:l}=rz("chat"),{i18n:c,checkout:u,checkout:{configuration:{allowEmptyCart:p,visibility:m,layout:h}}}=ie(),g=m.showReductions&&!i,f=h.isOnePage.value,{currentDetour:v}=nc().value,_="thankYou"===v?.type,b=Gw(r(()=>_?"Checkout::ThankYou::Dynamic::Render":"Checkout::Dynamic::Render",[_]),"ORDER_SUMMARY3"),k=Gw("Checkout::Dynamic::Render","ORDER_SUMMARY4"),P=Ql({base
2:!0,medium:!1}),S=Tt(),w=f&&(!S.value||P),C=EL(),E=u.proposal.facts.merchandiseLines??[];if(f&&!p){const e=[];for(const t of C.value.values())e.push(...t);if(e.push(...E),e.every(({quantity:e})=>0===e))return d(sx,{textAlign:"center",children:c.translate("stock.empty_cart_label")})}return d(e?y:XT,{...!e&&{containerName:"s-shell-section"},children:[d(Jf,{gap:"large-200",children:[!n&&d(IS,{visibility:"hidden",children:c.translate("order_summary.title")}),!t&&d(iR,{}),g&&d(QO,{monorailSection:a,autoFocus:o,autoScroll:s}),!_&&d(mT,{customizations:b,gap:"large-200",render:az}),d(ZM,{}),(!w||_)&&d(mT,{customizations:_?b:k,gap:"large-200",render:az})]}),d(x,{when:l,children:d(Nf,{minBlockSize:"@media (inline-size >= medium) 72px, 0"})})]})}function oz(){const e=ie();return t(()=>y_(e))}function sz(){const{checkout:e}=ie();return e.unstable_graphqlDataRequestInfo?.checkoutSheetProtocolConfig??null}function lz(){const{mobileCheckoutSdk:e,embed:n}=ie(),r=oz(),a=sz(),i=nc();return t(()=>!(r.value||e.enabled||n?.isCheckoutKit())||(e.enabled&&e.variant.isStandard()||n?.isCheckoutKit()?"thankYou"===i.value.currentDetour?.type:Boolean(a?.disclosureEnabled)))}function cz(){const{embed:e,checkout:t}=ie(),n=Boolean(e?.platformCategory&&"WEB"!==e.platformCategory),r="WEB"===e?.platformCategory&&t.configuration.payButton.stickyPayButtonEnabledInWeb,a=n&&t.configuration.payButton.stickyPayButtonEnabledInMobile;return r||a}function uz(){const{checkout:e,embed:n,shopPay:r}=ie(),{progressing:a}=rc(),i=nc(),{submitting:o}=e.negotiator;return t(()=>{if(n?.isFlagshipPartner&&o.value)return!0;if(e.isRedirectingExternally.value)return!0;if(e.checkoutExit.isExiting.value)return!0;const{currentPage:t,plan:s}=i.value,l=t&&s.greenPath[s.greenPath.length-1]?.id===t.id;let c=a.value||r.session.isButtonProgressing.value;return void 0!==t&&(c=c&&Boolean(l)),c})}function dz(e={}){const[t,r]=s(null),[a,o]=s(null),l=i(null);return{entry:t,observer:a,ref:n(t=>{if(l.current?.disconnect(),l.current=null,!window.IntersectionObserver||!t)return r(null),void o(null);const n=new IntersectionObserver(e=>{r(e[0])},e);n.observe(t),l.current=n,o(n)},[e.root,e.rootMargin,e.threshold])}}function pz(){const e=Tf(),{checkout:n,embed:r}=ie(),i=zT(),{payNowButtonElement:o}=BP(),s=yr(r?.embedder),{entry:l,ref:c}=dz({threshold:.5});a(()=>(c(o??null),()=>c(null)),[o,c]);const u=T(l?.isIntersecting);return t(()=>Boolean(!s&&(n.isRedirectingExternally.value||!e.value&&!n.wallets.activeSession.value&&!i.value&&!u.value)))}function mz(e){return"available"===e.status&&e.methods.some(({methodType:e})=>"SHIPPING"===e||"LOCAL"===e)}function hz(){const e=si();return t(()=>{const t=e.value?.filter(mz);return{shippableDeliveryLines:t?.length?t:void 0}})}function gz(e){return!!e&&("unavailable"===e.status||"partial"===e.status||"filled"===e.status&&!e.lines.some(mz))}function fz({deliveryNext:e,proposedAddress:t,negotiatedAddress:n,reloadStrategy:r}){if(!gz(e))return!1;const a=DN(r)?n??t:t;return yi(a)}const yz={initial:{addressInvalid:"empty",addressComplete:"loading",addressReplaced:"loading",countryChanged:"resetting"},empty:{addressComplete:"loading",addressReplaced:"loading",countryChanged:"resetting",reset:"loading"},resetting:{reset:"initial"},loading:{addressComplete:"loading",addressInvalid:"empty",negotiationResolved:"negotiated",countryChanged:"resetting",addressReplaced:"loading"},negotiated:{addressComplete:"loading",addressInvalid:"loading",addressReplaced:"loading",countryChanged:"resetting",addressReset:"resetting",deliveryMethodChanged:"initial"}};const vz=["phone","company","firstName","lastName"];function _z(e,t,n){const r=new Map;for(const[a,i]of t)if("coordinates"!==a&&"name"!==a&&"oneTimeUse"!==a&&"handle"!==a&&e.includes(a)){if(vz.includes(a)&&(!n[a]||0===n[a]?.length))continue;r.set(a,i)}return r}const bz=e=>{const t=new Map;for(const[n,r]of Object.entries(e)){const e=r.peek();ds(e)&&"error"===e.type&&t.set(n,e.textValue)}return t};function kz({children:e}){const o=kh(),{observability:s,embed:l,events:c,checkout:{negotiator:u}}=ie(),{current:p,parts:h}=u,{deliveryMethodsAddressErrors:g,deliveryMethodTimingSignal:f,deliveryMethodDeltaSignal:y}=u.context,v=r(()=>{const e=p.fields.deliveryNext.peek();return function(e,t){return De((e,n)=>{const r=yz[e.status][n];if(r)return{status:r};t.leaveErrorBreadcrumb("[ShippingMethods] Invalid transition",{prevState:e.status,action:n})},{status:e})}("filled"===e?.status?"negotiated":"initial",s)},[p.fields.deliveryNext,s]),_=n(e=>{v.value=e},[v]),b=i(!1);
2l?.isFlagshipPartner&&!b.current&&(b.current=!0,c.addEventListener("embed:address-replace",()=>{_("addressReplaced")}));const S=i(!1);S.current||(S.current=!0,c.addEventListener("wallet:address-replace",()=>{_("addressReplaced")})),function(e,t){const{observability:n,checkout:{wallets:o,negotiator:s},checkout:l,shop:{shippingCountries:c}}=ie(),{deliveryMethodsAddressErrors:u,deliveryMethodTimingSignal:d}=s.context,{shippingAddress:p}=s.parts,h=l.configuration.isAddressDelegationEnabled,g=p.fields.countryCode.value,f=ky(g,c),{loading:y}=Mt(g),{negotiate:v}=rc(),{setAddressError:_}=_y(u),b=r(()=>ms(),[]),{resetAddressSuggestions:P}=by(b,u),S=Iy(g),w=function(e){const t=m();return gh(e,({action:e})=>{t.value=e}),t}(e),C=Ch(),E=r(()=>k(()=>function(e){switch(e){case Me.Country:return["countryCode"];case Me.CountryProvince:return["countryCode","zoneCode"];case Me.CountryProvinceZip:return["countryCode","zoneCode","postalCode"];case Me.CountryProvinceZipAddress:return["countryCode","zoneCode","postalCode","address1"];case Me.Anything:return["countryCode","zoneCode","postalCode","address1","address2","city","company","firstName","lastName","phone"]}}(C({countryCode:p.fields.countryCode.value,zoneCode:p.fields.zoneCode.value}))),[C,p.fields.countryCode,p.fields.zoneCode]),x=i();a(()=>{y||(x.current?.(),x.current=void 0)},[y]);const I=Lo(()=>{const e=p.peek();if(y)return void(x.current=()=>I());const n=f(e),r=_z(E.peek(),n,e);"addressReplaced"!==w.peek()&&(0===r.size?t("addressComplete"):t("addressInvalid"))},150);wh(p,()=>{t("countryChanged"),p.fields.postalCode.value=void 0,p.fields.zoneCode.value=void 0,p.fields.city.value=void 0,p.fields.address1.value=void 0,p.fields.address2.value=void 0,t("reset")});const A=r(()=>k(()=>E.value.filter(e=>"countryCode"!==e).map(e=>{const t=p.fields[e].value;if(t)return"postalCode"===e?t.replace(/[^a-z0-9]/gi,"").toLowerCase():t.toLowerCase()}).join("_")),[p.fields,E]);a(()=>{let t=!1;const n=e.value.status;return"initial"!==n&&"empty"!==n||I(),A.subscribe(()=>{if(t){if(o.activeSession.value||"addressReplaced"===w.value||"resetting"===e.value.status)return;I()}t=!0})},[o,I,e,w,p,A]),gh(e,({previousState:r,action:a,nextState:i})=>{if(n.leaveErrorBreadcrumb("Shipping methods state transition:",{prevState:r.status,action:a,nextState:i.status}),"initial"===i.status&&I(),"loading"===i.status&&0===d.peek()&&(d.value=Date.now()),"reset"===a){const e=p.peek();for(const t of Object.keys(e))"phone"===t&&Ht(e.phone)||_(t,void 0);P()}const o=hs(e);if("addressComplete"===a||"reset"===a||"addressReplaced"===a||"addressInvalid"===a&&("negotiated"===r.status||h)){if(h){const e=p.peek(),n=f(e);if(n.size>0){for(const[e,t]of n)void 0===u[e].peek()&&_(e,{message:t,origin:"client",type:"inline-validation"});return t("addressInvalid"),void t("negotiationResolved")}for(const[t,r]of Object.entries(u)){const e=r.peek();e&&"object"==typeof e&&"client"===e.origin&&"inline-validation"===e.type&&_(t,void 0)}}n.leaveErrorBreadcrumb("[ShippingMethods] Negotiation started"),v({silenceViolations:["all"],fieldsToResolve:["deliveryNext"],onComplete(r){const i=o!==hs(e);if(n.leaveErrorBreadcrumb("[ShippingMethods] Negotiation onComplete called",{result:r.status,stale:i}),!i)if("stale"!==r.status&&"invalid"!==r.status){if("reset"!==a&&r&&("success"===r.status||"error"===r.status)&&"violations"in r){const e="filled"===r.negotiated.deliveryNext?.status;if("addressReplaced"!==a){const n=bz(u);if(_z(E.peek(),n,p.peek()).size>0)return t(e?"negotiationResolved":"addressInvalid")}const n=S("shipping_address",r.violations),i="addressReplaced"===a?n:_z(E.peek(),n,p.peek());for(const[t,r]of i)void 0===u[t].peek()&&_(t,r);e||0===i.size?t("negotiationResolved"):t("addressInvalid")}}else t("negotiationResolved")}}).catch(()=>t("negotiationResolved"))}})}(v,_);const w=Ch(),C=t(()=>{const e=v.value.status;if("resetting"===e)return{status:"empty"};if("loading"===e)return{status:e};const t=p.fields.deliveryNext.value,n=gz(t),r="filled"===t?.status&&!n,a=h.shippingAddress.fields.countryCode.value,i=h.shippingAddress.fields.zoneCode.value,o=w({countryCode:a,zoneCode:i}),s=DN(o),l=s?h.shippingAddress.peek():h.shippingAddress.value,c=n&&("initial"===e||"empty"===e&&!s&&0===bz(g).size);return"negotiated"===e||r||c?t?n?{status:fz({deliveryNext:t,proposedAddress:l,negotiatedAddress:p.fields.shippingAddress.peek(),reloadStrategy:o})?"error":"empty"}:"filled"===t.status&&r?{status:"filled",deliveryLines:t.lines}:{status:"error"}:{status:"empty"}:{status:e}}),E=m(C.peek());!function(e){const{shop:{asyncDeliveryPromiseExperienceEnabled:t},observability:n}=ie(),r=i(!1);P(()=>{const a=e.value;if("undefined"==typeof PerformanceMeasure||"undefined"==typeof PerformanceMark)return;let i;r.current&&("loading"===a.status?i=function(){const e=performance.now();return()=>{const r=performance.now()-e;n.histogram({name:"shipping_methods_loading_duration",value:r,attributes:{async_shop_promise:t}})}}():i&&(i(),i=void 0)),r.current=!0})}(C);const x=i();a(()=>()=>{x.current&&clearTimeout(x.current)},[]),P(()=>{const e=C.value;if(x.current&&(clearTimeout(x.current),x.current=void 0),"loading"===e.status&&(x.current=setTimeout(()=>{const e=p.fields.deliveryNext.peek(),t="filled"===e?.status&&!gz(e);s.counter({name:"shipping_methods_timeout",value:1,attributes:{deliveryNext:e?.status??"unknown",hasShippingMethods:t}})},3e4)),"filled"===e.status){const t=e.deliveryLines,n=t.flatMap(e=>"available"===e.status?e.methods:[]).find(e=>"SHIPPING"===e.methodType&&e.deliveryPromiseProviderApiClientId)?.deliveryPromiseProviderApiClientId,r=f.peek();if(n&&r>0){const e=le(n),t=Date.now()-r;o(t,Number(e)),0===y.peek()&&(y.value=t)}}const t="empty"===e.status&&"negotiated"===v.peek().status&&gz(p.fields.deliveryNext.peek());("error"===e.status||"filled"===e.status||t)&&(f.value=0)});const I=r(()=>({uiStateSignal:C,initialUiStateSignal:E,dispatch:_}),[_,C,E]);return d(_h.Provider,{value:I,children:e})}function Pz({embedder:e,isThankYouDetour:t,normalizedPath:n}){return t&&"/thank-you"===n&&!yr(e)}var Sz=(e=>(e.Unavailable="unavailable",e.UnpurchasableB2B="unpurchasableB2B",e.Unpurchasable="unpurchasable",e.OutOfStock="stockProblem",e.QuantityChange="quantityChange",e.PriceChange="priceChange",e.Unshippable="unshippable",e.Unfulfillable="unfulfillable",e.Unknown="unknown",e))(Sz||{});const wz={[Sz.Unavailable]:{isAddressProblem:!1,isUnpurchasable:!0},[Sz.UnpurchasableB2B]:{isAddressProblem:!1,isUnpurchasable:!0},[Sz.Unpurchasable]:{isAddressProblem:!1,isUnpurchasable:!0},[Sz.OutOfStock]:{isAddressProblem:!1,isUnpurchasable:!1},[Sz.QuantityChange]:{isAddressProblem:!1,isUnpurchasable:!1},[Sz.PriceChange]:{isAddressProblem:!1,isUnpurchasable:!1},[Sz.Unshippable]:{isAddressProblem:!0,isUnpurchasable:!1},[Sz.Unfulfillable]:{isAddressProblem:!0,isUnpurchasable:!1},[Sz.Unknown]:{isAddressProblem:!1,isUnpurchasable:!1}};function Cz(e){return wz[e].isAddressProblem}function Ez(e){return wz[e].isUnpurchasable}function xz(){const{negotiate:e}=rc(),{observability:t,checkout:{negotiator:r}}=ie(),a=r.parts.merchandiseLines,i=r.current.fields.merchandiseLines,o=n(e=>{const t=a.value;a.value=t.filter(({stableId:t})=>!e.includes(t))},[a]);return n(async n=>{const r=new Map((i.value?.lines??[]).map(e=>[e.stableId,e])),a=n.reduce((e,{problem:t,line:n}
2)=>{if(Cz(t.type))return e;const a=r.get(n.stableId);return(!a||0===a.quantity||Ez(t.type))&&e.push(n.stableId),e},[]);try{a.length>0&&(o(a),await e({}))}catch(s){t.leaveErrorBreadcrumb("Failure to update merchandise lines when handling out-of-stock items",{error:s,unavailableMerchandiseIds:a})}},[i,o,e,t])}function Iz(e){const t=function(e){return e.some(e=>on.has(e.code))}(e),n=function(e){return e.some(e=>sn.has(e.code))}(e),r=function(e){return e.some(e=>ln.has(e.code))}(e),a=Wy(e),i=Gy(e),o=$y(e),s=function(e){return e.some(e=>en.has(e.code))}(e),l=[t,n,r,a].filter(Boolean).length>1;return o||l?s?Sz.QuantityChange:Sz.OutOfStock:t?Sz.Unavailable:n?Sz.UnpurchasableB2B:r?Sz.Unpurchasable:a?Sz.Unshippable:i?Sz.Unfulfillable:s?Sz.QuantityChange:Sz.Unknown}function Az(e){return e.quantity>0}function Tz(e){return Ez(e)?e:Sz.OutOfStock}function Lz(){const{checkout:e}=ie(),{value:t=[]}=e.negotiator.current.fields.allViolations,{value:n}=e.negotiator.current.fields.merchandiseLines,a=vn("merchandiseLines").value,i=e.negotiator.parts.merchandiseLines.value,o=r(()=>n?.lines??[],[n]),l=e.proposal.negotiated.fields.canUpdateMerchandise.value??!0,[c]=s(()=>Iz(t)),[u]=s(i),d=r(()=>mL(u,t),[u,t]),p=r(()=>gL(u,o,t).map(e=>function(e,t,n){const{proposed:r,negotiated:a}=e,i=function(e,t){if(t?.quantity&&t?.quantity>0&&t?.quantity!==e?.quantity)return{type:Sz.QuantityChange,negotiatedQuantity:t.quantity,proposedQuantity:e?.quantity}}(r,a),o=function(e,t){if(t?.itemPrice?.amount&&e?.itemPrice?.amount!==t?.itemPrice?.amount)return{type:Sz.PriceChange,negotiatedPrice:t?.itemPrice,proposedPrice:e?.itemPrice}}(r,a),s=function(e,t,n){if(!n&&t)return{type:Tz(e)}}(t,r,a),l=r??a;return n.has(l.stableId)?{line:l,problem:{type:t===Sz.Unfulfillable?Sz.Unfulfillable:Sz.Unshippable}}:0===a?.quantity?{line:l,problem:{type:Tz(t)}}:o?{line:l,problem:o}:i?{line:l,problem:i}:s?{line:l,problem:s}:{line:l,problem:{type:Sz.OutOfStock}}}(e,c,d)),[u,o,t,c,d]),m=o.filter(({stableId:e})=>!d.has(e)).some(Az)&&l,h=!m,g=u.some(e=>{const t=o.find(({stableId:t})=>t===e.stableId);return!t||0===t.quantity||d.has(e.stableId)});return{type:c,lineItems:p,loading:a,cartEmpty:h,hasLineItemsLeftInCart:m,hasUnavailableMerchandise:g,unshippableMerchandiseIds:d}}function Nz({width:e}){const{header:{logo:t}}=vv(),{embed:n,i18n:r,shop:a,shopPay:i,source:o,url:s,router:l}=ie(),c=gf(),u=sC(),{isAppLayout:p}=ID(),m=aS(),{brandSettings:h}=a,{lineItems:g}=Lz(),f=xz();if(i.visibility.showShopPayBrandedLogo||fr(l.currentUrl.value.search))return d("img",{src:"/cdn/shopifycloud/checkout-web/assets/c1/assets/ShopLogo.3uo8wELJ.svg",height:30,width:72,alt:""});let y=d("span",{className:"pJt3c",children:d(yu,{level:1,children:d(IS,{level:1,accessibilityRole:"presentation",display:"inline",children:a.name})})});n?.isFlagshipPartner?y=d(Jf,{direction:"inline",gap:"small-200",alignItems:"center",children:[h?.squareLogo?.url&&d(tN,{alt:h.squareLogo.altText||a.name,src:h.squareLogo.url,className:"yfbTW",borderRadius:"base",inlineSize:"auto"}),y]}):t?.image&&(y=d(Ow,{width:e}));const v="simulated"!==o.type&&!Hn(o)&&!p&&!n;if(!a.hasStorefront||!v&&!c)return y;const _=a.previewReturnUrl?a.previewReturnUrl:void 0,b=a.partnerStorefrontUrl&&!c?a.partnerStorefrontUrl:void 0,k=_??t?.link??b??o.headerLogoUrl??s.storefront(),P=r.translate("editor.navigation.store_logo_accessibility_label"),S=d("span",{ref:u("logo"),children:d(Wf,{href:k,tone:"monochrome",textDecoration:"none",onClick:async()=>{c?m.includes(k)&&l.navigate(e=>{const t=new URL(e);return t.searchParams.set("ce_redirect",k),t}):g.length>0&&await f(g)},display:"block",children:[y,d(Vf,{accessibilityVisibility:"exclusive",children:P})]})});return t?.image&&t?.maxWidth?d(Nf,{maxInlineSize:`${t.maxWidth}px`,children:S}):S}const Rz=w({displayName:"AccountAvatar",suspense:!1,load:()=>C(()=>ul(()=>import("./7b11cac4.BSB2JbnE.js"),__vite__mapDeps([247,2,248,3,4,1,5,249,7,8,9,10,11,250]))),useError:$E("AccountAvatar")}),Mz={borderRadius:{small:"8px",base:"12px",large:"16px",fullyRounded:"36px",max:"9999px"},color:_s,transitionDuration:{base:gs(0,200,1.5,"ms")},transitionTimingFunction:{easeOut:"cubic-bezier(0.3, 0.5, 0.5, 1)"},fontFamily:ys,fontSize:fs,letterSpacing:vs,lineHeight:bs};function Dz(){const e=Hm(),{router:t,userEvents:n,shop:r,source:a,checkout:i,i18n:o}=ie(),s=Og(),l="simulated"===a.type,c=sC(),{header:{cartLink:{contentType:u="icon",image:p}={}}}=vv(),m=oS(),h="/shoppay_login"===t.currentUrl.value.normalizedPath,g=o.translate("general.cart");let f;if("text"===u)f=g;else if("image"===u&&p?.src){const t=1.7142857142857142*ks(e.customProperties.value.fontSize?.base??Mz.fontSize.base);f=d("img",{src:p.src,alt:g,height:t,className:v(Se({display:"block"}))})}else f=d(rh,{type:"bag",size:"large"});return d("span",{ref:c("cart"),children:d(Wf,{href:m.value?.toString(),id:"cart-link",onClick:()=>
2{if("shopPay"!==i.identity.current.value)s("click",{element:{tagName:"a",textContent:g},section:"header",timestamp:new Date,transmitImmediately:!0});else{if(l||h)return;n.monorailEvent({schemaId:"shopify_pay_payment_page_ui_interaction/1.2",payload:{...ra(a,i,r),action:"return_to_cart"}})}},accessibilityLabel:"icon"===u?g:void 0,display:"block",children:f})})}function Oz({alignment:e,logo:t,endAccessory:n,endAccessoryAffectsBlockSize:r=!0}){const a=n&&!r?d(Nf,{blockSize:"0px",children:d(Nf,{transform:"translate(0px, -50%)",children:n})}):n,i={start:{columns:a?"minmax(0, 1fr) minmax(auto, max-content)":"minmax(0, 1fr)",markup:d(y,{children:[t,a]})},center:{columns:a?"minmax(auto, max-content) minmax(0, 1fr) minmax(auto, max-content)":"minmax(0, 1fr)",markup:d(y,{children:[a&&d("div",{style:{visibility:"hidden"},children:a}),d(Nf,{inlineAlignment:"center",children:t}),a]})},end:{columns:a?"minmax(auto, max-content) minmax(0, 1fr)":"minmax(0, 1fr)",markup:d(y,{children:[a,d(Nf,{inlineAlignment:"end",children:t})]})}};return d(Qm,{gridTemplateColumns:i[e].columns,minInlineSize:"100%",alignItems:"center",alignContent:"center",gap:"large-500",children:i[e].markup})}function zz(){const{checkout:e,router:t}=ie(),n=t.currentUrl.value,{header:{alignment:r="start",logo:{visibility:a,maxWidth:i}={}}}=vv(),o=iS(),s=sk(),{currentDetour:l}=nc().value,c=e.configuration.visibility.showHeader&&!(e.configuration.isUniversalCheckoutFinalizer&&"thankYou"===l?.type);let u="purchase.checkout.header.render-after";"thankYou"===l?.type&&(u="purchase.thank-you.header.render-after");const p=Gw(u),m="hidden"!==a||fr(n.search),h=m?d(Nz,{width:i}):d("div",{});let g;return o.value?g=d(Dz,{}):s.value&&(g=d(Rz,{})),d(Jf,{gap:"large-100",children:[(null!=g||m)&&c&&d(Oz,{alignment:r,logo:h,endAccessory:g,endAccessoryAffectsBlockSize:o.value||!m}),d(mT,{customizations:p,gap:"base"})]})}const Bz=w({displayName:"ShopPayCheckout",load:()=>C(()=>ul(()=>import("./461aedcc.Bx_HJ6sP.js"),__vite__mapDeps([251,2,1,3,4,5,151,167,168,191,8,109,110,75,148,10,149,150,219,161,152,147,65,7,9,11,252])).then(e=>e.ShopPayCheckout))});function Vz({children:e}){const{checkout:{configuration:{layout:t},identity:n},router:r,shopPay:{isSimulated:a}}=ie();return Ps({isShopPay:"shopPay"===n.current.value,isOnePage:t.isOnePage.value,path:r.currentUrl.value.normalizedPath})?d(Bz,{simulated:a,children:e}):d(y,{children:e})}function Fz({children:e}){const{checkout:t}=ie(),n=uz(),r=pz(),a=t.checkoutExit.isExiting.value,i=YI(),o=d(Vz,{children:[d(VT,{}),d(MT,{}),d(WT,{active:n.value,announceProcessing:!a,showLoadingIndicator:!a&&r.value,loadingIndicatorVariant:"progressbar",children:d(Uz,{routeContentInert:!!i.value||void 0,children:e})}),d(WI,{})]});return d(_C,{children:d(GT,{children:d(kz,{children:d(SI,{children:o})})})})}function Uz({children:e,routeContentInert:t}){const{header:{logo:{visibility:n}={}},footer:{content:{visibility:a}={}},cartLink:{visibility:i}}=vv(),{checkout:o,mobileCheckoutSdk:s,shop:l,shopPay:c,source:u,embed:p,router:m}=ie(),h=m.currentUrl.value,g=fr(h.search),f=cz(),v=o.configuration.showFooter,{currentDetour:_}=nc().value,b=lz().value,k=Hh()&&b&&Pz({embedder:p?.embedder,isThankYouDetour:"thankYou"===_?.type,normalizedPath:h.normalizedPath});let P="purchase.checkout.header.render-after",S="purchase.checkout.footer.render-after",w="purchase.checkout.chat.render";"thankYou"===_?.type&&(P="purchase.thank-you.header.render-after",S="purchase.thank-you.footer.render-after",w="purchase.thank-you.chat.render");const C=Gw(P),E=Gw(S),x=Gw(w),I=yx(),A=px(),T=mx(),{isAppLayout:L}=ID(),N=L&&"google"===p?.embedder&&da({embedder:p.embedder,shop:l})&&T.value&&null==_,R=Tt(),M="shopPayExternal"===u.type,D=!o.configuration.visibility.showHeader,O=o.configuration.isUniversalCheckoutFinalizer&&"thankYou"===_?.type,z=(()=>{if(M)return c.visibility.showOnePageShellHeader;if(O)return C.length>0&&R.value;if(p?.isFlagshipPartner&&!yr(p.embedder)&&"shopApp"!==p.embedder)return!1;if((D||"hidden"===n&&!g&&"hidden"===i)&&!s.enabled&&!p?.isCheckoutKit()&&(0===C.length||!R.value))return!1;if(L){if(!s.enabled||s.variant.isStandard())return!1;if(p?.isCheckoutKit())return!1}return!0})(),B=zz,V=o.negotiator.current.fields.buyerIdentity.value?.customerProfile,F=null==V||"CustomerProfile"!==V.__typename,U="thankYou"===_?.type||F&&!A.value.payment&&!A.value.delivery,q=r(()=>s.enabled?s.variant.isStandard():p?!!p.isCheckoutKit()||!f&&(v||E.length>0):("hidden"!==a||E.length>0&&R.value)&&!L&&!g,[p,f,v,s,a,E.length,L,g,R.value]),j="shopPayLogin"!==_?.type&&U&&b&&!p?.isFlagshipPartner,H=c.visibility.shouldForceOnePageShellContentAsAppLayout,$=d(y,{children:[d(PT,{}),d(Nf,{className:N?"ghhXm":void 0,inert:t,children:e})]});return d(y,{children:[d(qT,{}),d(LC,{banner:d(gx,{}),announcement:"thankYou"===_?.type&&I.length>0?d(fx,{}):void 0,header:z?d(B,{}):void 0,disclosure:j&&!k?d($I,{}):void 0,disclosureOrderSummary:k?void 0:d(iz,{monorailSection:"top_order_summary"}),main:$,orderSummary:d(iz,{}),footer:q?d(bT,{}):void 0,blockSize:(()=>
2{if(L||H)return"appLayout"})(),minMobileViewportSize:N}),d(ST,{}),d(jT,{}),d(HT,{}),d(mT,{customizations:x,transformComponents:qz,render:e=>d(Nf,{minBlockSize:"@media (inline-size >= medium) 0, 72px",children:e})})]})}const qz=FT(ix);function jz(){const{router:e}=ie(),t=gn().inMemoryAmazonPayParts.serializedAmazonParams;return n(n=>{const{keep:r,only:a}=n??{},i=e.currentUrl.value.href,o=new URL(i);Wo.filter(e=>r?!r.includes(e):!a||a.includes(e)).forEach(e=>{o.searchParams.delete(e)}),ws(t,e=>o.searchParams.get(e)),i!==o.href&&e.navigate(o.href,{replace:!0})},[e,t])}function Hz(){return"true"===KD()[Cs]}const $z=w({load:()=>ul(()=>import("./56bd1136.Bd2fVPe_.js"),__vite__mapDeps([253,2,1,3,4,5,244,229,46,254,255,109,110,256,161,234,75,147,257,7,8,9,10,11,258])).then(e=>e.AmazonBuyerDetailsContent),renderLoading:()=>d(Yz,{}),useError:function(e){const{checkout:{wallets:t,negotiator:n}}=ie(),{buyerDetails:r,buttonStatus:i,sdkStatus:o}=gn().inMemoryAmazonPayParts,{paymentLines:s}=n.parts,l=jz(),c=EP();a(()=>{if(!e)return;i.value={status:"error"},o.value={status:jv.Error},r.value={loading:!1,error:!0,details:void 0},l();const n=t.escalatedWallet.value,a=n===wn.AmazonPay||n===wn.BuyWithPrime,u=s.value.some(e=>"walletsPlatformPaymentMethod"===e.method.type&&(e.method.name===wn.AmazonPay||e.method.name===wn.BuyWithPrime));a?(c({shouldResetCustomerInfo:!0}),t.setEscalatedWallet(null)):u&&(s.value=s.value.filter(e=>"walletsPlatformPaymentMethod"!==e.method.type||e.method.name!==wn.AmazonPay&&e.method.name!==wn.BuyWithPrime))},[e,r,i,l,s,c,o,t])}});function Yz(){const{buyerDetailsContentLoaded:e}=gn().inMemoryAmazonPayParts;return a(()=>{e.value=!1},[e]),null}function Wz(){const{checkout:{negotiator:e}}=ie(),t=e.current.fields.paymentMethods,{attributes:n,externalDeliveryIds:r,paymentLines:a}=e.parts,i=Hz(),o=Tt();return d(x,{when:()=>o.value&&function(e,t,{attributes:n,externalDeliveryIds:r,hasAmazonCancelledParam:a}){const i=[wn.AmazonPay,wn.BuyWithPrime].some(t=>Boolean(Ss(e,t))),o=t.some(e=>"walletsPlatformPaymentMethod"===e.method.type&&e.method.name===wn.BuyWithPrime),s=n?.some(({key:e,value:t})=>e===jr&&t===wn.BuyWithPrime);return Boolean(i||o||r||s||a)}(t.value,a.value,{attributes:n.value,externalDeliveryIds:r.value,hasAmazonCancelledParam:i}),children:d($z,{})})}function Gz(){const{i18n:e}=ie(),n=nc(),r=t(()=>n.value.currentDetour?.label??n.value.currentPage?.label??e.translate("general.page_title"));return d("h1",{className:Se({screenReaders:"only"}),children:r})}function Jz({title:e,cost:t}){return d(y,{children:[e,"·",t]})}function Kz({deliveryChangeTitle:e,deliveryLines:t}){const{i18n:n}=ie();return d(BL,{blockPadding:"base",children:[d(zL,{primary:!0,children:[d(Vf,{size:"base",type:"strong",children:n.translate("order_summary.shipping_label")}),t.map(({title:e,lineAmount:t})=>d(Jf,{direction:"inline",gap:"small-400",alignItems:"center",children:d(Jz,{title:d(Vf,{size:"small",children:e}),cost:d(Vf,{size:"small",type:"strong",children:n.formatCurrency(t.amount,{currency:t.currencyCode,form:"short"})})})},e))]}),d(zL,{inlineAlignment:"center",children:d(sx,{type:"small",textAlign:"end",children:d(Vf,{type:"strong",children:e})})})]})}const Qz="TeeUi",Xz=jc("TaxRecalculationLineTooltip");function Zz({taxRecalculation:e}){const{i18n:t}=ie(),n=t.numberFormatter({style:"percent",minimumFractionDigits:0,maximumFractionDigits:3}),r=Hc(void 0,Xz),a=Hc(void 0,Xz),i=e.beforeLines,o=e.afterLines;return 0===i.length&&0===o.length?null:d(BL,{blockPadding:"base",children:[d(zL,{primary:!0,children:[d(Vf,{size:"base",type:"strong",children:t.translate("delivery_options.shipping_address")}),d(sx,{type:"small",children:[d("span",{className:Qz,children:[t.translate("payment.order_edit_banner_previous_taxes_label")," ",d(eB,{lines:i,tooltipId:r,percentFormatter:n,i18n:t})," ",d("span",{"aria-hidden":"true",children:"â"})]})," ",d("span",{className:Qz,children:[t.translate("payment.order_edit_banner_new_taxes_label")," ",d(eB,{lines:o,tooltipId:a,percentFormatter:n,i18n:t})]})]})]}),d(zL,{inlineAlignment:"center",children:d(sx,{type:"small",textAlign:"end",children:d(Vf,{type:"strong",children:d("span",{className:"DQ7YO",children:t.translate("payment.order_edit_banner_single_item_updated").toUpperCase()})})})})]})}function eB({lines:e,tooltipId:t,percentFormatter:n,i18n:r}){if(0===e.length)return d(y,{children:r.translate("payment.order_edit_banner_no_taxes_label")});if(1===e.length)return d(y,{children:tB(e[0],n)});const a=e.map(e=>tB(e,n)).join(" + "),i=e.filter(e=>null!=e.rate);if(0===i.length)return d(y,{children:a});const o=i.reduce((e,t)=>
2e+(t.rate??0),0);return d(y,{children:[d(Wm,{interestFor:t,className:"_8A9rc",children:n.format(o)}),d(sm,{id:t,children:a})]})}function tB(e,t){return null==e.rate?e.title:`${e.title} ${t.format(e.rate)}`}function nB(){const{i18n:e,checkout:n}=ie(),r=At(),a=n.proposal.facts.orderNumber,i=n.proposal.facts.delivery??[],o=t(()=>i.length>0?i[0].lines.filter(e=>"ADDED"===e.deliveryChange):[]),s=t(()=>i.length>0?i[0].lines.filter(e=>"REMOVED"===e.deliveryChange):[]),l=t(()=>(n.proposal.facts.merchandiseLines??[]).filter(e=>e.quantityChange&&e.quantityChange.delta)),c=t(()=>{const e=n.proposal.facts.taxRecalculation;return e&&(e.beforeLines.length>0||e.afterLines.length>0)?e:void 0}),u=t(()=>l.value.length>0||o.value.length>0||s.value.length>0||Boolean(c.value)),p=t(()=>{if(r.value&&u.value)return{formattedAmountOwed:e.formatCurrency(r.value.amount,{currency:r.value.currencyCode,form:"short"})}}),m=t(()=>o.value.length>0?o.value:void 0),h=t(()=>s.value.length>0?s.value:void 0);return d(x,{when:p,children:({formattedAmountOwed:t})=>d(pD,{heading:e.translate("payment.order_edit_banner_title",{amount_owed:t}),collapsible:!0,children:[d(Vf,{children:e.translate("payment.order_edit_banner_subtitle",{order_number:a?`#${a}`:""})}),d(kN,{blockSize:"base"}),d(gw,{}),d(AL,{title:e.translate("payment.order_edit_banner_updated_order_label"),titleHidden:!0,border:"inner",spacing:"none",children:[d(TL,{hidden:!0,children:[d(LL,{hidden:!0,children:e.translate("order_summary.product_image_label")}),d(LL,{hidden:!0,children:e.translate("order_summary.description_label")}),d(LL,{hidden:!0,children:e.translate("order_summary.quantity_label")})]}),d(RL,{children:[d($,{each:l,getKey:({title:e,variantTitle:t})=>`${e}${t?`-${t}`:""}`,children:({quantity:e,quantityChange:t,image:n,title:r,variantTitle:a})=>d(BL,{blockPadding:"base",children:[d(zL,{inlineAlignment:"start",children:d(Pw,{alt:n?.altText??"",size:"base",src:n?.url})}),d(zL,{primary:!0,children:[d(Vf,{size:"base",type:"strong",children:r}),a?d(Vf,{color:"subdued",size:"small",children:a}):null]}),t&&t.delta&&t.type?d(zL,{inlineAlignment:"center",children:d(rB,{remainingQuantity:e,delta:t.delta,type:t.type})}):null]})}),d(x,{when:m,children:t=>d(Kz,{deliveryLines:t,deliveryChangeTitle:e.translate("payment.order_edit_banner_single_item_added").toUpperCase()})}),d(x,{when:h,children:t=>d(Kz,{deliveryLines:t,deliveryChangeTitle:e.translate("payment.order_edit_banner_single_item_removed").toUpperCase()})}),d(x,{when:c,children:e=>d(Zz,{taxRecalculation:e})})]})]})]})})}function rB({remainingQuantity:e,delta:t,type:n}){const{i18n:r}=ie();if(0===t)return null;const a=0===e,i=e+t;let o;switch(n){case"INCREMENTED":o=r.translate("payment.order_edit_banner_items_added",{count:t});break;case"DECREMENTED":o=r.translate("payment.order_edit_banner_items_removed.with_quantities",{quantity:i,delta:t});break;case"REMOVED":o=r.translate("payment.order_edit_banner_items_removed.in_full");break;case"RETURNED":o=a?r.translate("payment.order_edit_banner_items_returned.in_full",{quantity:i}):r.translate("payment.order_edit_banner_items_returned.with_quantities",{quantity:i,delta:t});break;case"RETURN_LINE_ITEM_REMOVED":o=a?r.translate("payment.order_edit_banner_items_return_line_item_removed.in_full"):r.translate("payment.order_edit_banner_items_return_line_item_removed.with_quantities",{delta:t});break;default:return null}return d(sx,{type:"small",textAlign:"end",children:d(Vf,{type:"strong",children:o.toUpperCase()})})}const aB={current:void 0};function iB({active:e,breadcrumbs:t}){const{i18n:n}=ie(),r=sC(),{buyerJourney:{alignment:a}={}}=vv();return d(dC,{section:"breadcrumbs",children:d(lC,{section:"breadcrumbs",children:d(Nf,{accessibilityRole:"navigation",accessibilityLabel:n.translate("general.breadcrumb"),inlineAlignment:a,children:d(Jf,{direction:"inline",gap:"small-200",accessibilityRole:"ordered-list",children:t.map(({id:n,to:a,disabled:i,content:o},s)=>{const l=t.length!==s+1,c=e===n,u=d(Vf,c||i?{color:c?void 0:"subdued",type:c?"strong":void 0,size:"small",children:o}:{size:"small",ref:r(n),children:d(Wf,{href:a,textDecoration:"none",children:o})});return d(Jf,{direction:"inline",gap:"small-200",alignItems:"center",accessibilityRole:"list-item",accessibilityCurrent:c?"step":void 0,children:[u,l&&d(rh,{type:"chevron-right",size:"small-200"})]},n)})})})})})}function oB(){return ae(MP)}function sB(){const{checkout:{negotiator:e}}=ie(),{paymentLines:n}=e.parts;return t(()=>{const e=Nt(n.value,"APPLE_PAY");return!!e&&Wi(e)})}function lB(){const{checkout:e,observability:t}=ie(),n=e.configuration.layout.isOnePage.value,r=e.latestReceipt.value,{walletUsedForSubmissionSignal:o,receiptErrorSignal:s,inMemoryApplePayParts:{asPaymentMethod:l,paymentSheetError:c}}=gn(),u=yI(Es()),d=yI(dO()),p=sB(),{paymentLines:m}
2=e.negotiator.parts,h=Nt(m.value,"GOOGLE_PAY"),g=Boolean(h&&xs(h)),f=yI(LP({shouldResetCustomerInfo:!1})),y=i(new Set),v=MD("failed"===r?.status&&"payment"===r.failure.type&&n?r?.failure:void 0);a(()=>{if("processing"===r?.status||"polling_for_order"===r?.status)return;const e=o.value,n=p.value&&"APPLE_PAY"!==e,a=g&&"GOOGLE_PAY"!==e,i=!e&&!n&&!a;if(r){if(y.current.has(r.id))return;t.leaveErrorBreadcrumb("[useHandleReceiptErrorForWallets] Adding to handled receipt ids",{receiptId:r.id,isNonWalletSubmission:i}),y.current.add(r.id)}if(i)return;const m="APPLE_PAY"===e||n,h="GOOGLE_PAY"===e||a;m&&"payment_cancelled_while_processing"===c.value?.type&&(c.value=void 0),"failed"===r?.status?(m&&d.current(),a&&f.current(),"payment"===r.failure.type&&(e||n||a)&&!l.value&&(t.log("useHandleReceiptErrorForWallets_selecting_first_available_payment_method","selecting first available payment method",{walletUsedForSubmission:e,applePaySFRPaymentFailure:n,googlePaySFRPaymentFailure:a}),u.current()),(m&&!l.value||h)&&(s.value=v),"GOOGLE_PAY"===e&&(o.value=void 0)):s.value=void 0},[t,r,s,o,l,c,d,f,v,u,p.value,g]),a(()=>function(){s.value=void 0},[s])}function cB(){const{checkout:e,router:t}=ie(),n=t.currentUrl.value,{header:{alignment:r="start",logo:a}}=vv(),i=sk(),{currentDetour:o}=nc().value;let s="purchase.checkout.header.render-after";"thankYou"===o?.type&&(s="purchase.thank-you.header.render-after");const l=Gw(s),c=e.configuration.isUniversalCheckoutFinalizer&&"thankYou"===o?.type,u=!c&&("hidden"!==a?.visibility||fr(n.search)),p=!c&&i.value,m=u||p;let h;return p?h=d(Oz,{alignment:r,logo:u?d(Nz,{width:a?.maxWidth}):d("div",{}),endAccessory:d(Rz,{}),endAccessoryAffectsBlockSize:!u}):u&&(h=d(Nf,{inlineAlignment:r,children:d(Nz,{width:a?.maxWidth})})),d(y,{children:[h,l.length>0&&d(y,{children:[m&&d(kN,{blockSize:"@media (inline-size >= medium) base, large-400"}),d(mT,{customizations:l,gap:"base"})]})]})}function uB({children:e}){return d(_C,{children:d(GT,{children:[d(dB,{}),d(MT,{}),d(VT,{}),d(pB,{children:d(mB,{children:e})})]})})}function dB(){return function(){const{router:e}=ie(),{plan:t}=nc().value;a(()=>e.beforeNavigate((e,n)=>{const r=t.greenPath.find(t=>t.route===e.normalizedPath),a=t.greenPath.find(e=>n.pathname.endsWith(e.route));if(!r||!a)return{};if(!sc.includes(r.id)||!sc.includes(a.id))return{};const i=t.greenPath.indexOf(r),o=t.greenPath.indexOf(a);return ll(()=>{},o>i?["page-slide-end"]:["page-slide-start"]),{}}),[e,t.greenPath])}(),lB(),null}function pB({children:e}){const{checkout:t}=ie(),n=uz(),r=pz(),a=t.checkoutExit.isExiting.value;return d(WT,{active:n.value,announceProcessing:!a,loadingIndicatorVariant:"progressbar",showLoadingIndicator:!a&&r.value,children:e})}function mB({children:e}){const{header:{logo:{visibility:t}={}},footer:{content:{visibility:n}={}}}=vv(),{checkout:a,embed:i,router:o}=ie(),{currentDetour:s}=nc().value,l=Hh()&&Pz({embedder:i?.embedder,isThankYouDetour:"thankYou"===s?.type,normalizedPath:o.currentUrl.value.normalizedPath});let c="purchase.checkout.header.render-after",u="purchase.checkout.footer.render-after",p="purchase.checkout.chat.render";"thankYou"===s?.type&&(c="purchase.thank-you.header.render-after",u="purchase.thank-you.footer.render-after",p="purchase.thank-you.chat.render");const m=Gw(c),h=Gw(u),g=Gw(p),f=yx(),v=a.configuration.isUniversalCheckoutFinalizer&&"thankYou"===s?.type,_=m.length>0||!v&&"hidden"!==t,b=cB,k="hidden"!==n||h.length>0,P=function(e){return e.currentUrlMatches("/stock-problems")}(o),S=o.currentUrlMatches("/no-address-location"),w=sS(o),C=o.currentUrlMatches("/shoppay"),E=XD(),{activeBreadcrumb:x,breadcrumbs:I}=function(){const{i18n:e,router:t,checkout:{negotiator:n}}=ie(),{currentPage:a,plan:{greenPath:i}}=nc().value,o=oS(),s=iS(),l=n.current.value,c=t.currentUrl.value.normalizedPath,u=r(()=>i.filter(e=>!e.skipOverPage||!e.skipOverPage(l)),[i,l]),d=u.find(e=>e.route===c)??a,p=r(()=>{const t=u.findIndex(e=>e.id===d?.id);return[...o.value&&s.value?[{id:"cart",to:o.value.toString(),content:e.translate("general.cart"),disabled:!1}]:[],...u.map((e,n)=>({id:e.id,to:e.route,content:e.label,disabled:!!d&&n>t}))]},[o.value,s.value,e,u,d]),m=d?.id;return aB.current={ids:p.map(({id:e})=>e).join(","),activeId:m,showCartLink:s.value,hasCartUrl:Boolean(o.value)},{breadcrumbs:p,activeBreadcrumb:m}}(),A=P||S||w||C||I.length<2||E.value,T=d(hB,{children:e});return d(y,{children:[d(qT,{}),d(LC,{banner:d(gx,{}),announcement:"thankYou"===s?.type&&f.length>0?d(fx,{}):void 0,header:_?d(b,{}):void 0,disclosure:l?void 0:d($I,{}),disclosureOrderSummary:l?void 0:d(iz,{monorailSection:"top_order_summary"}),main:T,orderSummary:d(iz,{}),footer:k?d(bT,{}):void 0,buyerJourney:A?void 0:d(iB,{active:x,breadcrumbs:I})}),d(ST,{}),d(jT,{}),d(HT,{}),d(mT,{customizations:g,transformComponents:yB,render:e=>d(Nf,{minBlockSize:"@media (inline-size >= medium) 0, 72px",children:e})})]})}function hB({children:e}){const{checkout:t}=ie(),{blocking:n}=oB(),r=uz();return d(y,{children:[d(Gz,{}),d(WT,{active:n.value||r.value,announceProcessing:n.value||!t.checkoutExit.isExiting.value,showLoadingIndicator:n.value,children:[d(Wz,{}),d(Jf,{gap:"base",children:[d(MO,{section:"toast"}),d(MO,{section:"top"}),d(nB,{}),d(fB,{children:e})]})]})]})}function gB({condition:e,children:t}){return e?d(XT,{accessibilityRole:"presentation",children:t}):d(y,{children:t})}function fB({children:e}){const{checkout:t,router:n,shop:a}=ie(),{pending:i}=Fw(),o=n.currentUrlMatches("/shipping"),s=n.currentUrlMatches("/payment"),l=n.currentUrlMatches("/review"),c="/review"===n.currentUrl.value.normalizedPath,u=o||s||l,p=c&&a.hasFlagEnabled(Is),{value:m}=t.negotiator.current.fields.deliveryNext,h=t.proposal.facts.delivery??[],g=pn(m)||h.length>0&&h.every(e=>null!==e.pickupAddress),{value:f}=At(),v=vn("total").value,{value:_}=t.negotiator.current.fields.paymentLines,b=vn("paymentLines").value,k=r(()=>!!l&&(v||b||(f?.amount?f.amount>0:_?.lines&&_.lines.some(e=>e.cost?.amount))),[l,f,_,v,b]);return d(Bw,{style:p?void 0:i,children:d(gB,{condition:u,children:d(y,{children:[u&&d(y,{children:[d(pE,{showAddress:!g,showPayment:k}),d(kN,{blockSize:"large-400"})]}),d(Nf,{children:e})]})})})}const yB=FT(ix);function vB(){const{checkout:e}=ie(),{billingAddressOption:t,shippingAddress:n}=e.negotiator.parts;P(()=>{e.isShippingRequired.value&&!n.value.oneTimeUse||(t.value="custom")})}function _B(){const{shop:e,source:t,checkout:n}=ie(),{billingAddressOption:r,paymentLines:i}=n.negotiator.parts,o=n.negotiator.current.fields.buyerIdentity.value?.purchasingCompany,{value:s}=n.negotiator.current.fields.deliveryNext,l=vn("deliveryNext").value;a(()=>{const a=i.value[0],c=s;if(l||!c||"filled"!==c.status||!a)return;const u=pn(c),d=Mr(c);if(u||d)return;const p=!u&&n.isShippingRequired.value;As({shopRequireMatchingShippingAndBilling:Boolean(e.requireMatchingShippingAndBilling),selectedPaymentMethodType:a?.method.type,isShippingRequired:p,isOrderSession:Hn(t),isB2B:Boolean(o),isPickupPointDeliveryMethod:d})&&"shipping"!==r.value&&(r.value="shipping")},[i.value,s,l,n.isShippingRequired,e.requireMatchingShippingAndBilling,t,o,r])}function bB(){const{source:e,checkout:n}=ie(),{buyerIdentity:r,deliveryNext:a}=n.negotiator.current.fields,i=nb(),o=Cv(),s=function(){const{checkout:e}=ie();return t(()=>uo(e.proposal))}(),{deliveryLines:l,shippingAddress:c}=n.negotiator.parts;return t(()=>{const t=r.value?.purchasingCompany;return(o.value||rb({checkout:n,source:e})?.pickupAddress)&&!i.value||Mr(a.value)||l.value.flatMap(e=>e.value.deliveryMethodTypes).includes("PICKUP_POINT")||!Hn(e)&&!n.isShippingRequired.value&&!t||Hn(e)&&!s.value||t&&!n.addressManager.billing.value.suggestedAddress.value.type||c.value.oneTimeUse?"form":"selector"})}function kB(){const{checkout:e,source:n}=ie(),{billingAddressOption:r,billingAddress:a}=e.negotiator.parts;return t(()=>{const t=e.negotiator.current.fields.paymentLines.value,i=e.negotiator.current.fields.shippingAddress.value,o=e.proposal.facts.delivery??[],s=o.length>0&&o[0].deliveryAddress?o[0].deliveryAddress:void 0,l=e.negotiator.current.fields.buyerIdentity.value?.purchasingCompany,c=t?.lines?.find(e=>
2e.method.type===pe.CreditCard);return c?c.method.billingAddress:"billing"===r.value&&l?.location.billingAddress?l.location.billingAddress:"shipping"===r.value&&l?.location.shippingAddress?l.location.shippingAddress:"shipping"===r.value?Hn(n)?s:i:a.value})}function PB(){const{checkout:{negotiator:e}}=ie(),t=e.current.fields.paymentLines?.value?.lines,{hasViolations:n,violations:r}=Jy(new Set(["PAYMENTS_SHIPPING_MUST_MATCH_BILLING"])),a=Boolean(Nt(t,"APPLE_PAY"));if(n&&!a)return r.values().next().value.localizedMessage}function SB(){const{shop:e,source:n,checkout:r}=ie(),a=Cv(),{paymentLines:i}=r.negotiator.parts,{buyerIdentity:o}=r.negotiator.current.fields,s=function(){const{checkout:{negotiator:e}}=ie(),n=e.current.fields.deliveryNext;return t(()=>Mr(n.value))}();return t(()=>{const t=!a.value&&r.isShippingRequired.value,l=i.value[0];return As({shopRequireMatchingShippingAndBilling:Boolean(e.requireMatchingShippingAndBilling),selectedPaymentMethodType:l?.method.type,isShippingRequired:t,isOrderSession:Hn(n),isB2B:Boolean(o.value?.purchasingCompany),isPickupPointDeliveryMethod:s.value})})}function wB(e){const n=e,r=function(e){const{checkout:{negotiator:n}}=ie(),r=n.current.fields.buyerIdentity,a=e?.countryCode&&my.includes(e.countryCode),i=T(hy(e,a?{hiddenFields:["phone","company"],multiline:!1,countryFormat:"explicit"}:{hiddenFields:["phone","company","firstName","lastName"],multiline:!1,countryFormat:"explicit"}));return t(()=>{if(r.value?.purchasingCompany)return i.value})}(n),a=hy(n,n?.countryCode&&my.includes(n.countryCode)?{countryFormat:"explicit"}:{hiddenFields:["firstName","lastName"],countryFormat:"explicit"});return r.value??a}function CB(){const{checkout:e}=ie(),{shippingAddress:n}=e.negotiator.parts;return t(()=>(e.proposal.facts.delivery??[])[0]?.deliveryAddress??n.value)}function EB(){const{negotiate:e}=rc(),{checkout:{wallets:t,negotiator:r}}=ie(),{billingAddress:o,billingAddressOption:s}=r.parts,l=i(void 0),c=n(()=>{e({silenceViolations:Fe(["billingAddress"])})},[e]),u="custom"===s.value?o.fields.countryCode.value:void 0;return a(()=>{!t.activeSession.value&&"custom"===s.value&&u&&u!==l.current&&(l.current=u,c())},[s.value,u,c,t.activeSession.value]),c}const xB="b2b",IB="not_b2b";function AB(){const{checkout:{negotiator:e}}=ie(),{paymentMethods:t}=e.current.fields;return LB(t)}function TB(){const{checkout:{negotiator:e}}=ie(),{paymentLines:n}=e.parts;return LB(t(()=>n.value.map(e=>e.method)))}function LB(e){const{client:n,checkout:{identity:r,negotiator:a},shop:i,shopPay:o,source:s}=ie(),l=Gv(),c=LT(),u=i.hasFlagEnabled(Ts),d=qi(["STORE_CREDIT","CUSTOM"]),{buyerIdentity:p,paymentMethods:m}=a.current.fields;return t(()=>{if(!c.value)return!1;if("shopPay"===r.current.value)return!1;if(d.value)return!1;const t=e.value??[];if(p.value?.purchasingCompany){const e=m.value?.some(e=>"direct"===e.type&&"shopify_payments"===e.name),r=t.some(t=>"direct"===t.type&&(e||i.storeVaultEnabled)),a=t.some(e=>function(e,t){if("bank"!==e.type)return!1;if("supportsVaulting"in e)return e.supportsVaulting;const n=NB(e,t);return!!n?.supportsVaulting&&(!(!("selectedToken"in e)||!e.selectedToken)&&"SHOPIFY_PUBLIC_TOKEN"!==e.selectedType)}(e,m.value??[]));return function(e,t){return"cartNext"===e.type||"simulated"===e.type||"b2b"===t.unstable_getSerialization("invoiceLoginType")&&mb(e)}(s,n)&&(r||a)}return i.storeVaultEnabled&&function({paymentMethods:e,paypalVaultingEnabled:t,negotiatedPaymentMethods:n,isShopPayAvailableForSellerOfRecord:r,shopPayDismissed:a,buyerIdentity:i}){const o=!a&&!i.value?.customerProfile&&r.value;if(!t&&o)return!1;const s=n.value??[],l=e.map(e=>NB(e,s)).filter(e=>void 0!==e);return!(!t||!l.some(e=>"wallet"===e.type&&"PAYPAL_EXPRESS"===e.name&&e.supportsVaulting))||!o&&l.some(e=>"direct"===e.type&&e.supportsVaulting)}({paymentMethods:t,paypalVaultingEnabled:u,negotiatedPaymentMethods:m,buyerIdentity:p,isShopPayAvailableForSellerOfRecord:l,shopPayDismissed:o.userIdentified.value})})}function NB(e,t){return"direct"===e.type?t.find(t=>"direct"===t.type&&t.paymentMethodIdentifier===e.paymentMethodIdentifier):"wallet"===e.type&&"PAYPAL_EXPRESS"===e.name?t.find(t=>"wallet"===t.type&&"PAYPAL_EXPRESS"===t.name&&(!e.walletContent||t.paymentMethodIdentifier===e.walletContent.paymentMethodIdentifier)):"bank"===e.type?t.find(t=>"bank"===t.type&&t.paymentMethodIdentifier===e.paymentMethodIdentifier):void 0}function RB({fullyCoveredByGiftCard:e,fullyCoveredByRedeemablesAndGiftCards:t,paymentRequired:n,identity:r,isOrderSession:a,isPickupSelected:i,isShippingRequired:o,vaultedDelivery:s,isPointOfSaleLayout:l,purchasingCompany:c,paymentLines:u,billingAddressOption:d,paymentMethods:p,orderEditHasPickupAddress:m,isForceBillingAddressFormEnabled:h}){const g=!i&&o,f=u[0],y="direct"===f?.method.type,v="wallet"===f?.method.type&&"APPLE_PAY"===f?.method.name&&!c,_="wallet"===f?.method.type&&"PAYPAL_EXPRESS"===f?.method.name&&Ns(p)&&!h,b=Rs({lines:u,paymentMethods:p,purchasingCompany:c,isBillingAddressForced:h})||!g,k="CREDIT_CARD_ON_FILE"===f?.method.type,P=Ms(p).length>0&&k;if(n&&(!b||v||_||P))return"hidden";if(c&&n&&!t)return function(e){if(!e)return!1;const t=Boolean(Nt([e],"PAYPAL_EXPRESS")),n=Boolean(Nt([e],"APPLE_PAY")),r=["direct","giftCard","redeemable","walletsPlatform","wallet","noop","deferred","other",...Object.values(pe)];return t||n||!r.includes(e.method.type)}(f)?"afterPayment":"inContext";if(l)return"afterPayment";if("shopPay"===r&&s)return"inContext";const S="wallet"===f?.method.type||"walletsPlatformPaymentMethod"===f?.method.type;return!n||e||t?g&&!S&&"shipping"===d?"hidden":"afterPayment":a?m?"afterPayment":o&&y?"inContext":"afterPayment":g&&y?"inContext":"afterPayment"}function MB(){const e=Ls(),n=qi(),r=LT(),{source:a,checkout:i,shop:o}=ie(),s=Cv(),l=px(),c=Yg(),{buyerIdentity:u,paymentMethods:d}=i.negotiator.current.fields,{paymentLines:p,billingAddressOption:m}=i.negotiator.parts;return t(()=>RB({fullyCoveredByGiftCard:e.value,fullyCoveredByRedeemablesAndGiftCards:n.value,paymentRequired:r.value,identity:i.identity.current.value,isOrderSession:Hn(a),isPickupSelected:s.value,isShippingRequired:i.isShippingRequired.value,vaultedDelivery:l.value.delivery,isPointOfSaleLayout:c.value,purchasingCompany:Boolean(u.value?.purchasingCompany),paymentLines:p.value,billingAddressOption:m.value,paymentMethods:d.value,orderEditHasPickupAddress:Boolean(rb({checkout:i,source:a})?.pickupAddress),isForceBillingAddressFormEnabled:!Wl({shop:o,checkout:i,paymentMethods:d.value})}))}function DB({children:e}){const{checkout:n,embed:r,shop:a,shopPay:o,source:s}=ie(),{billingAddress:l,billingAddressOption:c,email:u,paymentLines:p,phone:m,shippingAddress:h}=n.negotiator.parts,{buyerIdentity:g,shippingAddress:f}=n.negotiator.current.fields,y=r?.isFlagshipPartner,v=Ds(),_=tb(),b=Uc(),k=i(!1),P=i(!1),S=Ky(wa),w=Qy(wa),C=Xy(wa),E=AB(),x=LT(),I=Ls(),A=qi(),L=Cv(),N=Yg(),R=SB(),{shippingCountries:M}=a,D=ct(),O=f.value,z=ky(O?.countryCode,M),B=T(z),V=i(),F=Os(),U=t(()=>Wl({shop:a,checkout:n,paymentMethods:n.negotiator.current.fields.paymentMethods.value})),q=t(()=>{const e=n.identity.current.value,t=B.value,r=_.value;if(!k.current){const e=S.violations.value;k.current=e.size>0&&!zs(e)}if(P.current||(P.current=w.violations.value.size>0||null!==n.wallets.escalatedWallet.value&&C.violations.value.size>0),"sdkCartHints"===e&&"sdkCartHints"===V.current?.identitySource)return V.current.sections;function i(e){return"CustomerProfile"===e?.__typename}const d=e=>!n.isShippingRequired.value&&Boolean(l.value)&&!l.value?.[e]?.trim();function T(){switch(e){case Bs:return!1;case"amazonPay":case"businessCustomer":case"buyWithPrime":return!0;case"shopPay":return o.user.isAuthenticatedUser.value;case"sdkCartHints":return!!y||u.value.length>0||m.value.length>0;case"customerAccount":return!(i(g.value?.customerProfile)&&!g.value.customerProfile.email)&&u.value.length>0;default:return u.value.length>0}}const M={contact:T(),delivery:function(){const a=f.value,s=h.value,l=n.proposal.negotiated.fields.availableDeliveryAddresses.value??[];switch(e){case Bs:return l.length>0;case"customerAccount":{const e=g.value;return l.length>0||!(null==e||!i(e?.customerProfile)||(u=e?.customerProfile,0===u.shippingAddresses.length)||function(e){return 1===e.shippingAddresses.length&&t(e.shippingAddresses[0].address,"shipping").size>0}(e?.customerProfile)||function(e,t,r){return!(function(e,t,n){return!e&&t&&n.shippingAddresses.length>0}(t,r,e)||!t&&!r||function(e){if(i(e)){const e=n.addressManager.shipping.value;return Boolean(e.selectedAddress.value)}return!1}(e))}(e.customerProfile,a,s))}case"shopPay":return o.user.addresses.value.length>0||l.length>0;case"sdkCartHints":return!!n.configuration.isAddressDelegationEnabled||T()&&null!=(c=a)&&0===t(c,"shipping").size;case"businessCustomer":return!(b.value&&!r);default:return!0}var c,u}(),payment:function(){const t=Boolean(n.negotiator.current.fields.paymentFlexibilityPaymentTermsTemplate.value);switch(e){case Bs:return!1;case"shopPay":{const e=o.user.paymentMethods.value;return x.value||n.isShippingRequired.value?!o.enableCardVaulting||e.some(qs):o.user.addresses.value.length>0}case"sdkCartHints":return n.configuration.isPaymentInstrumentsDelegationEnabled;case"businessCustomer":{const r=g.value?.customerProfile;if(Hn(s)||!Us(r))return!1;const i=t||D.value;
2return!!Vs({identitySource:e,isOrderSession:Hn(s),storeVaultEnabled:a.storeVaultEnabled,customerProfile:r,hasCustomerStoredPaymentMethod:Fs({availablePaymentMethods:n.negotiator.current.fields.paymentMethods.value??[],paymentMethodHistory:n.negotiator.current.fields.paymentMethodHistory?.value??[]})})||(Boolean(Ms(n.negotiator.current.fields.paymentMethods.value).length)||i&&!E.value)}case"customerAccount":{if(Vs({identitySource:e,isOrderSession:Hn(s),storeVaultEnabled:a.storeVaultEnabled,customerProfile:void 0,hasCustomerStoredPaymentMethod:Fs({availablePaymentMethods:n.negotiator.current.fields.paymentMethods.value??[],paymentMethodHistory:n.negotiator.current.fields.paymentMethodHistory?.value??[]})}))return!0;const r=1===F.value.length&&"deferred"===F.value[0].type;return Boolean(t&&r)}default:return v.value.length>0||p.value.length>0}}(),billing:function(){switch(e){case"shopPay":{const e=o.session.selectedPaymentMethod.value,t=Vi({managedByMarketsPro:n.negotiator.current.fields.managedByMarketsPro.value})&&"IDEAL"===e?.paymentMethod,r="CUSTOM_ONSITE"===e?.paymentMethod,a=!o.user.hasCreditCards.value,i=p.value.some(e=>"direct"===e.method.type);if(a&&i)return!1;const s=d("phone"),l=d("firstName");return!x.value||l||s||t||r}case"amazonPay":case"buyWithPrime":return k.current;case"applePay":case"googlePay":return P.current;case"payPal":return!U.value||P.current;case"customerAccount":case"businessCustomer":return!Hn(s)&&function(e){const t=RB(e),n="beforePayment"===t||"afterPayment"===t,r=e.paymentLines[0]?.method.type,a=r===pe.CreditCard||r===pe.PayPal;return n&&!e.billingMustMatchShipping&&!a}({fullyCoveredByGiftCard:I.value,fullyCoveredByRedeemablesAndGiftCards:A.value,paymentRequired:x.value,identity:e,isOrderSession:Hn(s),isPickupSelected:L.value,isShippingRequired:n.isShippingRequired.value,vaultedDelivery:!1,isPointOfSaleLayout:N.value,purchasingCompany:Boolean(g.value?.purchasingCompany),paymentLines:p.value,billingAddressOption:c.value,paymentMethods:n.negotiator.current.fields.paymentMethods.value,orderEditHasPickupAddress:Boolean(rb({checkout:n,source:s})?.pickupAddress),isForceBillingAddressFormEnabled:!U.value,billingMustMatchShipping:R.value});default:return!1}}()},O=V.current,z=O?.identitySource===e&&function(e,t){return e.contact===t.contact&&e.delivery===t.delivery&&e.payment===t.payment&&e.billing===t.billing}(O.sections,M);return z?O.sections:(V.current={identitySource:e,sections:M},V.current.sections)}),j=a.hasFlagEnabled(js)?n.vaultedSections.signal:q;return d(dx.Provider,{value:j,children:[d(Wz,{}),e]})}const OB=E(function(){const{checkout:{configuration:{layout:e}},router:t}=ie();!function(){const{shop:e,client:t,shopPay:n,checkout:{identity:r},source:{checkoutSessionIdentifier:i},url:o}=ie(),s="shopPay"===r.current.value,l=parseInt(le(e.id),10);a(()=>{i&&async function(){const e=new URL(o.privateAccessToken(s,l));e.searchParams.set("id",i),e.searchParams.set("checkout_type","c1");const r=ni({serializations:{get:e=>t.unstable_getSerialization(e)},isShopApp:n.isShopServerOrigin});r?.uniqueToken&&e.searchParams.set("_y",r.uniqueToken),r?.visitToken&&e.searchParams.set("_s",r.visitToken);try{await fetch(e)}catch{}}()},[i,l,s,o,t,n])}();const n=e.isOnePage.value,i=r(()=>[{match:"/processing",render:()=>d(y,{children:[d(VE,{}),d(WE.Preload,{})]})},{match:"/throttle",render:()=>n?d(GE,{}):d(y,{children:[d(GE,{}),d(mE.Preload,{})]})},{match:"/post-purchase",render:()=>d(BE,{}),renderPrefetch:()=>d(BE.Prefetch,{})},{render:({children:e})=>d(y,{children:[d(dE,{}),d(DB,{children:d(n?Fz:uB,{children:e})})]}),children:[{match:"/thank-you",render:()=>d(WE,{}),renderPrefetch:()=>d(WE.Prefetch,{})},{match:"/offsite-payment-failed",render:()=>d(yE,{}),renderPrefetch:()=>d(yE.Prefetch,{})},...n?[{match:"/shoppay_login",render:()=>d(qE,{})},{match:"/review",render:()=>d(_E,{}),renderPrefetch:()=>d(_E.Prefetch,{})},{match:"/no-address-location",render:()=>d(gE,{})},{render:({children:e})=>d(y,{children:[d(vE,{children:e}),d(WE.Preload,{})]}),children:[{match:"/stock-problems",render:()=>d(HE,{})}]}]:[{match:"/information",render:()=>d(y,{children:[d(mE,{}),d(pE.Preload,{})]}),renderPrefetch:()=>d(mE.Prefetch,{})},{match:"/shipping",render:()=>d(UE,{}),renderPrefetch:()=>d(UE.Prefetch,{})},{match:"/payment",render:()=>d(y,{children:[d(zE,{}),d(WE.Preload,{})]}),renderPrefetch:()=>d(zE.Prefetch,{})},{match:"/review",render:()=>d(y,{children:[d(FE,{}),d(WE.Preload,{})]}),renderPrefetch:()=>d(FE.Prefetch,{})},{match:"/stock-problems",render:()=>d(jE,{})},{match:"/no-address-location",render:()=>d(hE,{})},{render:()=>d(fE,{})}]]}],[n]);return J(t,i)});class zB extends g{componentDidCatch(e){this.props.terminalErrorHandler.notify(e,{inErrorBoundary:!0})}render(){return this.props.children||null}}function BB(e){const t=[];
2return e.__k?(e.__k.forEach(e=>{e&&"function"==typeof e.type?t.push(...BB(e)):e&&"string"==typeof e.type&&t.push(e)}),t):t}function VB(e,t){const{props:n}=e,r=function(e){return e.type===y?"Fragment":"function"==typeof e.type?e.type.displayName||e.type.name:"string"==typeof e.type?e.type:"#text"}(e);let a="";for(const o in n)if(n.hasOwnProperty(o)&&"children"!==o){let e=n[o];"function"==typeof e&&(e=`function ${e.displayName||e.name}() {}`),e=Object(e)!==e||e.toString?String(e):Object.prototype.toString.call(e),a+=` ${o}=${JSON.stringify(e)}`}const i=n.children;return`<${r}${a}${t||i&&Array.isArray(i)&&i.length?`>${t||".."}</${r}>`:" />"}`}function*FB(e,t){let n=e,r=0;for(;n&&r<50;)yield n,n=t(n),r+=1}const UB=/\(.+\)/;function qB(e,t=10){let n=null;const r=[];for(const a of FB(e.__??null,e=>e.__??null)){const e="function"==typeof a.type&&a.type!==y;if(e&&!n&&(n=a),r.length<t)if(e){const{displayName:e}=a.type;e&&!UB.test(e)&&r.push(e)}else"string"==typeof a.type&&r.push(a.type);else if(n)break}return{closestFunctionParent:n,breadcrumb:r}}
2const jB=/^[a-zA-Z][\w-]{0,63}$/;function HB(e){return jB.test(e)?/\d{4,}/.test(e)||e.split(/[_-]/).some(e=>e.length>=8&&/[a-zA-Z]/.test(e)&&/\d/.test(e))?null:e:null}const $B="https://redacted.invalid";function YB(e){let t;try{t=new URL(e,$B)}catch{return null}return"null"===t.origin?t.protocol.replace(/:$/,""):t.origin===$B?null:t.origin}function WB(e,t=10){const n=e instanceof Element?e:e?.parentElement??null,r=[];for(const a of FB(n,e=>e.parentElement)){const e=a.getAttribute("id"),n=a.getAttribute("data-testid"),i=null==e?null:HB(e),o=null==n?null:HB(n),s=a.getAttribute("role");if((i||o||s)&&r.push(`${a.localName}${i?`#${i}`:""}${o?`[${o}]`:""}${s?`(${s})`:""}`),r.length>=t)break}return r}const GB=new Set(["type","className","id","role","name","data-testid","data-alternate-values","alternateValues","direction","gap","alignItems","justifyContent","inlineSize","padding","borderRadius","borderWidth","display","condition","gridAutoFlow","gridTemplateColumns","gridTemplateRows","size","color","letterCase","translate","variant","loading","wallet","shopPayEmphasis","hideWallets"]);function JB(e){return GB.has(e)||e.startsWith("aria-")}function KB(e){const t={};for(const n in e.props)if(Object.prototype.hasOwnProperty.call(e.props,n)){const r=e.props[n];"href"===n&&"string"==typeof r?t[n]=YB(r)??"[redacted]":JB(n)?t[n]="id"===n&&"string"==typeof r||"data-testid"===n&&"string"==typeof r?HB(r)??"[redacted]":r:t[n]="[redacted]"}return{...e,props:t}}function QB(e){if("function"!=typeof e)return null;const t=e;return t.displayName||t.name||null}function XB(e){const t=[];for(const{name:n}of e)t.includes(n)||t.push(n);return t}const ZB=["id","name","type","role","href","action"],eV=["font[_mstmutation]",".bb-custom-select-container",".bb-customSelect",'[id$="burner-mail-btn"]',".v-dialog__container",".v-snack"].join(", "),tV=new Set([23428825089,45711851521,66006450177,76695699457,106403332097,106885808129,135675215873,136552710145,174633091073,174633418753,174633648129,174633844737,258397700097,260513136641,304348790785,316208381953]);function nV(e,{parent:t,observability:n,debugMode:r,deployStage:a,userAgent:i,serverUserAgent:o,apiClientId:s,page:l,mismatchContext:c}){!function(e){if(!e)return;const t=K.diffed,n=[];K.diffed=e=>{const r=e.__k&&e.__k.some(e=>e&&(!e.type||"string"==typeof e.type)),a=BB(e);if(!n.includes(e.type)&&r&&a&&a.filter(e=>e&&!e.type).length>1){const t=[];for(const r of a)r&&!r.type?t.push(`"${r.props}"`):r&&"string"==typeof r.type&&(t.length>1&&(n.push(e.type),console.warn(`Detected adjacent text-nodes ${t.join(", ")}.\nThis doesn't need to be actioned on but could lead to causes of hydration mismatches.\nText-nodes located in\n${VB(e.__,VB(e))}`)),t.length=0)}t?.(e)}}(r),Hs.current=!0;const u=function(){const e=new WeakSet;return{register(t,n){const r=n instanceof Element?n:null,a=n?.parentElement??null;let i=!1;for(let o=r??a;o;o=o.parentElement)if(e.has(o)){i=!0;break}if(!i)for(let o=t;o;o=o.__)if(e.has(o)){i=!0;break}r&&e.add(r),a&&e.add(a),e.add(t);for(let o=t.__;o;o=o.__)if("string"==typeof o.type){e.add(o);break}return i}}}(),d=K.__m;K.__m=(e,t)=>{if("string"==typeof e.type){const d=e.type,m=(e=!1)=>t.map(t=>{if(t instanceof Text)return`Text: ${e?"[redacted]":t.data}`;if(t instanceof Element){const n=t.getAttribute("id");let r=n;return null!=n&&e&&(r=HB(n)??"[redacted]"),`<${t.localName}${null==r?"":` id=${r}`} class=${t.getAttribute("class")}>`}return null}).filter(Boolean),{closestFunctionParent:h,breadcrumb:g}=qB(e),f=t.find(Boolean)??e.__e??null,y=WB(f??e.__?.__e??null);if(r){console.group("ð± Hydration mismatch"),console.log(`Detected a hydration mismatch for an element with type ${d}\n${VB(e)}`),h&&"function"==typeof h.type&&console.log(`The closest function parent is ${VB(h)}`),g.length&&console.log(`Component path: ${g.join(" < ")}`),y.length&&console.log(`DOM ancestry: ${y.join(" < ")}`);const t=m();t.length?console.log(`The different DOM nodes available compared to the hydrated ones were ${t.join(", ")}`):console.log("There were no available DOM nodes, this could be due to a prior mismatch."),console.log("â¹ï¸ Learn about hydration mismatches: https://videobin.shopify.io/v/gvR4rL"),console.groupEnd()}const v=m(!0),_=h&&"function"==typeof h.type?VB(KB(h)):void 0,b=null!=o&&o!==i,k=function({apiClientId:e,excessDomChildren:t,hasPriorMismatch:n,serverUserAgent:r,userAgent:a}){if(n)return!1;if(null!=e&&tV.has(e))return!1;if(null!=r&&r!==a)return!1;if($s(a))return!1;if(a.match(/musical_ly|BytedanceWebview/))return!1;if(a.split(" ").includes("Playwright-checkout-e2e-tests/local"))return!1;if(a.includes("HeadlessChrome"))return!1;const i=Element.prototype.matches;return"function"!=typeof i||t.every(e=>!(e instanceof Element&&i.call(e,eV)))}({apiClientId:s,excessDomChildren:t,hasPriorMismatch:u.register(e,f),serverUserAgent:o,userAgent:i}),P=XB(p),S=l();n.log("hydration_mismatch",`Hydration mismatch for <${d}>`,{...c?.(),domType:d,mismatchedVNode:VB(KB(e)),closestFunctionParent:_,vNodePath:g.length?g.join(" < "):void 0,domPath:y.length?y.join(" < "):void 0,availableNodeTypes:v||void 0,hasDomNodes:v.length>0,isHydrating:Hs.current,hasInProgressBoundaries:p.length>0,suspendedAtCapture:P.length?P.join(","):void 0,isActionable:k,isUADivergent:b,page:S}
2),k&&"tophat"!==a&&n.counter({name:"hydration_mismatch",value:1,attributes:{page:S}})}d&&d(e,t)};const p=[],m=function({observability:e,debugMode:t,inProgressBoundaries:n}){const r=[],a=new WeakMap;let i=!1;const o=K.diffed;return K.diffed=e=>{if("string"==typeof e.type&&Hs.current&&e.props&&e.__e instanceof Element){const t=e.props;for(const i of ZB){const o=t[i];if("string"!=typeof o)continue;if(e.__e.getAttribute(i)===o)continue;let s=a.get(e.__e);if(s?.has(i))continue;s||(s=new Set,a.set(e.__e,s)),s.add(i);const l=XB(n),{closestFunctionParent:c,breadcrumb:u}=qB(e),d=c?QB(c.type):null,p=WB(e.__e);r.push({attr:i,tag:e.type,reactValue:o,domElement:e.__e,suspendedAtCapture:l,closestFunctionParent:d,vNodePath:u,domPath:p})}}o?.(e)},{flushAndTeardown:()=>{if(K.diffed=o,!i){i=!0;for(const{attr:n,tag:a,reactValue:i,domElement:o,suspendedAtCapture:s,closestFunctionParent:l,vNodePath:c,domPath:u}of r){if(!o.isConnected)continue;const r=o.getAttribute(n);if(r===i)continue;const d=s.length>0;t&&console.warn(`ð·ï¸ Attr mismatch on <${a} ${n}>: Preact="${i}" vs DOM="${r}" [suspended=${s.join(",")||"none"}, parent=${l??"unknown"}, domPath=${u.join(" < ")||"unknown"}]`),e.log("attr_mismatch",`Preact ${n} !== DOM ${n} at hydration`,{attr:n,tag:a,reactValue:GB.has(n)?i:"[redacted]",domValue:GB.has(n)?r:"[redacted]",suspendedAtCapture:d?s.join(","):void 0,closestFunctionParent:l??void 0,vNodePath:c.length?c.join(" < "):void 0,domPath:u.length?u.join(" < "):void 0}),e.counter({name:"attr_mismatch",value:1,attributes:{attr:n,tag:a,hadSuspendingBoundaries:d,closestFunctionParent:l??"unknown"}})}r.length=0}}}}({observability:n,debugMode:r,inProgressBoundaries:p}),{teardown:h}=((e,t,n,r)=>{const a=e=>`${QB(e.type)??""}${e.__b}`;let i=0,o=!1;const s=K.__e;K.__e=(e,n,r)=>{if("function"==typeof n.type&&e&&"function"==typeof e.then&&Boolean(32&n.__u)){const r={name:QB(n.type)??"anonymous",key:a(n)};t.push(r,r),i+=1;let s=!1;o=e,l=()=>{s||(s=!0,i-=1)},Promise.resolve(o).then(l).catch(l)}var o,l;s(e,n,r)};const l=K.diffed;K.diffed=n=>{if("function"==typeof n.type){const r=a(n),i=t.findIndex(e=>e.key===r);if(-1!==i){if(e){const e=BB(n);n.__k&&0===e.length?console.warn(`Suspended VNode ${VB(n)} returned no DOM-children, this causes hydration mismatches.`):n.__k&&e.length>1&&console.warn(`Suspended VNode ${VB(n)} returned > 1 DOM-child, this causes hydration mismatches.`)}t.splice(i,1)}}l?.(n)};const c=K.__c;K.__c=(e,n)=>{!o&&i<=0&&0===t.length&&u(),c?.(e,n)};const u=()=>{o||(o=!0,K.diffed=l,K.__e=s,K.__c=c,Hs.current=!1,r?.())};return{teardown:u}})(r,p,0,m.flushAndTeardown);Q(e,t),0===p.length&&h()}const rV="shop-pay-login-iframe",aV="100%",iV="publickey-credentials-get *",oV=9e4;async function sV(e){if(!document.body?.classList.contains("Loading"))return void bl(document);const t=document.querySelector(".LoadingShell"),n=function(e){if(e?.classList.contains("LoadingShell-variantPartnerInterstitial"))return Reflect.get(window,Symbol.for("Shopify.checkout.partnerInterstitialMinimumVisibleDuration"))}(t);if((n||e)&&(n&&await n,e&&(await e.fill(),kl(),t?.remove()),!document.body?.classList.contains("Loading")))return void bl(document);const r=t?.isConnected?new Promise(e=>{const n=()=>{clearTimeout(r),t.removeEventListener("transitionend",n),t.remove(),e()},r=setTimeout(n,1e3);t.addEventListener("transitionend",n)}):Promise.resolve();document.body.classList.remove("Loading"),performance.mark("checkout:visible",{detail:{devtools:{dataType:"marker",color:"primary-dark",tooltipText:"The critical elements of checkout are visible to the buyer"}}}),await r,bl(document)}function lV(e){Z(e),e.childNodes.forEach(e=>{e.remove()})}class cV extends cl{constructor(){super(...arguments),this.name="UnsafeURLError",this.unactionable=!0}}class uV extends cl{constructor(){super(...arguments),this.name="InsecurePageError",this.unactionable=!0}}const dV=new Set(["https://europesnus.nl","https://europesnus.de","https://europesnus.fr","https://europesnus.se","https://suomi-nikotiinipussit.fi","https://www.suomi-nikotiinipussit.fi","https://www.lankeleisi.se","https://fr.stance.eu.com","https://holysmile.de"]),pV=/^[^.]+\.checkout\.my\.shop\.dev$/i;function mV({isOnePage:e,isShopPay:t,path:n,uiExtensibility:r}){const a=function({isOnePage:e,isShopPay:t,path:n}){switch(n){case"/processing":return[VE];case"/throttle":return[GE];case"/thank-you":return[WE];case"/shoppay_login":return[qE]}if(t||e)return[vE];switch(n){case"/shipping":return[UE,pE];case"/payment":return[zE,pE];case"/review":return[FE,pE];case"/stock-problems":return[jE];default:return[mE]}}({isOnePage:e,isShopPay:t,path:n});return Ps({isOnePage:e,isShopPay:t,path:n})&&a.push(Bz),r.required.value&&a.push(i_,{load:r.ensureEngineLoaded}),a}function hV(e){const t=e.querySelector("nav ol");if(!t)return;const n=Array.from(t.children);return{count:n.length,activeIndex:n.findIndex(e=>"step"===e.getAttribute("aria-current"))}}const gV=Object.freeze(Object.defineProperty({__proto__:null,captureServerBreadcrumb:hV,criticalAsyncComponents:mV,hydrateApp:async function(t,{bootStartTime:n,bootPhaseTimings:r}){const{client:a,terminalErrorHandler:i}=t,s="shopPay"===t.checkout.identity.current.value,l=t.checkout.thankYouEntrance.progress;l?Sl(l,{currentUrl:t.router.currentUrl,latestReceipt:t.checkout.latestReceipt}):wl()&&kl();const c=function({client:e,isShopPayActive:t,isShopPaySdkCheckout:n,observability:r}){if(!t)return;const a={stage:"armed"};return setTimeout(()=>
2{if(_l(document))return;const t=e.unstable_legacyNavigationPerformance,i={shopPaySdkCheckout:n,stage:a.stage,pendingLoaderCount:t.loaderCount},o=performance.now();r.counter({name:"shop_pay_skeleton_stuck",value:1,exportImmediately:!0,attributes:{delayMs:oV,...i}}),r.log("shop_pay_skeleton_stuck","Shop Pay checkout still showing the loading skeleton",{delayMs:oV,...i,loaderPreviouslyRegistered:t.loaderPreviouslyRegistered,appHasContent:Boolean(e.rootElement?.childElementCount),loginFramePresent:Boolean(document.getElementById(rV)),documentReadyState:document.readyState,documentVisibilityState:document.visibilityState,reportedAtMs:Math.round(o)},{exportImmediately:!0}),pl().then(()=>{const e=Math.round(performance.now()-o);r.counter({name:"shop_pay_skeleton_recovered_after_stuck",value:1,exportImmediately:!0,attributes:i}),r.histogram({name:"shop_pay_skeleton_recovery_duration",value:e,attributes:i}),r.log("shop_pay_skeleton_recovered_after_stuck","Shop Pay checkout recovered after its skeleton was reported stuck",{...i,recoveryDurationMs:e},{exportImmediately:!0})}).catch(()=>{})},oV),a}({client:a,isShopPayActive:s,isShopPaySdkCheckout:Ws(t.shopPay),observability:t.observability});await async function(t,{bootStartTime:n,bootPhaseTimings:r}){const{events:a,client:i,router:o}=t;o.prefix instanceof RegExp&&function({pathnamePrefix:e,allowedOrigins:t,client:n,isShopPayActive:r}){const{protocol:a,href:i,host:o,pathname:s,origin:l}=n.initialRequest.url;if("https:"!==a)throw new uV(`Running on an insecure protocol: ${i}`);if(!pV.test(o)&&!r){if(!function(e,t,n){return n.some(n=>{if(t===n)return!0;const r=n.replace(/^https:\/\//,"");return!!t.endsWith(`.${r}`)||t===`https://www.${r}`||!!r.includes("/")&&e.startsWith(n)})||dV.has(t)}(i,l,t))throw new cV(`Running on an unexpected origin: ${i}. Allowed origins: ${t.join(", ")}`);if(!e.test(s))throw new cV(`Running on an unexpected pathname: ${i}. Expected pathname to match: /${e.source}/`)}}({pathnamePrefix:o.prefix,allowedOrigins:i.unstable_getSerialization("shop").origins,client:i,isShopPayActive:"shopPay"===t.checkout.identity.current.value}),Object.defineProperty(window,Symbol.for("Shopify.checkout"),{value:{context:t},writable:!0,configurable:!0,enumerable:!1}),await async function(t,{loadFrom:n,onQuerySettled:r}){const a=Xs(t);if(!a?.requireBusinessCriticalOnly)return;const i=e(ee,a),o=t.checkout.configuration.getProfile({...a,requireBusinessCriticalOnly:!1});try{let e="serialized-cache"===n?await Jl(t.graphql.coreGraphql,a):void 0;if("serialized-cache"===n&&!e)return Kl(t.checkout.configuration.profileKey.peek(),{...a,requireBusinessCriticalOnly:!1}),void s("missing_cached_profile");const r=await Zs(()=>{},{trigger:"initialization",profileRequest:a,graphql:t.graphql.coreGraphql,configuration:t.checkout.configuration,extensibility:t.checkout.extensibility,observability:t.observability,userEvents:t.userEvents,telemetryContext:{source:t.source,shop:t.shop,sessionToken:t.client.unstable_getSerialization("sessionToken")??"",current:t.checkout.proposal.negotiated}});r?.(),e??=await Jl(t.graphql.coreGraphql,a),Kl(t.checkout.configuration.profileKey.peek(),{...a,requireBusinessCriticalOnly:Boolean(e)}),e||s("query_failure")}catch(l){if(t.graphql.coreGraphql.cache.delete(i),Gl(t.observability,l),o){s("preparation_failure");try{t.checkout.extensibility.ui.replace({activatedExtensions:o.activatedExtensions},{keepAlive:!1,reason:"checkout_profile_change"})}catch(c){Gl(t.observability,c)}try{t.checkout.configuration.update({profile:o,requireBusinessCriticalOnly:!1})}catch(c){Gl(t.observability,c)}}}finally{r?.(i)}function s(e){"simulated"!==t.source.type&&t.observability.counter({name:"checkout_profile_unrestricted_fallback",value:1,attributes:{trigger:"initialization",reason:e}})}}(t,{loadFrom:i.initialRequest.isServerRendered?"serialized-cache":"network"});const s=new Gs(t,{bootStartTime:n,bootPhaseTimings:r});s.waitUntil(async function(e){const{checkout:t,router:n}=e,r=mV({isOnePage:t.configuration.layout.isOnePage.value,isShopPay:"shopPay"===t.identity.current.value,path:n.currentUrl.value.normalizedPath,uiExtensibility:t.extensibility.ui}),a=k_(e);a&&r.push(a),await Promise.all(r.map(e=>e.load()))}(t)),a.dispatchEvent(s),await s.allResolved(),a.dispatchEvent(new Js(s))}(t,{bootStartTime:n,bootPhaseTimings:r}),c&&(c.stage="context_ready");const u=performance.now(),p=d(zB,{terminalErrorHandler:i,children:d(dw,{context:t,children:d(OB,{})})});a.initialRequest.isServerRendered&&t.router.shouldHydrateServerRenderedRoute()?function(e,t,n){const r="shopPay"===n.checkout.identity.current.value,a=hV(t);nV(e,{parent:t,observability:n.observability,debugMode:n.environment.debug.preact,deployStage:n.environment.deployStage,userAgent:n.client.userAgent,serverUserAgent:n.client.unstable_getSerialization("serverUserAgent"),apiClientId:n.client.unstable_getSerialization("apiClientId"),page:()=>at(window.location.href,{isShopPayActive:r,shopPay:n.shopPay}),mismatchContext:()=>{const e=o(()=>{const e=n.checkout.configuration.branding.shell.configuration;return{shellHeaderShowHeader:n.checkout.configuration.visibility.showHeader,shellHeaderLogoVisibility:e.header.logo?.visibility,shellHeaderCartLinkVisibility:e.cartLink.visibility,shellHeaderIsShopOnWeb:fr(n.router.currentUrl.value.search),shellHeaderPrefersDarkMode:n.client.prefersDarkMode.value}}),t=o(()=>({cartLinkShopHasStorefront:n.shop.hasStorefront,cartLinkSourceType:n.source.type,cartLinkHasCartReturnUrl:Boolean(n.source.cartReturnUrl)})),r=aB.current,i=r&&{breadcrumbIds:r.ids,breadcrumbActiveId:r.activeId,breadcrumbShowCartLink:r.showCartLink,breadcrumbHasCartUrl:r.hasCartUrl};return{serverCrumbCount:a?.count,serverActiveCrumbIndex:a?.activeIndex,...e,...t,...i}}})}(p,a.rootElement,t):function(e,t){lV(t),X(e,t)}(p,a.rootElement),c&&(c.stage="rendered"),function({client:e,isShopPayActive:t,progress:n,watch:r}){const a=t||Boolean(n),i=new AbortController;if(!a)return void sV();r&&(r.stage="skeleton_wait");const o=()=>{let t;r&&(r.stage="subscribed"),t=e.unstable_legacyNavigationPerformance.on("initialLoadingFinish",()=>{r&&(r.stage="loading_finished"),sV(n),t?.()})},s=e.unstable_legacyNavigationPerformance.on("event",e=>{e.type===Ys&&(i.abort(),o())}),l=e.unstable_legacyNavigationPerformance.on("navigation",()=>{i.abort(),o()});i.signal.addEventListener("abort",()=>{s(),l()})}({client:t.client,isShopPayActive:s,progress:l,watch:c}),async function(e,{hydrateStartTime:t}){const{events:n}=e,r=new Ks(e,{hydrateStartTime:t});n.dispatchEvent(r),await r.allResolved(),n.dispatchEvent(new Qs(r))}(t,{hydrateStartTime:u})},renderTerminalError:function({rootElement:e,terminalErrorPageElement:t}){return n=>async function(e,t){lV(e),Pl(t)||await sV()}(e,t)}},Symbol.toStringTag,{value:"Module"}));
2export{vh as $,ju as A,jf as B,Oy as C,qA as D,gy as E,ZA as F,Dw as G,IS as H,dA as I,M_ as J,$m as K,Wf as L,qx as M,_A as N,L_ as O,s_ as P,A_ as Q,TB as R,Jf as S,SA as T,mT as U,sz as V,Gv as W,qc as X,Mz as Y,bv as Z,kv as _,sC as a,Iu as a$,iD as a0,rh as a1,pv as a2,qN as a3,Ox as a4,FS as a5,US as a6,$S as a7,HS as a8,bD as a9,RL as aA,AL as aB,UN as aC,FL as aD,im as aE,c_ as aF,Nu as aG,Wm as aH,bh as aI,dL as aJ,Lz as aK,hL as aL,jv as aM,pM as aN,lk as aO,eg as aP,Fd as aQ,Ju as aR,UI as aS,Id as aT,FN as aU,bB as aV,CB as aW,EB as aX,vB as aY,Au as aZ,mw as a_,bP as aa,Qm as ab,mm as ac,Pd as ad,Rp as ae,dC as af,lC as ag,ZM as ah,nD as ai,gw as aj,qS as ak,oc as al,Hm as am,yv as an,yu as ao,iN as ap,Bh as aq,BN as ar,Sz as as,zL as at,Rw as au,BL as av,Pw as aw,KL as ax,TL as ay,LL as az,Nf as b,sB as b$,Fp as b0,Lp as b1,Um as b2,Bd as b3,Kc as b4,Jc as b5,Qc as b6,Af as b7,xf as b8,If as b9,hA as bA,vM as bB,NA as bC,LA as bD,ky as bE,Yg as bF,ON as bG,BR as bH,xw as bI,fA as bJ,ID as bK,ZP as bL,Cz as bM,xz as bN,_D as bO,Uc as bP,cv as bQ,kM as bR,Jy as bS,pD as bT,PB as bU,nv as bV,rv as bW,av as bX,MD as bY,iO as bZ,Ky as b_,Cf as ba,jp as bb,Wp as bc,Vw as bd,Yu as be,Ed as bf,kd as bg,eu as bh,Up as bi,oA as bj,wu as bk,Kw as bl,Ob as bm,V_ as bn,B_ as bo,Uw as bp,qw as bq,ac as br,nk as bs,Cb as bt,iI as bu,fh as bv,Wg as bw,ev as bx,ZD as by,Sf as bz,Df as c,Nz as c$,Fy as c0,hz as c1,kh as c2,Ch as c3,fz as c4,Zg as c5,hC as c6,zE as c7,LT as c8,pc as c9,BO as cA,hy as cB,aT as cC,WD as cD,$D as cE,$A as cF,yT as cG,gf as cH,Yp as cI,Px as cJ,tN as cK,Lb as cL,Nb as cM,Rb as cN,Mb as cO,ek as cP,NT as cQ,Bb as cR,RT as cS,ET as cT,TT as cU,IT as cV,Uh as cW,jP as cX,eO as cY,hf as cZ,ck as c_,mc as ca,bf as cb,Pf as cc,Eh as cd,qg as ce,OA as cf,BA as cg,UA as ch,dv as ci,Ud as cj,ph as ck,jL as cl,gL as cm,mL as cn,iv as co,JS as cp,GS as cq,OT as cr,Tv as cs,Rh as ct,Mh as cu,dy as cv,Lh as cw,fI as cx,Dh as cy,zN as cz,kN as d,Cx as d$,JL as d0,Vy as d1,Uy as d2,_S as d3,wA as d4,Kv as d5,SB as d6,bd as d7,Xu as d8,Qu as d9,Np as dA,zp as dB,Dp as dC,jm as dD,Sd as dE,Fh as dF,oz as dG,MB as dH,Cv as dI,px as dJ,rb as dK,_B as dL,Dx as dM,zx as dN,$p as dO,Mx as dP,Vx as dQ,mA as dR,Ax as dS,Nx as dT,Lx as dU,Sx as dV,Ex as dW,wx as dX,xx as dY,Rx as dZ,Bx as d_,RI as da,XD as db,TD as dc,Vv as dd,_O as de,gO as df,vO as dg,GO as dh,wk as di,sI as dj,lI as dk,_h as dl,VO as dm,DO as dn,oD as dp,QO as dq,gm as dr,ud as ds,Od as dt,dm as du,lm as dv,Rd as dw,Vp as dx,yd as dy,gd as dz,xC as e,ak as e$,Tx as e0,YA as e1,pC as e2,vC as e3,Dg as e4,Zw as e5,Qw as e6,fP as e7,Jw as e8,fN as e9,RR as eA,bM as eB,wD as eC,rL as eD,FM as eE,iz as eF,LR as eG,g_ as eH,qP as eI,cc as eJ,uc as eK,ef as eL,Cy as eM,nB as eN,xI as eO,$g as eP,ES as eQ,$E as eR,_y as eS,nb as eT,SO as eU,tb as eV,nI as eW,tI as eX,wh as eY,UE as eZ,iS as e_,qh as ea,hS as eb,CS as ec,AB as ed,Iy as ee,CT as ef,KP as eg,wT as eh,ob as ei,mv as ej,zR as ek,GD as el,my as em,oI as en,kB as eo,wB as ep,dI as eq,ib as er,fC as es,DI as et,hM as eu,EM as ev,xM as ew,EI as ex,MM as ey,SM as ez,sx as f,R_ as f$,SI as f0,Qh as f1,ag as f2,vy as f3,Fw as f4,jg as f5,lT as f6,sT as f7,GP as f8,UP as f9,Ov as fA,qv as fB,wv as fC,xv as fD,EP as fE,Ib as fF,ny as fG,ay as fH,XP as fI,hh as fJ,cg as fK,WR as fL,Iz as fM,Vh as fN,gP as fO,vg as fP,hg as fQ,F_ as fR,Hw as fS,Xw as fT,$w as fU,ec as fV,x_ as fW,hc as fX,ic as fY,jw as fZ,N_ as f_,mx as fa,Pk as fb,Gg as fc,NE as fd,YP as fe,aV as ff,rV as fg,iV as fh,tk as fi,Mv as fj,ry as fk,tO as fl,KD as fm,Bv as fn,nO as fo,oB as fp,rg as fq,jz as fr,Hz as fs,lv as ft,yO as fu,zv as fv,QD as fw,Rc as fx,cI as fy,Fv as fz,yI as g,Yb as g$,aS as g0,wN as g1,ub as g2,Rk as g3,Ih as g4,Iv as g5,Sv as g6,xh as g7,Xm as g8,gC as g9,dO as gA,Uv as gB,pO as gC,MI as gD,yM as gE,_M as gF,UT as gG,II as gH,LI as gI,TE as gJ,bE as gK,PE as gL,kE as gM,EE as gN,xE as gO,AE as gP,OE as gQ,FD as gR,Cg as gS,mh as gT,uk as gU,aL as gV,HL as gW,iL as gX,AI as gY,zb as gZ,Wb as g_,dz as ga,bT as gb,YS as gc,cz as gd,uM as ge,Pv as gf,RS as gg,e_ as gh,mg as gi,dx as gj,Bw as gk,lR as gl,BP as gm,kD as gn,hk as go,by as gp,Ug as gq,gA as gr,wy as gs,sm as gt,rC as gu,zS as gv,yh as gw,Wk as gx,Ev as gy,YL as gz,xT as h,VN as h$,Ok as h0,ik as h1,jS as h2,Zv as h3,yy as h4,zh as h5,fL as h6,nf as h7,uI as h8,ku as h9,qM as hA,VM as hB,rM as hC,jM as hD,_R as hE,vL as hF,ey as hG,Qf as hH,VI as hI,lz as hJ,Pz as hK,AD as hL,LP as hM,Dy as hN,xP as hO,lx as hP,ux as hQ,cx as hR,JP as hS,mO as hT,TP as hU,fO as hV,Xy as hW,DS as hX,Yy as hY,ab as hZ,Oh as h_,Kx as ha,jN as hb,MN as hc,Ck as hd,tS as he,nS as hf,MO as hg,Vg as hh,vA as hi,yA as hj,xA as hk,Fg as hl,Sy as hm,zy as hn,xB as ho,IB as hp,mb as hq,Gb as hr,TI as hs,fM as ht,Hy as hu,Hh as hv,gR as hw,fR as hx,yR as hy,YR as hz,XT as i,mz as i0,Qy as i1,hx as i2,sL as i3,Hb as i4,Th as i5,lB as i6,iR as i7,Zm as i8,Ey as i9,MA as iA,bp as iB,hN as iC,KE as iD,JE as iE,QE as iF,ex as iG,ax as iH,rx as iI,nx as iJ,tx as iK,ZE as iL,XE as iM,yx as iN,gV as iO,Lv as ia,WS as ib,wf as ic,UM as id,UR as ie,tM as ig,AM as ih,Cd as ii,LD as ij,fu as ik,Wu as il,xu as im,zu as io,Dd as ip,Td as iq,Md as ir,yN as is,Ku as it,YT as iu,BI as iv,Fu as iw,HO as ix,Cp as iy,Gu as iz,Vf as j,nc as k,vv as l,Og as m,iT as n,Gw as o,Ql as p,rz as q,Hc as r,jc as s,Nh as t,EL as u,rc as v,lc as w,DT as x,$h as y,VP as z};
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.