1import{q as e,u as i,g as a,z as t,o as s,h as n,k as r,_ as l,w as o,t as c,L as p,p as d,S as u}from"./2c1ab0fe.Bywc2Brn.js";import{L as h,c1 as m,c2 as g,c3 as v,c4 as f,x as b,s as y,m as _,c5 as j,o as k,br as w,ai as S,af as x,ag as D,U as L,i as z,S as P,H as A,c6 as I,f as N,ao as M,a1 as C,j as E,c7 as T}from"./164ad2e3.CwFFCQJV.js";import{T as B}from"./7b0c98ea.Yk4Unznh.js";import{u as G,S as O,D as R}from"./d6447d9e.CI0F5Z3g.js";import{b as F,d as V,c as $,P as q,a as H}from"./0a30a815.DEtwc6D2.js";import{S as U}from"./f51e663e.BAyhFtOU.js";import{c as X,aO as Y,b9 as Q,ap as W,bL as J,v as K,bl as Z}from"./9dba8418.BjFsJfKG.js";import{P as ee}from"./f49d4216.BEJwvB0Q.js";import{a as ie,b as ae,E as te}from"./a422df8c.Bmt6KHDF.js";import{T as se}from"./7e8cd205.ClJW24Zf.js";import{B as ne}from"./0627daf2.BcFsu-gi.js";import{m as re}from"./21cc90a2.DHzOO82q.js";import{b as le,c as oe,u as ce}from"./64de7b49.BjMngIfk.js";import{u as pe}from"./9f047e05.0-EJzRXZ.js";import{u as de,S as ue}from"./71ae3d5c.DB_FveVu.js";import{h as he}from"./17425706.BStFtLxk.js";import"./d0bb51ec.B6dL-tOK.js";import"./app.CGAYdtrm.js";import"./f67abd2c.BWsb-1Zx.js";import"./60a453ce.CEvWNvTm.js";import"./e12db40c.BZEbMADi.js";import"./efa0389a.SKDhWulJ.js";import"./22345fd4.C4C9Ghp6.js";import"./8e79be58.DgAyBROX.js";import"./3ca8ef7e.BBbh135K.js";import"./347b440c.G2p0E6ul.js";import"./9ce08e25.I7a6UgC2.js";import"./47b970b2.C3ZYX1tS.js";import"./a9fa9fda.E2WWXy1c.js";import"./ca3e798e.Dc9DtEXz.js";import"./90e26f5f._ZJMU229.js";import"./31cc568e.95lmLO5k.js";import"./4b1c22b7.B-c0_qEI.js";import"./5fda1420.renPlTOa.js";import"./2bac2c53.DYoWukU7.js";const me="/cdn/shopifycloud/checkout-web/assets/c1/assets/shipping.CG9i_A4v.svg",ge=()=>{const{i18n:e,checkout:a}=X(),t=a.configuration.layout.isOnePage.value,s=i(h,{href:"/information",children:e.translate("shipping.shipping_information_redirect_link")});return i(te,{children:[!t&&i(ie,{children:i("img",{src:me,alt:""})}),i(ae,{children:e.translate("shipping.shipping_information_required_notice",{link:s})})]})},ve=()=>{const{i18n:e,checkout:a}=X(),t=a.configuration.layout.isOnePage.value;return i(te,{children:[!t&&i(ie,{children:i("img",{src:me,alt:""})}),i(ae,{children:e.translate("shipping_errors.shipping_method_not_available_generic.one")})]})};function fe(){const{i18n:d,checkout:{negotiator:u}}=X(),h=m(),{allViolations:v,deliveryNext:f}=u.current.fields,b=Q("deliveryNext"),y=function(){const{userEvents:i}=X(),a=Y();return e((e,t,s)=>{const n={schemaId:"checkout_display_shipping_methods/1.0",payload:{eventTimestamp:t,shopId:a.value.defaultAttributes?.shopId||1,apiClientId:s,promiseRetrievalTime:e}};i.monorailEvent(n)},[i,a.value.defaultAttributes?.shopId])}(),_=a(b.peek()),[,j]=t(),k=a(void 0),w=s(!1),{shippingAddress:S}=u.parts,x=G(j),D=g();n(()=>{w.value=!0},[w]);const L=r(()=>{const e=h.value.shippableDeliveryLines;return e?W(e):[]});l(()=>c(()=>
1{if(b.value)return void(k.current??=Date.now());_.current=!1;const e=k.current;if(null==e)return;const i=Date.now(),a=i-e,t=L.peek()[0]?.methods[0]?.deliveryPromiseProviderApiClientId;if(k.current=void 0,!t)return;const s=K(t);p(()=>{y(a,i,Number(s)),D(a,Number(s))})}),[b,D,L,y]);const z=r(()=>v.value?.some(e=>"target"in e&&e.target.startsWith("$.cart.deliveryGroups[0].deliveryAddress"))),P=r(()=>function({deliveryLoading:e,showLoading:i,hasMounted:a,hasFilledShippingMethods:t}){return e&&i&&(a||!t)}({deliveryLoading:b.value,showLoading:_.current,hasMounted:w.value,hasFilledShippingMethods:"filled"===f.value?.status&&L.value.length>0}));return i(o,{when:()=>!P.value,fallback:i(ee,{text:d.translate("shipping.waiting_on_rate_notice")}),children:i(o,{when:()=>!z.value,fallback:i(ye,{}),children:i(o,{when:()=>!J(S.value),fallback:i(ge,{}),children:i(o,{when:()=>"filled"===f.value?.status,fallback:i(be,{}),children:i(o,{when:()=>L.value.length>0,fallback:i(be,{}),children:i(O,{lines:L.value,loading:x})})})})})})}function be(){const{checkout:{negotiator:e}}=X(),{deliveryNext:a,shippingAddress:t}=e.current.fields,{shippingAddress:s}=e.parts,n=v();return i(o,{when:()=>{const e=s.value,i=n(e);return f({deliveryNext:a.value,proposedAddress:e,negotiatedAddress:t.value,reloadStrategy:i})},fallback:i(ge,{}),children:i(ve,{})})}function ye(){const{router:e}=X();return e.redirect("/information"),null}const _e=e=>i(z,{children:e});function je(){const{i18n:e,checkout:a}=X(),{nextPage:t,previousPage:s}=b(),{progress:n,progressing:l}=y(),{deliveryNext:c,optionalDuties:h}=a.negotiator.current.fields,m=Q("deliveryNext").value,g=e.translate("shipping.shipping_method_title"),v=e.translate("shipping.duties_and_taxes_title"),f=e.translate("general.continue_to_payment_method"),G=a.configuration.layout.isOnePage.value,O=_(),Y=j(),W=le(),J=r(()=>Z(c.value)||W.value.showShipmentBreakdown?"small-400":"base"),K=oe(),{customizationsBefore:ee,customizationsAfter:ie}=ce({hasMultipleDeliveryGroups:K.value.hasMultipleDeliveryGroups,targeted:!1}).value,ae=k("Checkout::Dynamic::Render","DELIVERY1"),te=k("Checkout::Dynamic::Render","DELIVERY2");de({stage:m?ue.Usable:ue.Complete,id:"Shipping"}),pe("shipping");const me=r(()=>null==c.value||"unavailable"===c.value.status);w(e=>{"success"===e.type&&"progression"===e.negotiationStage&&(O("pageSubmit",{timestamp:new Date}),Y({type:"page_submit",page:"shipping"}))});const ge=r(()=>Boolean(c.value));d(()=>{ge.value&&p(()=>{O("shippingMethodsFilled",{timestamp:new Date}),Y({type:"shipping_methods_filled"})})});const ve=r(()=>{const e=K.value.onlyDeliveryGroupType;return{groupType:e?re(e):void 0,includeDeliverySelectionGroups:!1}});return i(u,{children:[i(se,{children:e.translate("shipping.title")}),i(S,{onSubmit:()=>n("shipping-page-submit"),disabled:l.value||me.value,implicitSubmit:f,children:i(x,{section:"delivery",children:i(D,{section:"delivery",children:i(F,{children:[i(V,{children:[i(L,{customizations:ae,render:_e}),i(z,{accessibilityLabel:g,children:i(P,{gap:J.value,children:[i(P,{gap:"small-400",children:[i(A,{autoFocus:!G,id:I,level:1,children:g}),he("shipping.shipping_method_notice",e)?i(N,{children:e.translate("shipping.shipping_method_notice")}):null]}),i(P,{gap:"base",children:i(M,{children:[i(o,{when:()=>W.value.showShipmentBreakdown,children:i(B,{children:i(U,{})})}),i(L,{customizations:ee,options:ve.value}),i(fe,{}),i(L,{customizations:ie,options:ve.value})]})})]})}),i(o,{when:()=>h.value?.refuseDutiesPermitted,children:i(z,{accessibilityLabel:v,children:i(P,{gap:"large-200",children:[i(A,{id:`${I}-duties-and-taxes`,level:1,children:v}),i(R,{})]})})}),i(L,{customizations:te,render:_e})]}),i($,{children:[i(q,{children:i(ne,{inlineSize:"fill",disabled:me.value,type:"submit",loading:l.value,size:"large",pixelId:"go_to_next_step",variant:"primary",children:t.label})}),s.route?i(H,{children:i(ne,{href:s.route,variant:"plain",inlineSize:"fill",textDecoration:"none",pixelId:"go_to_previous_step",children:i(P,{direction:"inline",gap:"small-200",alignItems:"center",children:[i(C,{type:"chevron-left",size:"small"}),i(E,{children:s.label})]})})}):null]})]})})})}),i(T.Prefetch,{})]})}
1export{je as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.