PageSourceSearch

https://cdn.lafourche.fr/_next/static/chunks/pages/checkout/delivery-4b089669f2ba8c6a.js

js lafourche.fr collected 2026-09-25 18:43:06 UTC 50,261 bytes, 2 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7363],{26315:(e,s,a)=>{"use strict";a.r(s),a.d(s,{__N_SSG:()=>eU,default:()=>eG});var t=a(6029),l=a(80071),r=a(60750),d=a(79002),i=a.n(d),n=a(55729),c=a(42278),o=a(86786),p=a(22526),f=a(97599),h=a(46072),u=a(1129),x=a(87995),m=a(71161),j=a(86994),b=a(21347),g=a(99314),v=a(35127),y=a(8444),C=a(69764),w=a(53718),N=a(42043),E=a(22469),A=a(26923),S=a(82882),k=a(82281),T=a.n(k),I=a(90352),_=a(88002),P=a(35133);let R=m.A,{publicRuntimeConfig:{mapboxToken:D}}=T()(),M=(0,I.A)(),L=e=>{let{handleClose:s,isOpen:a}=e,{selectPickupPointState:l,sendToSelectPickupPoint:d}=(0,E.H5)(),[c,o]=(0,n.useState)(null),[f,h]=(0,n.useState)(y.XWq),{locale:m,availableCountryLocale:k}=(0,S.A)(),T=(0,n.useRef)({}),{writtenStreet:I,setWrittenStreet:L,suggestedAddresses:O,isSuggestedAddressLoading:F}=(0,w.ZW)({mapboxToken:D,locale:m,sessionToken:M,searchableCountry:k}),{send:H}=r.qn.useActorRef(),{address:q,shippingMethods:z,pickupPoints:U,homePosition:G}=l.context,V=Math.min(U.length-f,y.XWq),B=U.slice(0,f),K=(0,N.useTranslations)("Shipping"),Y=(0,N.useTranslations)("Global");return(0,n.useEffect)(()=>{if(c){var e,s;null==(s=T.current)||null==(e=s[c])||e.scrollIntoView({behavior:"smooth",block:"start"})}},[c]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(x.A,{UNSAFE_className:"select-pickup-modal",externalToggle:s,isOpen:a,isClosable:!0,children:[(0,t.jsx)("h2",{className:"jsx-686fe0a6d837c35 title",children:K("chooseRelayPoint")}),(0,t.jsxs)("div",{className:"jsx-686fe0a6d837c35 container",children:[(0,t.jsx)("div",{className:"jsx-686fe0a6d837c35 search-bar",children:"FR"===q.countryCode&&(0,t.jsx)(R,{isLoading:F,options:(null==I?void 0:I.length)?null==O?void 0:O.map(e=>({id:e.label,label:e.label,value:e})):void 0,handleSelect:e=>{L(e.label),d({type:A.IT.FETCH_POINTS,address:e})},renderInput:e=>(0,t.jsx)(g.A,{...e,rounded:!0,placeholder:"".concat(q.street," ").concat(q.postcode," ").concat(q.city),type:"search",value:I,onChange:async e=>{L(e.target.value)},children:(0,t.jsx)(u.A,{size:P.y3.md})})})}),l.matches({[A.qX.OPENED]:A.qX.POINTS_FETCHING})?(0,t.jsx)(b.A,{}):l.matches(A.qX.GET_ERROR)||!((null==U?void 0:U.length)>0)?(0,t.jsx)("div",{className:"jsx-686fe0a6d837c35 error-no-pickup-found",children:K("noRelayFound")}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"jsx-686fe0a6d837c35 map",children:a&&(0,t.jsx)(C.A,{pickupList:B,pickupFocused:c,setPickupFocused:o,homePosition:G})}),(0,t.jsxs)("div",{className:"jsx-686fe0a6d837c35 drop-off-list-content",children:[(0,t.jsxs)("ol",{className:"jsx-686fe0a6d837c35",children:[l.matches({[A.qX.OPENED]:A.qX.POINTS_FETCHING})&&(0,t.jsx)(b.A,{}),B.map(e=>{let{dayOfWeek:s,pointId:a,pointName:l,street:r,zip:i,city:n,courier:f,distanceFromOrigin:h}=e,u=c===a;return(0,t.jsx)("li",{onClick:()=>o(a),ref:e=>{T.current[a]=e},className:"jsx-686fe0a6d837c35 "+((u?"focused":"")||""),children:(0,t.jsxs)("div",{className:"jsx-686fe0a6d837c35 drop-off-address",children:[(0,t.jsx)("div",{className:"jsx-686fe0a6d837c35 heading",children:(0,t.jsxs)("div",{className:"jsx-686fe0a6d837c35 w-full",children:[(0,t.jsxs)("div",{className:"jsx-686fe0a6d837c35 flex justify-between w-full",children:[(0,t.jsx)("span",{className:"jsx-686fe0a6d837c35 capitalize hxb",children:l.toLowerCase()}),(0,t.jsx)("span",{className:"jsx-686fe0a6d837c35 hxrt distance-from-origin",children:(e=>e.includes(".")?e.replace(".",",")+"\xa0km":e+",0\xa0km")(h.value)})]}),(0,t.jsxs)("div",{className:"jsx-686fe0a6d837c35",children:[(0,t.jsx)("div",{className:"jsx-686fe0a6d837c35 capitalize hxrt",children:r.toLowerCase()}),(0,t.jsxs)("div",{className:"jsx-686fe0a6d837c35 capitalize hxrt",children:[i," ",n.toLowerCase()]})]})]})}),(0,t.jsxs)(j.A.Details,{isInline:!0,children:[(0,t.jsx)(j.A.Summary,{children:(0,t.jsxs)("div",{className:"jsx-686fe0a6d837c35 summary-container",children:[(0,t.jsxs)("div",{className:"jsx-686fe0a6d837c35 summary-title",children:[(0,t.jsx)("span",{className:"jsx-686fe0a6d837c35 summary",children:K("timeSlots")}),(0,t.jsx)(j.A.ExpandIcon,{})]}),(0,t.jsx)(v.A,{dataTestId:"SelectPickup-select-pickup-location",disabled:s.length<=0,block:!1,hasMinWidth:!1,onClick:()=>{var s;let a=(null==(s=z.find(e=>{let{tmsCode:s}=e;return s===f}))?void 0:s.code)||f;d({type:A.IT.SELECT_POINT,shipmentMethodCode:a,pickupAddress:{firstName:"",lastName:"",phoneNumber:"",company:e.pointName,countryCode:q.countryCode,provinceCode:"",provinceName:"",street:e.street,city:e.city,postcode:e.zip},pickupPointSelected:e}),H({type:_.qY.OVERWRITE_SHIPPING_METHOD,shippingMethod:{type:p.fg.PICKUP,pickupPointId:e.pointId,pickupPointLabel:e.pointName,pickupPointCity:e.city,pickupPointStreet:e.street,pickupPointZipCode:e.zip}})},children:K("choose")})]})}),(0,t.jsx)("table",{className:"jsx-686fe0a6d837c35 days",children:(0,t.jsx)("tbody",{className:"jsx-686fe0a6d837c35",children:s.map(e=>{let{day:s,hours:a}=e;return(0,t.jsxs)("tr",{className:"jsx-686fe0a6d837c35",children:[(0,t.jsx)("td",{className:"jsx-686fe0a6d837c35",children:y.BP0[s]}),a.map(e=>(0,t.jsx)("td",{className:"jsx-686fe0a6d837c35",children:e},e))]},s)})})})]})]})},a)})]}),V>0&&(0,t.jsx)(v.A,{onClick:()=>h(e=>e+y.XWq),block:!1,isLoading:!1,className:"btn-see-more",hasMinWidth:!1,children:"".concat(Y("seeMore")," (").concat(V,")")})]})]})]})]}),(0,t.jsx)(i(),{id:"686fe0a6d837c35",children:".summary-container.jsx-686fe0a6d837c35{display:flex;justify-content:space-between;align-items:center;width:100%}.summary-title.jsx-686fe0a6d837c35{width:100px}.flex.jsx-686fe0a6d837c35{display:flex}.justify-between.jsx-686fe0a6d837c35{justify-content:space-between}.w-full.jsx-686fe0a6d837c35{width:100%}.search-bar.jsx-686fe0a6d837c35{margin:var(--space-2)var(--space-4)}.hxrt.jsx-686fe0a6d837c35{color:var(--clr-grey-1)}.drop-off-address.jsx-686fe0a6d837c35{width:100%}.heading.jsx-686fe0a6d837c35{display:flex}.heading.jsx-686fe0a6d837c35,.heading.jsx-686fe0a6d837c35 div.jsx-686fe0a6d837c35{margin-bottom:var(--space-1)}.title.jsx-686fe0a6d837c35{font-size:var(--font-size-2);text-align:center;margin:var(--space-6)var(--space-3)var(--space-4)}ol.jsx-686fe0a6d837c35{padding:0 var(--space-2)var(--space-2)0}ol.jsx-686fe0a6d837c35,.map.jsx-686fe0a6d837c35{list-style:none;counter-reset:drop-off-counter}ol.jsx-686fe0a6d837c35 li.jsx-686fe0a6d837c35{display:flex;padding:var(--space-4);cursor:pointer;margin-bottom:var(--space-2);border:1px solid var(--clr-tertiary-2);border-radius:var(--rd-2)}ol.jsx-686fe0a6d837c35 li.jsx-686fe0a6d837c35,.marker-icon{counter-increment:drop-off-counter}.heading.jsx-686fe0a6d837c35::before{--size:32px;flex-shrink:0}.marker-icon::before{--size:28px;border:2px solid var(--white)}.heading.jsx-686fe0a6d837c35::before,.marker-icon::before{display:block;content:counter(drop-off-counter);font-weight:bold;line-height:var(--size);width:var(--size);height:var(--size);background-color:var(--clr-primary-1);border-radius:50%;text-align:center;margin-right:var(--space-4)}ol.jsx-686fe0a6d837c35 li.focused.jsx-686fe0a6d837c35{background-color:var(--clr-primary-5)}ol.jsx-686fe0a6d837c35 li.focused.jsx-686fe0a6d837c35,.marker-icon.focused{color:var(--black)!important}ol.jsx-686fe0a6d837c35 li.focused.jsx-686fe0a6d837c35::before,.marker-icon.focused::before{background-color:#000;color:var(--white)}table.days.jsx-686fe0a6d837c35{width:100%;border-spacing:0 var(--space-2)}td.jsx-686fe0a6d837c35:not(:first-child){text-align:right;font-weight:bold}.error-no-pickup-found.jsx-686fe0a6d837c35{grid-row:2;grid-column:1;margin:var(--space-2)var(--space-4);color:var(--clr-danger)}.summary.jsx-686fe0a6d837c35{font-weight:var(--font-weight-bold)}.btn-see-more{margin:0 auto}.btn-see-more{margin:var(--space-4)auto var(--space-2)}.distance-from-origin.jsx-686fe0a6d837c35{margin-left:var(--space-2)}@media(max-width:800px){.select-pickup-modal{top:0;bottom:0;left:0;right:0;overflow:auto}ol.jsx-686fe0a6d837c35{padding:var(--space-2)}.map.jsx-686fe0a6d837c35{width:100%;height:90vw;max-height:40vh;position:sticky;top:0;z-index:1}.drop-off-list-content.jsx-686fe0a6d837c35 li.jsx-686fe0a6d837c35{scroll-margin-top:40vh}.btn-see-more{margin:0 auto var(--space-2)}}@media(min-width:801px){.select-pickup-modal{top:10%;overflow:hidden;width:90vw;max-width:996px;height:626px}.container.jsx-686fe0a6d837c35{display:grid;grid-template-columns:repeat(2,1fr);row-gap:var(--space-4);column-gap:var(--space-4);grid-template-rows:auto 1fr;padding:0 var(--space-5)var(--space-5)}.search-bar.jsx-686fe0a6d837c35{grid-row:1;grid-column:1;margin:0}.map.jsx-686fe0a6d837c35{grid-column:1;width:calc(90vw - 375px);max-width:569px;height:100%}.drop-off-list-content.jsx-686fe0a6d837c35{overflow-y:auto;height:517px;grid-row:1/3;grid-column:2}}"})]})};var O=a(95222);let F=()=>(0,n.useCallback)(e=>{e&&setTimeout(()=>{e.scrollIntoView({behavior:"smooth"})},500)},[]),H=()=>{let{selectTimeSlotsState:e,sendToSelectTimeSlots:s}=(0,E.H5)(),{timeSlots:a,daySelected:l,hourSelected:r}=e.context,d=a.find(e=>{let{date:s}=e;return s===l}),n=(0,N.useTranslations)("Shipping"),o=F();return e.matches(O.AD.SLOTS_FETCHING)?(0,t.jsx)("div",{className:"loader-container",children:(0,t.jsx)(b.A,{})}):(0,t.jsxs)("div",{style:{scrollMarginTop:"var(--checkout-header-height)"},ref:o,className:"jsx-41d27c4a1229ee4",children:[(0,t.jsx)("h3",{className:"jsx-41d27c4a1229ee4 subtitle hxb",children:n("chooseTimeSlot")}),(0,t.jsx)("h4",{className:"jsx-41d27c4a1229ee4 block-title",children:n("availableDates")}),(0,t.jsx)("div",{className:"jsx-41d27c4a1229ee4 day-slots-container",children:a.map((a,r)=>
1{let{day:d,month:i,weekday:n}=(0,c.kK)(a.date),o=a.slots.find(e=>{let{availableCapacity:s}=e;return 0!==s}),p=l===a.date;return(0,t.jsxs)("button",{onClick:()=>{s({type:O.we.SELECT_DAY,daySelected:a.date})},disabled:!o||!e.can({type:O.we.SELECT_DAY,daySelected:a.date}),"data-testid":"CheckoutSelectShippingMethod-button-select-day-".concat(r+1),className:"jsx-41d27c4a1229ee4 "+"day-slot hxrt ".concat(p?"day-slot--selected":""),children:[(0,t.jsx)("span",{className:"jsx-41d27c4a1229ee4",children:n.replace(".","")}),(0,t.jsx)("span",{className:"jsx-41d27c4a1229ee4",children:d}),(0,t.jsx)("span",{className:"jsx-41d27c4a1229ee4",children:i.replace(".","")})]},a.date)})}),e.can({type:O.we.SELECT_HOUR,hourSelected:""})&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("h4",{style:{scrollMarginTop:"var(--checkout-header-height)"},ref:o,className:"jsx-41d27c4a1229ee4 block-title",children:n("availableTimeSlots")}),(0,t.jsx)("div",{className:"jsx-41d27c4a1229ee4 time-slots-container",children:null==d?void 0:d.slots.map((e,a)=>{let l=0!==e.availableCapacity,d=e.value===r;return(0,t.jsx)("button",{disabled:!l,onClick:()=>{s({type:O.we.SELECT_HOUR,hourSelected:e.value})},"data-testid":"CheckoutSelectShippingMethod-button-select-time-".concat(a+1),className:"jsx-41d27c4a1229ee4 "+"time-slot hxrt ".concat(d?"time-slot--selected":""),children:e.value},e.value)})})]}),(0,t.jsx)(i(),{id:"41d27c4a1229ee4",children:".day-slots-container.jsx-41d27c4a1229ee4,.time-slots-container.jsx-41d27c4a1229ee4{display:inline-flex;flex-wrap:wrap;gap:var(--space-2)}.day-slot.jsx-41d27c4a1229ee4,.time-slot.jsx-41d27c4a1229ee4{border:1px solid var(--clr-tertiary-2);background-color:transparent;box-sizing:border-box;border-radius:var(--rd-1);padding:var(--space-2);cursor:pointer}.day-slot[disabled].jsx-41d27c4a1229ee4,.time-slot[disabled].jsx-41d27c4a1229ee4{border-color:transparent;color:var(--clr-grey-4);cursor:not-allowed}.day-slot--selected.jsx-41d27c4a1229ee4,.time-slot--selected.jsx-41d27c4a1229ee4{border-color:var(--clr-primary-5);background-color:var(--clr-primary-5);font-weight:var(--font-weight-bold);cursor:default}.day-slot.jsx-41d27c4a1229ee4{display:inline-flex;flex-direction:column;align-items:center;justify-content:center;width:62px;height:64px;text-transform:capitalize;letter-spacing:-.24px;color:var(--black)}.time-slot.jsx-41d27c4a1229ee4{width:110px;letter-spacing:-.33px;white-space:nowrap;color:var(--black)}.block-title.jsx-41d27c4a1229ee4{all:inherit;margin:var(--space-2)0}.loader-container.jsx-41d27c4a1229ee4{display:flex;justify-content:center}@media(min-width:1264px){.day-slot.jsx-41d27c4a1229ee4{width:110px}}"})]})};var q=a(46621),z=a(31064),U=a(94684),G=a(84811);let V={[A.bK.COURIER_METHOD_SELECTED]:128,[A.bK.TIME_SLOT_SELECTED]:128,[A.bK.HOME_METHOD_SELECTED]:32},B=()=>{var e,s,a,l,d;let{selectAddressState:u,selectShippingMethodState:x,sendToSelectShippingMethod:m,selectPickupPointState:j,sendToSelectPickupPoint:g}=(0,E.H5)(),{send:v}=r.qn.useActorRef(),y=F(),C=F(),w=F(),{shippingAddressSelected:k}=u.context,{methodsList:T,noShipment:I,methodSelectedCode:R}=x.context,{pickupAddress:D}=j.context,M=(0,N.useTranslations)("Checkout"),O=(0,N.useTranslations)("Shipping"),B=(0,N.useTranslations)("Shipping.Errors"),{checkoutCart:K,isScrollAvailable:Y}=(0,r.bK)(),{iso:Z,isFrenchMarket:W}=(0,S.A)();return((0,n.useEffect)(()=>{if(!R)return;let e=T.find(e=>e.code===R);if(e){if(e.type===p.fg.NON_ADDRESSED)return;e.type===p.fg.PICKUP?v({type:_.qY.OVERWRITE_SHIPPING_METHOD,shippingMethod:{type:e.type,carrierId:R,pickupPointCity:null,pickupPointId:null,pickupPointLabel:null,pickupPointStreet:null,pickupPointZipCode:null}}):v({type:_.qY.OVERWRITE_SHIPPING_METHOD,shippingMethod:{type:e.type,carrierId:R}})}},[R,T,v]),I)?(0,t.jsxs)("section",{className:"jsx-864b914a79da64a5",children:[(0,t.jsx)("h3",{className:"jsx-864b914a79da64a5 subtitle hxb",children:M("deliveryMode")}),(0,t.jsx)("p",{className:"jsx-864b914a79da64a5 error tw-lf-error-message",children:B((null==K?void 0:K.isFresh)||(null==K?void 0:K.hasUltraFreshProducts)?"shippingAddressNotEligibleForFreshAndUFShipping":"incompatibleProducts")}),(0,t.jsx)(i(),{id:"864b914a79da64a5",children:"section.jsx-864b914a79da64a5{margin-bottom:var(--space-5)}"})]}):x.matches(A.bK.METHODS_FETCHING)?(0,t.jsx)(b.A,{}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("section",{"data-testid":"Delivery modes section",className:"jsx-f02919cb43b7f36",children:[(0,t.jsx)("h3",{style:{scrollMarginTop:"var(--checkout-header-height)"},ref:Y?y:void 0,className:"jsx-f02919cb43b7f36 subtitle hxb",children:M("deliveryMode")}),T.map(e=>{switch(e.type){case p.fg.HOME:case p.fg.CLICK_AND_COLLECT:return(0,t.jsx)("li",{className:"jsx-f02919cb43b7f36",children:(0,t.jsxs)(U.A,{id:e.id,name:"",required:!0,value:e.code,checked:R===e.code,handleChecked:()=>{m({type:A.ny.SELECT_HOME_METHOD,method:e,methodType:e.type})},more:(0,t.jsx)("span",{className:"jsx-f02919cb43b7f36 hxb price",children:(0,c.Gp)(e.price/100,M("free"))}),dataTestId:"CheckoutSelectShippingMethod-Button-shipping-method-".concat(e.type),children:[(0,t.jsx)("span",{className:"jsx-f02919cb43b7f36 hxb shipping-name",children:e.translations[Z].name}),(0,t.jsx)("span",{dangerouslySetInnerHTML:{__html:(0,c.HA)(e.translations[Z].description)},className:"jsx-f02919cb43b7f36 hxrt shipping-description"})]})},e.code);case p.fg.PICKUP:var s,a;return(0,t.jsxs)(n.Fragment,{children:[(0,t.jsx)("li",{className:"jsx-f02919cb43b7f36",children:(0,t.jsxs)(U.A,{handleChecked:()=>{m({type:A.ny.SELECT_PICKUP_METHOD,address:k,method:e,methodType:p.fg.PICKUP})},id:"pickup",name:"",required:!0,value:e.code,checked:R===e.code,more:(0,t.jsx)("span",{className:"jsx-f02919cb43b7f36 hxb price",children:(0,c.Gp)(Math.min(...e.methods.map(e=>{let{price:s}=e;return s}))/100,M("free"))}),dataTestId:"CheckoutSelectShippingMethod-Button-shipping-method-".concat(e.type),children:[(0,t.jsx)("span",{className:"jsx-f02919cb43b7f36 hxb shipping-name",children:e.methods[0].translations[Z].name}),(0,t.jsx)("span",{dangerouslySetInnerHTML:{__html:(0,c.HA)(null==e?void 0:e.methods[0].translations[Z].description)},className:"jsx-f02919cb43b7f36 hxrt shipping-description"})]})}),(null==j||null==(s=j.matches)?void 0:s.call(j,A.qX.OPENED))&&(0,t.jsx)(L,{handleClose:()=>g(A.IT.CLOSE),isOpen:null==j||null==(a=j.matches)?void 0:a.call(j,A.qX.OPENED)})]},e.code);case p.fg.COURIER:return(0,t.jsx)("li",{className:"jsx-f02919cb43b7f36",children:(0,t.jsxs)(U.A,{id:e.id,name:"",required:!0,value:e.code,checked:R===e.code,handleChecked:()=>{m({type:A.ny.SELECT_COURIER_METHOD,checkoutCartId:K.id,method:e,methodType:p.fg.COURIER})},more:(0,t.jsx)("span",{className:"jsx-f02919cb43b7f36 hxb price",children:(0,c.Gp)(e.price/100,M("free"))}),dataTestId:"CheckoutSelectShippingMethod-Button-shipping-method-".concat(e.type),children:[(0,t.jsx)("span",{className:"jsx-f02919cb43b7f36 hxb shipping-name",children:(0,t.jsx)("span",{className:"jsx-f02919cb43b7f36 courier-label",children:e.translations[Z].name})}),(0,t.jsx)("span",{dangerouslySetInnerHTML:{__html:(0,c.HA)(e.translations[Z].description)},className:"jsx-f02919cb43b7f36 hxrt shipping-description"})]})},e.code);default:return null}})]}),x.matches(A.bK.PICKUP_METHOD_SELECTED)&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(z.A,{marginVertical:"tw-my-6"}),(0,t.jsxs)("section",{className:"jsx-f02919cb43b7f36",children:[(0,t.jsx)("h3",{style:{scrollMarginTop:"var(--checkout-header-height)"},ref:C,className:"jsx-f02919cb43b7f36 subtitle hxb",children:O("myRelayPoint")}),(0,t.jsx)("div",{className:"jsx-f02919cb43b7f36 pickup-selected-container",children:(0,t.jsxs)("div",{className:"jsx-f02919cb43b7f36 select-pickup-button",children:[(0,t.jsx)(h.A,{handleClick:()=>{var e;return g({type:A.IT.OPEN,address:k,methods:null==(e=T.find(e=>{let{type:s}=e;return s===p.fg.PICKUP}))?void 0:e.methods})},children:O("choose")}),(0,t.jsx)(o.A,{width:14,height:14,headDirection:"right"})]})})]})]}),x.matches(A.bK.PICKUP_POINT_SELECTED)&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(z.A,{marginVertical:"tw-my-6"}),(0,t.jsxs)("section",{className:"jsx-f02919cb43b7f36",children:[(0,t.jsx)("h3",{className:"jsx-f02919cb43b7f36 subtitle hxb",children:O("myRelayPoint")}),(0,t.jsxs)("div",{className:"jsx-f02919cb43b7f36 pickup-selected-container",children:[(0,t.jsxs)("div",{className:"jsx-f02919cb43b7f36",children:[(0,t.jsx)("div",{className:"jsx-f02919cb43b7f36 capitalize",children:null==(e=D.company)?void 0:e.toLowerCase()}),(0,t.jsx)("div",{className:"jsx-f02919cb43b7f36 capitalize",children:null==(s=D.street)?void 0:s.toLowerCase()}),(0,t.jsxs)("div",{className:"jsx-f02919cb43b7f36 capitalize",children:[D.postcode," ",null==(a=D.city)?void 0:a.toLowerCase()]})]}),(0,t.jsx)("button",{onClick:()=>{var e;g({type:A.IT.OPEN,address:k,methods:null==(e=T.find(e=>{let{type:s}=e;return s===p.fg.PICKUP}))?void 0:e.methods})},className:"jsx-f02919cb43b7f36 pickup-selected-change",children:(0,t.jsx)(f.A,{})})]})]})]}),x.hasTag(A.W5)&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(z.A,{marginVertical:"tw-my-6"}),(0,t.jsx)("section",{className:"jsx-f02919cb43b7f36",children:(0,t.jsx)(H,{})})]}),x.can({type:A.ny.SET_DELIVERY_INFOS,deliveryInstruction:""})&&W&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(z.A,{marginVertical:"tw-my-6"}),(0,t.jsxs)("section",{className:"jsx-f02919cb43b7f36",children:[(0,t.jsx)("h3",{style:{scrollMarginTop:"var(--checkout-header-height)"},ref:Y||x.hasTag(A.W5)?w:void 0,className:"jsx-f02919cb43b7f36 subtitle hxb !tw-mb-4",children:O("additionalDeliveryInformations")}),(0,t.jsxs)("div",{className:"jsx-f02919cb43b7f36 tw-mb-2 tw-inline-flex tw-w-full tw-items-center tw-justify-start tw-gap-6 tw-rounded-2xl tw-bg-blue-100 tw-px-6 tw-py-4",children:[(0,t.jsx)("div",{className:"jsx-f02919cb43b7f36 tw-relative tw-hidden tw-h-6 tw-w-6 desktop:tw-block",children:(0,t.jsx)(q.A,{size:P.y3.md}
1)}),(0,t.jsx)("p",{className:"jsx-f02919cb43b7f36 tw-lf-body-regular-md",children:O.rich("deliverInformationBlock",{b:e=>(0,t.jsx)("span",{className:"jsx-f02919cb43b7f36 tw-lf-body-bold-md",children:e})})})]}),(0,t.jsxs)("div",{className:"jsx-f02919cb43b7f36",children:[(0,t.jsx)("h4",{className:"jsx-f02919cb43b7f36 block-title",children:O("furtherInformations")}),(0,t.jsx)(G.A,{name:"Delivery Infos",placeholder:O("additionalInfosPlaceholder"),id:"deliveryInfos",value:null!=(l=x.context.shippingMethod.deliveryInstruction)?l:"",onChange:e=>m({type:A.ny.SET_DELIVERY_INFOS,deliveryInstruction:e.target.value}),maxLength:null!=(d=V[x.value])?d:128,rows:3,disableResize:!0,dataTestId:"CheckoutSelectShippingMethod-Textarea-delivery-info",counterLimit:V[x.value]})]})]})]}),(0,t.jsx)(i(),{id:"f02919cb43b7f36",children:"li.jsx-f02919cb43b7f36{list-style:none}.block-title.jsx-f02919cb43b7f36{all:inherit;margin:var(--space-2)0}.shipping-name.jsx-f02919cb43b7f36{display:block}.courier-label.jsx-f02919cb43b7f36{margin-right:var(--space-2)}.shipping-description.jsx-f02919cb43b7f36{display:block}.price.jsx-f02919cb43b7f36{text-align:right;display:flex;flex-direction:column;min-width:60px}.hxrt.jsx-f02919cb43b7f36{color:var(--clr-grey-1)}.pickup-selected-change.jsx-f02919cb43b7f36{cursor:pointer;display:flex;align-items:center;font-weight:var(--font-weight-bold);background-color:inherit;border:inherit}.pickup-selected-container.jsx-f02919cb43b7f36{display:flex;justify-content:space-between;margin:var(--space-4)var(--space-2)}.select-pickup-button.jsx-f02919cb43b7f36{display:flex;cursor:pointer;align-items:center}.select-pickup-button.jsx-f02919cb43b7f36>svg{margin-left:var(--space-4)}"})]})};var K=a(92275),Y=a(98227),Z=a(19885),W=a(37225),X=a(36749),J=a(19846),$=a(84246),Q=a(87718),ee=a(1909),es=a(71969),ea=a(24795),et=a(23613),el=a(86528),er=a(6807),ed=a(15721),ei=a(88972),en=a(40580),ec=a(70703);let eo=(0,I.A)(),ep=m.A,{publicRuntimeConfig:{mapboxToken:ef}}=T()(),eh=e=>{let{onSubmitAddress:s,onCancel:a,defaultValues:l,hasCancelButton:d=!1,hasDefaultCheckbox:i=!1}=e,[c,o]=(0,n.useState)(!!(null==l?void 0:l.company)),p=(0,N.useTranslations)("Global"),f=(0,N.useTranslations)("Account"),{isGermanMarket:h,countryCode:u,locale:x,availableCountryLocale:m}=(0,S.A)(),j=(0,r.KH)(y.YM1),b=(0,r.KH)(y.TQz),{register:g,handleSubmit:v,formState:{errors:C},setValue:E,getValues:A,trigger:k,formState:T}=(0,ee.mN)({defaultValues:l,mode:"onBlur"}),{writtenStreet:I,setWrittenStreet:_,suggestedAddresses:R,isSuggestedAddressLoading:D}=(0,w.ZW)({mapboxToken:ef,locale:x,sessionToken:eo,searchableCountry:m});(0,n.useEffect)(()=>{for(let e of Object.values(C))if("ref"in e&&e.ref){e.ref.scrollIntoView({behavior:"smooth",block:"center",inline:"center"});break}},[C]),(0,w.gV)(()=>{l&&k((0,Q.HP)(l))},[l]),(0,n.useEffect)(()=>{(0,ec.sx)({type:"LFStartShippingAddress"})},[]);let M=async()=>{await k();let e=Object.keys(C).reduce((e,s)=>C[e]?e:s,null);if(e){var s;null==(s=document.querySelector('input[name="'.concat(e,'"]')))||s.focus()}};return(0,t.jsxs)("div",{children:[C.formContainer&&(0,t.jsx)("p",{className:"tw-lf-error-message",children:C.formContainer.message}),(0,t.jsxs)("form",{onSubmit:v(e=>{let{formContainer:a,...t}=e;return(0,ec.sx)({type:"LFSubmitShippingAddress"}),s(Object.keys(t).reduce((e,s)=>{var a,l,r;return{...e,[s]:null!=(r=null==(a=(l=t[s]).trim)?void 0:a.call(l))?r:t[s]}},{}))}),className:"tw-flex tw-w-full tw-flex-col tw-gap-4",children:[(0,t.jsxs)("div",{className:"tw-flex tw-flex-col tw-gap-4 desktop:tw-flex-row","data-testname":"Address form inputs",children:[(0,t.jsxs)(ed.ks,{id:"firstName",isInvalid:!!C.firstName,UNSAFE_className:"tw-w-full",children:[(0,t.jsx)(ed.JU,{children:f("firstname")}),(0,t.jsx)(ed.pd,{autoComplete:"given-name",type:"text",placeholder:f("firstnamePlaceholder"),onKeyDown:(0,y.kZ)(y.USR),...g("firstName",{required:{value:!0,message:f("firstNameRequiredMessage")},validate:{isValid:e=>y.USR.test(e.trim())||f("firstNamePatternMessage")},minLength:{value:2,message:f("shouldContainsAtLeast2chars")}}),dataTestId:"AddressForm-Input-first-name"}),C.firstName&&(0,t.jsx)(ed.yn,{dataTestId:"Address form firstname input error message",children:C.firstName.message})]}),(0,t.jsxs)(ed.ks,{id:"lastName",isInvalid:!!C.lastName,UNSAFE_className:"tw-w-full",children:[(0,t.jsx)(ed.JU,{children:f("lastname")}
1),(0,t.jsx)(ed.pd,{autoComplete:"family-name",type:"text",placeholder:f("lastNamePlaceholder"),onKeyDown:(0,y.kZ)(y.USR),...g("lastName",{required:!0,validate:{isValid:e=>y.USR.test(e.trim())},minLength:2}),dataTestId:"AddressForm-Input-last-name"}),C.lastName&&(0,t.jsx)(ed.yn,{children:C.lastName.message})]})]}),c||h?(0,t.jsxs)(ed.ks,{id:"company",children:[(0,t.jsx)(ed.JU,{children:f("companyName")}),(0,t.jsx)(ed.pd,{autoComplete:"organization",type:"text",placeholder:f("companyNamePlaceholder"),...g("company"),dataTestId:"AddressForm-Input-company-name"})]}):(0,t.jsx)("button",{onClick:()=>o(!0),className:"tw-lf-link-md tw-self-start",children:f("displayCompanyNameField")}),(0,t.jsxs)(ed.ks,{id:"street",isInvalid:!!C.street,children:[(0,t.jsx)(ed.JU,{children:f("addressInputLabel")}),h&&!j?(0,t.jsx)(ed.pd,{autoComplete:"off",type:"text",placeholder:f("suggestedAddressPlaceholder"),...g("street",{required:{value:!0,message:f("suggestedAddressRequiredMessage")},maxLength:{value:32,message:f("suggestedAddressPatternMessage")}}),onChange:e=>_(e.target.value),dataTestId:"AddressForm-Input-suggested-address-pattern-message"}):(0,t.jsx)(ep,{isLoading:D,options:(null==I?void 0:I.length)?null==R?void 0:R.map(e=>{let{label:s,street:a,postcode:t,city:l,countryCode:r,type:d}=e;return{id:s,label:s,value:{street:a,postcode:t,city:l,countryCode:r||"FR",type:d}}}):void 0,handleSelect:e=>{let{street:s,postcode:a,city:t,countryCode:l="FR"}=e;E("street",s),E("postcode",a),E("city",t),E("countryCode",l),_(""),k(["street","postcode","city","countryCode"])},renderInput:e=>(0,t.jsx)(ed.pd,{...e,autoComplete:"off",type:"text",placeholder:f("suggestedAddressPlaceholder"),...g("street",{required:{value:!0,message:f("suggestedAddressRequiredMessage")},maxLength:{value:32,message:f("suggestedAddressPatternMessage")}}),onChange:e=>_(e.target.value),dataTestId:"AddressForm-Input-street"})}),C.street&&(0,t.jsx)(ed.yn,{children:C.street.message})]}),(0,t.jsxs)("div",{className:"tw-flex tw-flex-col tw-gap-4 desktop:tw-flex-row","data-testname":"Address form inputs",children:[(0,t.jsxs)(ed.ks,{id:"postcode",isInvalid:!!C.postcode,UNSAFE_className:"tw-w-full",children:[(0,t.jsx)(ed.JU,{children:f("zipCode")}),(0,t.jsx)(ed.pd,{onKeyDown:(0,y.kZ)(y.S74),autoComplete:"postal-code",inputMode:"numeric",type:"text",placeholder:f("zipCodePlaceholder"),...g("postcode",{required:{value:!0,message:f("zipCodeRequiredMessage")},validate:{isPostalCodeValid:e=>!A("countryCode")||(0,er.Kq)(e,A("countryCode"))}}),dataTestId:"AddressForm-Input-postcode"}),C.postcode&&(0,t.jsx)(ed.yn,{children:C.postcode.message})]}),(0,t.jsxs)(ed.ks,{id:"city",isInvalid:!!C.city,UNSAFE_className:"tw-w-full",children:[(0,t.jsx)(ed.JU,{children:f("city")}),(0,t.jsx)(ed.pd,{type:"text",autoComplete:"address-level2",placeholder:f("cityPlaceholder"),onKeyDown:(0,y.kZ)(y.USR),...g("city",{required:{value:!0,message:f("cityRequiredMessage")},pattern:{value:y.USR,message:f("cityPatternMessage")}}),dataTestId:"AddressForm-Input-city"}),C.city&&(0,t.jsx)(ed.yn,{children:C.city.message})]})]}),(0,t.jsx)(et.A,{label:f("country"),...g("countryCode",{required:{value:!0,message:f("chooseCountry")}}),isInvalid:!!C.countryCode}),C.countryCode&&(0,t.jsx)(ed.yn,{children:C.countryCode.message}),(0,t.jsxs)(ed.ks,{id:"phoneNumber",isInvalid:!!C.phoneNumber,children:[(0,t.jsxs)("span",{className:"tw-flex tw-flex-row",children:[(0,t.jsx)(ed.JU,{children:f("phoneNumber")}),(0,t.jsx)(ei.A,{ariaId:"delivery-phone-number",content:(0,t.jsx)("p",{children:f("phonePopOver")}),position:"top",arrowPosition:"center",eventType:"click-only",UNSAFE_className:"tw-ml-1",children:(0,t.jsx)("button",{onClick:e=>e.preventDefault(),className:"tw-lf-button-ghost tw-ml-1 tw-cursor-pointer tw-pt-1",children:(0,t.jsx)(en.A,{size:P.y3.sm})})})]}),(0,t.jsx)(ed.pd,{onKeyDown:(0,y.kZ)(y.S74),type:"tel",placeholder:f("phoneNumberPlaceholder"),...g("phoneNumber",{required:{value:!0,message:f("phoneNumberRequiredMessage")},validate:e=>{let s=(0,el.l)(null!=e?e:"",{defaultCountry:u});return(null==s?void 0:s.isValid())||f("phoneNumberPatternMessage")}}),onChange:e=>{let s=(0,el.l)(e.target.value,{defaultCountry:u});e.target.value=(null==s?void 0:s.isValid())?(null==s?void 0:s.country)===u?s.formatNational():s.formatInternational():e.target.value,k("phoneNumber")},dataTestId:"AddressForm-Input-phone"}),C.phoneNumber&&(0,t.jsx)(ed.yn,{children:C.phoneNumber.message})]}),i&&(0,t.jsxs)("div",{className:"tw-mb-8 tw-mt-2 tw-flex [&_label]:tw-ml-2",children:[(0,t.jsx)(es.A,{id:"default",required:!1,defaultChecked:!!A("default"),...g("default",{required:!1}),disabled:!!A("default")}
1),(0,t.jsx)(ea.A,{id:"default",children:f("setAsDefaultAddress")})]}),(0,t.jsxs)("div",{className:"tw-mb-2 tw-mt-2 tw-flex tw-flex-row tw-justify-around desktop:tw-mb-0",children:[d?(0,t.jsx)("div",{className:"tw-mr-4 tw-hidden desktop:tw-block",children:(0,t.jsx)("button",{className:"tw-lf-button tw-lf-button-secondary tw-lf-button-md",onClick:()=>null==a?void 0:a(),"data-testid":"AddressForm-Button-cancel",children:p("cancel")})}):null,(0,t.jsx)("button",{type:"submit",className:"tw-lf-button tw-lf-button-primary tw-lf-button-md tw-scroll-mt-16","data-testid":"Submit create address form",onClick:M,disabled:!b&&!T.isValid,children:(null==l?void 0:l.firstName)?f("addressUpdateSubmit"):f("addressCreateSubmit")})]})]})]})},eu=e=>e?A.Zw.SELECT_BILLING_ADDRESS:A.Zw.SELECT_SHIPPING_ADDRESS,ex=e=>{var s,a,l,d,o,p,u,m,j,b,g;let{selectIdPrefix:v="",isForBillingAddress:C=!1}=e,{state:w}=(0,E.DC)(),{selectAddressState:k,sendToSelectAddress:T,addressModalState:I,sendToAddressModal:P}=(0,E.H5)(),{send:R}=r.qn.useActorRef(),{setIsScrollAvailable:D}=(0,r.bK)(),{address:M}=(0,r.hO)(),{addresses:L}=k.context,{countryCode:O}=(0,S.A)(),F=(0,Q.hK)({countryCode:O,street:null==M?void 0:M.street,postcode:null==M?void 0:M.postalCode,city:null==M?void 0:M.city}),H=C?null==(s=k.context.billingAddressSelected)?void 0:s.hash:null==(a=k.context.shippingAddressSelected)?void 0:a.hash,q=(0,N.useTranslations)("Shipping");return((0,n.useEffect)(()=>()=>{D(!1)},[]),(0,n.useEffect)(()=>{var e;if(!C&&(null==(e=k.context.shippingAddressSelected)?void 0:e.hash)){let e=k.context.shippingAddressSelected;R({type:_.qY.OVERWRITE_ADDRESS,address:{street:e.street,city:e.city,postalCode:e.postcode,country:e.countryCode}})}},[null==(l=k.context.shippingAddressSelected)?void 0:l.hash]),k.matches({[A.tY.GET]:A.tY.ADDRESSES_FETCHING})||k.matches({[A.tY.GET_WITH_FORM]:A.tY.ADDRESSES_FETCHING}))?(0,t.jsx)(J.A,{}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(x.A,{isOpen:(null==I||null==(d=I.matches)?void 0:d.call(I,X._c.OPEN))&&I.context.isForBillingAddress===C,UNSAFE_className:"modal",externalToggle:()=>P({type:X.qz.CLOSE}),hasPadding:!0,title:q((null==I||null==(o=I.context)?void 0:o.update)?"updateAddress":"addMyAddress"),children:(0,t.jsxs)(Y.A.Provider,{feature:y.enh,children:[(0,t.jsx)(Y.A.A,{children:(0,t.jsx)(Z.A,{isLoading:null==k||null==(p=k.matches)?void 0:p.call(k,A.tY.ADDRESS_CREATING),onSubmitAddress:e=>{P({type:X.qz.SUBMIT,address:e,creatingForBillingOnly:C})},onCancel:()=>P({type:X.qz.CLOSE}),defaultValues:null==I||null==(u=I.context)?void 0:u.defaultAddress,hasCancelButton:!0})}),(0,t.jsx)(Y.A.B,{children:(0,t.jsx)(eh,{isLoading:null==k||null==(m=k.matches)?void 0:m.call(k,A.tY.ADDRESS_CREATING),onSubmitAddress:e=>{P({type:X.qz.SUBMIT,address:e,creatingForBillingOnly:C})},onCancel:()=>P({type:X.qz.CLOSE}),defaultValues:null==I||null==(j=I.context)?void 0:j.defaultAddress,hasCancelButton:!0})})]})}
1),(0,t.jsxs)("ul",{className:"jsx-af10f441b9fdfc28 address-list",children:[L.map(e=>(0,t.jsx)("li",{className:"jsx-af10f441b9fdfc28",children:(0,t.jsx)(U.A,{disabled:!k.can({type:eu(C),addressSelected:e})||!w.can({type:W.Op.SELECT_SHIPPING_ADDRESS,shippingAddress:{},billingAddress:{}}),id:"".concat(v,"-").concat(e.id),name:"address",required:!0,value:e.id,checked:e.hash===H,handleChecked:s=>{null==s||s.stopPropagation(),D(!0),T({type:eu(C),addressSelected:e})},more:(0,t.jsx)("button",{onClick:s=>{s.stopPropagation(),P({type:X.qz.OPEN,defaultAddress:(0,c.cJ)(e,"hash"),isForBillingAddress:C})},"data-testid":"AddressesListAndForm-Button-edit-address-".concat(v,"-").concat(e.id),className:"jsx-af10f441b9fdfc28 pointer update-address-button",children:(0,t.jsx)(f.A,{})}),dataTestId:"AddressesListAndForm-Button-select-address-".concat(v,"-").concat(e.id),children:(0,t.jsxs)("span",{className:"jsx-af10f441b9fdfc28 address-details",children:[(0,t.jsxs)("span",{className:"jsx-af10f441b9fdfc28",children:[e.firstName," ",e.lastName]}),(null==e?void 0:e.company)&&(0,t.jsx)("span",{className:"jsx-af
110f441b9fdfc28",children:e.company}),(0,t.jsx)("span",{className:"jsx-af10f441b9fdfc28",children:e.street}),(0,t.jsxs)("span",{className:"jsx-af10f441b9fdfc28",children:[e.postcode," ",e.city," ",y.P$D[e.countryCode]||""]}),(0,t.jsx)("span",{className:"jsx-af10f441b9fdfc28",children:e.phoneNumber})]})})},e.id)),k.tags.has($.F)?(0,t.jsxs)("li",{className:"jsx-af10f441b9fdfc28 address-row new-address-block",children:[L.length>0&&(0,t.jsx)(U.A,{id:"new-address",name:"new-address",required:!0,value:"new-address",checked:!0,children:(0,t.jsx)("span",{className:"jsx-af10f441b9fdfc28 bold",children:q("addANewAddress")})}),(0,t.jsxs)(Y.A.Provider,{feature:y.enh,children:[(0,t.jsx)(Y.A.A,{children:(0,t.jsx)(Z.A,{isLoading:null==k||null==(b=k.matches)?void 0:b.call(k,A.tY.ADDRESS_CREATING),defaultValues:F,onSubmitAddress:e=>{T({type:A.Zw.CREATE_ADDRESS,address:e,creatingForBillingOnly:C})}})}),(0,t.jsx)(Y.A.B,{children:(0,t.jsx)(eh,{isLoading:null==k||null==(g=k.matches)?void 0:g.call(k,A.tY.ADDRESS_CREATING),defaultValues:F,onSubmitAddress:e=>{T({type:A.Zw.CREATE_ADDRESS,address:e,creatingForBillingOnly:C})}})})]})]}
1):(0,t.jsx)("li",{className:"jsx-af10f441b9fdfc28 "+"pointer address-row-add ".concat(I.matches(X._c.OPEN)?"colored-bg":""),children:(0,t.jsx)("div",{className:"jsx-af10f441b9fdfc28 add-address-button",children:(0,t.jsx)(h.A,{handleClick:()=>{P({type:X.qz.OPEN,isForBillingAddress:C})},dataTestId:"AddressesListAndForm-AddButtonWithLabel-Button-add-address",children:q("addANewAddress")})})})]}),(0,t.jsx)(i(),{id:"af10f441b9fdfc28",children:'li.jsx-af10f441b9fdfc28{list-style:none}.modal{top:10%}.title.jsx-af10f441b9fdfc28{margin:var(--space-5)0}.address-list.jsx-af10f441b9fdfc28{margin:var(--space-3)0}.address-row-add.jsx-af10f441b9fdfc28{margin:var(--space-3)}.address-row.jsx-af10f441b9fdfc28{display:grid;padding:var(--space-3);grid-template-areas:"address-radio-button address-details update-address-button";grid-column-gap:var(--space-4);grid-template-columns:25px 1fr 32px}.address-row.jsx-af10f441b9fdfc28 input+div{width:24px;height:24px}.colored-bg.jsx-af10f441b9fdfc28{background-color:var(--clr-primary-5);border-radius:var(--rd-2)}.address-details-and-update-pen.jsx-af10f441b9fdfc28{display:flex;flex-direction:row;justify-content:space-between;width:100%}.update-address-button.jsx-af10f441b9fdfc28{height:fit-content;grid-area:update-address-button;background:none;border:none}.address-details.jsx-af10f441b9fdfc28{display:flex;flex-direction:column;grid-area:address-details}.address-radio-button.jsx-af10f441b9fdfc28{grid-area:address-radio-button}.address-details.jsx-af10f441b9fdfc28 h2.jsx-af10f441b9fdfc28{margin-bottom:var(--space-2)}.add-address-button.jsx-af10f441b9fdfc28{display:flex;align-items:center}.add-address-button.jsx-af10f441b9fdfc28>span.jsx-af10f441b9fdfc28{margin-left:var(--space-4)}.add-address-button.jsx-af10f441b9fdfc28 .btn-plus{width:24px;height:24px;line-height:24px;font-size:var(--font-size-4)}.new-address-block.jsx-af10f441b9fdfc28{display:flex;flex-direction:column;margin-bottom:var(--space-5);padding:0}.new-address-block.jsx-af10f441b9fdfc28 label{margin-bottom:var(--space-2)}'})]})},em=()=>(0,t.jsx)(ex,{selectIdPrefix:"shipping-address"}),ej=()=>{let{selectAddressState:e,sendToSelectAddress:s}=(0,E.H5)(),a=(0,N.useTranslations)("Checkout"),{isBillingAndShippingEqual:l}=e.context;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"jsx-7e9ffad7c1cc031b checkbox-with-label",children:[(0,t.jsx)(es.A,{name:a("useSameAddress"),required:!1,id:"same-as-shipping-address",onChange:()=>{s(A.Zw.SELECT_BILLING_EQUAL_SHIPPING_ADDRESS)},checked:l,dataTestId:"CheckoutBillingAddress-Checkbox-".concat(a("useSameAddress"))}),(0,t.jsx)(ea.A,{id:"same-as-shipping-address",children:a("sameAsBillingAddress")})]}),l?null:(0,t.jsx)(ex,{selectIdPrefix:"billing-address",isForBillingAddress:!0}),(0,t.jsx)(i(),{id:"7e9ffad7c1cc031b",children:".checkbox-with-label.jsx-7e9ffad7c1cc031b{margin:var(--space-4)0 var(--space-5)var(--space-3)}.checkbox-with-label.jsx-7e9ffad7c1cc031b{display:flex;align-items:center}.checkbox-with-label.jsx-7e9ffad7c1cc031b label{margin-left:var(--space-4)}"})]})};var eb=a(17323),eg=a(57615),ev=a(44535),ey=a(93521),eC=a(74363),ew=a.n(eC),eN=a(81619),eE=a(81278),eA=a(7746),eS=a(92520),ek=a(2292),eT=a(98275),eI=a(78135),e_=a(17320),eP=a(49779);let eR=n.memo(e=>{var s,a;let{pageContents:d}=e,{isMember:c,customer:o,authUser:p}=(0,eS.uM)(),{checkoutCart:f,error:h}=(0,r.bK)(),{state:u,isWaitingForCart:x}=(0,E.DC)(),{sendToSelectShippingMethod:m,selectAddressState:j,selectShippingMethodState:b,selectTimeSlotsState:g}=(0,E.H5)(),{isSubscriptionAvailable:C,isLoading:w}=(0,eA.X)(eS.uM),S=(0,n.useRef)(!1),k=(0,eE.useRouter)(),{tagContextMatches:T}=(0,eP.Oc)(),I=(0,N.useTranslations)("Checkout"),_=(0,N.useTranslations)("Shipping"),P=(0,n.useRef)(!1),R=(0,r.KH)(y.xZX),D=eT.e(null==d?void 0:d.shippingWarningMessage)&&T(null!=(a=null==d?void 0:d.shippingWarningTagContext)?a:""),M=R&&!u.can(W.Op.SELECT_PAYMENT_METHOD);return((0,e_.A)((null==f?void 0:f.roundUpAmount)||0),(0,n.useEffect)(()=>{if(!S.current&&f&&!w){let e=f.items.map(e=>{let{name:s,sku:a,quantity:t,unitPrice:l,productVendor:r}=e;return{name:s,id:a,quantity:t,price:l/100,brand:r}});(0,eg.xz)("checkout",{ecommerce:{checkout:{actionField:{step:y.F$u.DELIVERY,option:{},isMaap:C},products:e}}}),(0,ec.sx)({type:"LFStartCheckout",data:{currency:f.currencyCode,value:f.subTotal/100,isMaap:C,products:e.map(e=>({...e,sku:e.id,price:100*e.price}))}}),S.current=!0}},[f,C,w]),(0,n.useEffect)(()=>{(null==f?void 0:f.withMembership)!==!1||C||(!async function(){ew().warn("Shopping notice shown, even though it shouldn't be available! Look for mismatch between JWT and current customer state",{user_id:null==o?void 0:o.uid,shopping_cart_id:null==o?void 0:o.shoppingCartId,isMember:c,om
1sTags:null==o?void 0:o.omsTags,token:await (null==p?void 0:p.getIdToken())})}(),!P.current&&o&&((0,ek._D)(o.uid),P.current=!0))},[f,C,c,o]),h)?(0,t.jsx)(l.nB,{children:(0,t.jsx)(ev.A,{statusCode:404})}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(l.nB,{children:[D?(0,t.jsx)(eN.tH,{fallbackRender:()=>null,onError:e=>ew().error("An error occurred while rendering checkout warning message",{error:e}),children:(0,t.jsxs)("div",{className:"jsx-635a63b8507f5c3f alert-info",children:[(null==d||null==(s=d.shippingWarningMessagePicto)?void 0:s.url)&&(0,t.jsx)("div",{className:"jsx-635a63b8507f5c3f alert-info-image",children:(0,t.jsx)(K.A,{src:d.shippingWarningMessagePicto.url,width:56,height:31,layout:"fixed"})}),(0,t.jsx)(ey.RichText,{render:null==d?void 0:d.shippingWarningMessage})]})}):null,(0,t.jsxs)("div",{className:"jsx-635a63b8507f5c3f delivery-body",children:[(0,t.jsxs)("section",{className:"jsx-635a63b8507f5c3f",children:[(0,t.jsx)("h3",{className:"jsx-635a63b8507f5c3f subtitle hxb",children:I("myAddress")}),(0,t.jsx)(em,{})]}),x&&(0,t.jsx)(J.A,{}),u.matches(W.gf.POST_ADDRESS_SELECTED)&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(z.A,{marginVertical:"tw-my-6"}),(0,t.jsx)(J.A,{})]}),u.can({type:W.Op.SELECT_SHIPPING_METHOD})&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(z.A,{marginVertical:"tw-my-6"}),(0,t.jsx)(B,{})]}),u.can({type:W.Op.SELECT_BILLING_ADDRESS,billingAddress:{}})&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(z.A,{marginVertical:"tw-my-6"}),(0,t.jsxs)("section",{className:"jsx-635a63b8507f5c3f",children:[(0,t.jsx)("h3",{className:"jsx-635a63b8507f5c3f subtitle hxb",children:I("billingAddress")}),(0,t.jsx)(ej,{})]})]})]}),(0,t.jsxs)("div",{className:"jsx-635a63b8507f5c3f mobile-only",children:[(0,t.jsx)(z.A,{marginVertical:"tw-my-6"}),(0,t.jsx)(eb.A,{})]})]}),(0,t.jsx)(l.w4,{isMembershipSummaryDisplayed:!w&&C,isNextButtonHidden:M,children:(0,t.jsx)(v.A,{onClick:()=>u.matches(W.gf.STARTED)?void eI.oR.error(I("enterAnAddress")):u.matches(W.gf.ADDRESSED)?void eI.oR.error(I("selectAShippingMethod")):u.matches(W.gf.SHIPPING_SELECTED)?void eI.oR.error(I("completeShippingMethod")):void(u.can(W.Op.SELECT_PAYMENT_METHOD)?(m(A.ny.SEND_TO_PARENT),k.push("/checkout/payment")):eI.oR.error(I("anErrorOccuredCheckSelectedOptions"))),isLoading:u.hasTag($.E)||x||j.matches({[A.tY.GET]:A.tY.ADDRESSES_FETCHING})||j.matches({[A.tY.GET_WITH_FORM]:A.tY.ADDRESSES_FETCHING})||b.matches(A.bK.METHODS_FETCHING)||g.matches(O.AD.SLOTS_FETCHING),hasMinWidth:!1,disabled:!f||!u.can(W.Op.SELECT_PAYMENT_METHOD),dataTestId:"CheckoutDelivery-Button-continue-to-payment",children:_(C?"continueToPaymentAsProspect":"continueToPayment")})}),(0,t.jsx)(i(),{id:"635a63b8507f5c3f",children:'.delivery-body.jsx-635a63b8507f5c3f h3{margin:var(--space-5)0}.delivery-body.jsx-635a63b8507f5c3f divider{border:0;border-bottom:var(--border);margin:var(--space-4)0}.delivery-body.jsx-635a63b8507f5c3f{counter-reset:countSubTitles}.delivery-body.jsx-635a63b8507f5c3f .subtitle{margin:0;margin-bottom:var(--space-5)}.delivery-body.jsx-635a63b8507f5c3f .subtitle::before{counter-increment:countSubTitles 1;content:counter(countSubTitles)". "}.non-prospect-notice.jsx-635a63b8507f5c3f{margin-bottom:var(--space-5)}.alert-info.jsx-635a63b8507f5c3f{display:flex;align-items:center;margin-bottom:var(--space-6)}.alert-info-image.jsx-635a63b8507f5c3f{margin-right:var(--space-3)}{}.alert-info-text.jsx-635a63b8507f5c3f a{transition:all.3s ease;color:var(--clr-link);text-decoration:underline;line-height:1.375;cursor:pointer}.alert-info-text.jsx-635a63b8507f5c3f a:hover{opacity:var(--opacity-link-hover)}.alert-info.jsx-635a63b8507f5c3f strong{color:var(--clr-secondary-1)}'})]})},()=>!0);var eD=a(31973),eM=a(57674),eL=a(4378),eO=a(76305),eF=a(91598),eH=a(31072),eq=a(89542);let ez=e=>{let{pageContents:s}=e,[a]=(0,r.zG)(),{startCheckout:l,canStartOrRestartCheckout:d}=(0,E.DC)(),{shoppingCart:i,shoppingCartId:o}=(0,eM.UI)();return((0,w.Su)(()=>{var e;return(null==i||null==(e=i.products)?void 0:e.length)>0&&d()},function(){l(i.products)},[null==i?void 0:i.products]),(0,n.useEffect)(()=>{(0,eH.A)(eF.d.ANALYTICS)&&(0,eL.Tp)("checkoutCartId",a)},[a]),(0,w.Su)(()=>{var e;return(null==(e=i.products)?void 0:e.length)>0},function(){let e=[],s=i.products.map(s=>(e.push(s.title),(0,c.zG)(s)));(0,eg.p)({name:"Checkout Started",data:{$event_id:"".concat(o,"_").concat(Math.floor(Date.now()/1e3)),$value:Math.floor(100*i.totalPrice)/100,eventSource:eq.KR?y.N8G.APP:y.N8G.WEB,extra:{line_items:s},Items:e}})},[i]),d())?(0,t.jsx)(E.b$,{children:(0,t.jsx)(eR,{pageContents:s})}):(0,t.jsx)(J.A,{})};ez.getLayout=()=>(0,l.Ay)(eO.pp.DELIVERY),ez.hasAppMobileLayout=!0;var eU=!0;let eG=(0,eD.A)(ez)},31973:(e,s,a)=>{"use strict";a.d(s,{A:()=>n});var t=a(6029),l=a(55729),r=a(50709),d=a(92520),i=a(81278);let n=(e,s)=>{let a=a=>{let{isAuthenticated:n,isLoading:c,isLogoutPending:o}=(0,d.uM)(),p=(0,i.useRouter)();return((0,l.useEffect)(()=>{let e=null==p?void 0:p.asPath;c||n||o||(s?s():(0,r.j)(e))},[n,c,null==p?void 0:p.asPath]),c||!n)?null:(0,t.jsx)(e,{...a}
1)};for(let s in e)a[s]=e[s];return a}},40580:(e,s,a)=>{"use strict";a.d(s,{A:()=>r});var t=a(6029);a(55729);var l=a(35133);let r=e=>{let{size:s=l.y3.md,color:a="#000",UNSAFE_className:r}=e;return(0,t.jsx)("svg",{width:l.GM[s],height:l.f6[s],color:a,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:r||"",children:(0,t.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",fill:a,d:"M16 32C24.8366 32 32 24.8366 32 16C32 7.16344 24.8366 0 16 0C7.16344 0 0 7.16344 0 16C0 24.8366 7.16344 32 16 32ZM14.176 19.784V20.192H17.416V19.928C17.416 19.544 17.464 19.2 17.56 18.896C17.672 18.576 17.864 18.248 18.136 17.912C18.424 17.56 18.832 17.144 19.36 16.664C20.032 16.056 20.552 15.424 20.92 14.768C21.304 14.112 21.496 13.344 21.496 12.464C21.496 11.12 21.024 10.04 20.08 9.224C19.136 8.408 17.784 8 16.024 8C14.152 8 12.728 8.464 11.752 9.392C10.776 10.304 10.192 11.48 10 12.92L13.288 13.28C13.464 12.48 13.744 11.896 14.128 11.528C14.528 11.16 15.104 10.976 15.856 10.976C16.512 10.976 17.008 11.152 17.344 11.504C17.696 11.84 17.872 12.336 17.872 12.992C17.872 13.504 17.744 13.944 17.488 14.312C17.248 14.664 16.912 15.056 16.48 15.488C15.856 16.096 15.376 16.624 15.04 17.072C14.704 17.504 14.472 17.928 14.344 18.344C14.232 18.744 14.176 19.224 14.176 19.784ZM17.512 25.424V21.848H14.056V25.424H17.512Z"})})}},46621:(e,s,a)=>{"use strict";a.d(s,{A:()=>r});var t=a(6029);a(55729);var l=a(35133);let r=e=>{let{size:s=l.y3.sm,UNSAFE_className:a,...r}=e;return(0,t.jsxs)("svg",{width:l.GM[s],height:l.f6[s],viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",className:a||"",...r,children:[(0,t.jsx)("path",{d:"M22.5 12C22.5 17.799 17.799 22.5 12 22.5C6.20101 22.5 1.5 17.799 1.5 12C1.5 6.20101 6.20101 1.5 12 1.5C17.799 1.5 22.5 6.20101 22.5 12Z",fill:"#B0C5F1"}),(0,t.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 21.3C17.1362 21.3 21.3 17.1362 21.3 12C21.3 6.86375 17.1362 2.7 12 2.7C6.86375 2.7 2.7 6.86375 2.7 12C2.7 17.1362 6.86375 21.3 12 21.3ZM12 22.5C17.799 22.5 22.5 17.799 22.5 12C22.5 6.20101 17.799 1.5 12 1.5C6.20101 1.5 1.5 6.20101 1.5 12C1.5 17.799 6.20101 22.5 12 22.5Z",fill:"black"}),(0,t.jsx)("path",{d:"M12.9141 7.42969C12.9141 7.93451 12.5048 8.34375 12 8.34375C11.4952 8.34375 11.0859 7.93451 11.0859 7.42969C11.0859 6.92486 11.4952 6.51562 12 6.51562C12.5048 6.51562 12.9141 6.92486 12.9141 7.42969Z",fill:"white"}),(0,t.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.1141 7.42969C14.1141 8.59725 13.1676 9.54375 12 9.54375C10.8324 9.54375 9.88594 8.59725 9.88594 7.42969C9.88594 6.26212 10.8324 5.31563 12 5.31563C13.1676 5.31563 14.1141 6.26212 14.1141 7.42969ZM12 8.34375C12.5048 8.34375 12.9141 7.93451 12.9141 7.42969C12.9141 6.92486 12.5048 6.51562 12 6.51562C11.4952 6.51562 11.0859 6.92486 11.0859 7.42969C11.0859 7.93451 11.4952 8.34375 12 8.34375Z",fill:"black"}),(0,t.jsx)("path",{d:"M11.0859 12.3141C11.0859 11.8092 11.4952 11.4 12 11.4C12.5048 11.4 12.9141 11.8092 12.9141 12.3141V16.4859C12.9141 16.9908 12.5048 17.4 12 17.4C11.4952 17.4 11.0859 16.9908 11.0859 16.4859V12.3141Z",fill:"white"}),(0,t.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.1141 12.3141V16.4859C14.1141 17.6535 13.1676 18.6 12 18.6C10.8324 18.6 9.88594 17.6535 9.88594 16.4859V12.3141C9.88594 11.1465 10.8324 10.2 12 10.2C13.1676 10.2 14.1141 11.1465 14.1141 12.3141ZM12 11.4C11.4952 11.4 11.0859 11.8092 11.0859 12.3141V16.4859C11.0859 16.9908 11.4952 17.4 12 17.4C12.5048 17.4 12.9141 16.9908 12.9141 16.4859V12.3141C12.9141 11.8092 12.5048 11.4 12 11.4Z",fill:"black"})]})}},47693:(e,s,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/checkout/delivery",function(){return a(26315)}])},84461:(e,s,a)=>{"use strict";a.d(s,{e:()=>t});let t=(e,s=" ")=>{let a="";for(let t=0;t<e.length;t++)"text"in e[t]&&(a+=(a?s:"")+e[t].text);return a}},84811:(e,s,a)=>{"use strict";a.d(s,{A:()=>n});var t=a(6029),l=a(79002),r=a.n(l),d=a(55729);let i={small:"14px",medium:"16px",large:"16px"},n=e=>{let{name:s,placeholder:a,register:l,size:n="medium",rounded:c=!1,id:o,value:p,defaultValue:f,onChange:h,onKeyDown:u,readOnly:x,maxLength:m,rows:j,cols:b,disableResize:g=!1,dataTestId:v,counterLimit:y,hasError:C=!1,UNSAFE_className:w=""}
1=e,[N,E]=d.useState(0);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("textarea",{id:o,name:s,placeholder:a,ref:l,value:p,onChange:h,onKeyDown:u,defaultValue:f,readOnly:x,maxLength:m,rows:j,cols:b,"data-testid":v,onInput:e=>{E(e.currentTarget.value.length)},className:r().dynamic([["9ae09d830b3c57b0",[c?30:6,n?"font-size: ".concat(i[n]):"",g?"resize: none;":"",C?"border-color: var(--clr-danger);":""]]])+" "+(w||"")}),y&&(0,t.jsx)("span",{className:r().dynamic([["9ae09d830b3c57b0",[c?30:6,n?"font-size: ".concat(i[n]):"",g?"resize: none;":"",C?"border-color: var(--clr-danger);":""]]])+" counter",children:"".concat(N,"/").concat(y)}),(0,t.jsx)(r(),{id:"9ae09d830b3c57b0",dynamic:[c?30:6,n?"font-size: ".concat(i[n]):"",g?"resize: none;":"",C?"border-color: var(--clr-danger);":""],children:"textarea.__jsx-style-dynamic-selector{display:block;width:100%;line-height:1.5;background-color:#fff;background-image:none;border:1px solid var(--clr-tertiary-2);border-radius:".concat(!c?6:30,"px;height:100%;padding:var(--space-2)var(--space-4);").concat(n?"font-size: ".concat(i[n]):"",";transition:border-color ease-in-out.15s,box-shadow ease-in-out.15s;outline:none;-webkit-appearance:none;font-family:var(--font-family-body);").concat(g?"resize: none;":"","\n          ").concat(C?"border-color: var(--clr-danger);":"","}.counter.__jsx-style-dynamic-selector{font-family:var(--font-family-body);text-align:right;margin-top:var(--space-1);font-size:14px;display:flex;justify-content:flex-end}")})]})}},88972:(e,s,a)=>{"use strict";a.d(s,{A:()=>d});var t=a(6029),l=a(53718),r=a(55729);let d=e=>{let{children:s,content:a,position:d,arrowPosition:i,eventType:n,inline:c=!1,UNSAFE_className:o="",ariaId:p,isOpen:f=!1,dataTestId:h,onClick:u}=e,[x,m]=(0,r.useState)(!1),j=(0,r.useRef)(null),b="controlled"===n,g=(0,r.useCallback)(()=>{m(e=>!e)},[]),v=(0,r.useCallback)(()=>{m(!1)},[]);return(0,r.useEffect)(()=>{b&&m(f)},[f]),(0,l.Wr)(j,v),(0,t.jsxs)("span",{ref:j,hidden:!x,className:"tw-flex tw-flex-1 tw-lf-tooltip-target".concat("hover"===n?" hover:tw-lf-tooltip-shown":"focus"===n?" focus:tw-lf-tooltip-shown":"").concat(x?" tw-lf-tooltip-shown":""," ").concat(c?"tw-inline-block":"tw-block"),onClick:e=>u?u(e):!b&&g(),"aria-describedby":p,tabIndex:0,children:[s,x&&(0,t.jsx)("span",{id:p,role:"tooltip",className:"tw-lf-tooltip ".concat("tw-lf-tooltip-".concat(d)," ").concat("tw-lf-tooltip-arrow-".concat(i)," ").concat(o),tabIndex:-1,"data-testid":h,children:a})]})}},98275:(e,s,a)=>{"use strict";a.d(s,{e:()=>l});var t=a(84461);let l=(e,s)=>e?(0,t.e)(e,s):null}},e=>{e.O(0,[3988,6528,3930,71,5571,6593,636,8792],()=>e(e.s=47693)),_N_E=e.O()}]);
2//# sourceMappingURL=delivery-4b089669f2ba8c6a.js.map

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.