1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4242],{31354:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/account/purchases/delivery-and-curbside/[order-id]",function(){return s(83848)}])},17091:function(e,t,s){"use strict";s.d(t,{Z:function(){return l}});var n=s(85893),a=s(7599),r=s(67294);let i={white:"bg-white",grey:"bg-background-grey"},l=Object.assign((0,r.forwardRef)(function(e,t){let{className:s="",color:a="white",elevated:r=!0,children:l,...c}=e;return(0,n.jsx)("section",{ref:t,id:c.id,className:"rounded-lg ".concat(i[a]," ").concat(r?"shadow-md shadow-navy/30":""," ").concat(s),...c,children:l})}),{Content:function(e){let{className:t="",children:s}=e;return(0,n.jsx)("div",{className:"p-5 ".concat(t),children:s})},Footer:function(e){let{className:t,backgroundColor:s="white",noPadding:r=!1,children:i}=e;return(0,n.jsx)("footer",{className:"flex gap-5 rounded-b-lg ".concat(a.tn[s]," ").concat(r?"":"px-5 py-1"," ").concat(t),children:i})}})},86598:function(e,t,s){"use strict";s.d(t,{r:function(){return l}});var n=s(85893),a=s(93967),r=s.n(a),i=s(81146);function l(e){let{steps:t,progress:s}=e;return(0,n.jsxs)("div",{className:"flex w-full flex-col px-[1.125rem] pt-3",children:[(0,n.jsx)("div",{className:"-mb-6 h-3 bg-background-grey shadow-inner-sm",children:(0,n.jsx)("div",{className:"h-full rounded-r-full bg-gradient-to-b from-navy-gradient-start to-navy-gradient-end transition-[width] duration-1000",style:{width:"".concat(100*Math.min(s/(t.length-1),1),"%")}})}),(0,n.jsx)("div",{className:"flex justify-between",children:t.map((e,t)=>(0,n.jsxs)("div",{className:"flex w-0 flex-col items-center gap-4",children:[(0,n.jsx)("div",{className:"size-9 rounded-full shadow-inner-sm transition-colors duration-1000 ".concat(s>=t?"bg-navy":"bg-background-grey")}),(0,n.jsx)(i.Q,{className:r()({"grayscale brightness-150":s<t}),name:e})]},e))})]})}},52483:function(e,t,s){"use strict";s.d(t,{F:function(){return r}});var n=s(85893),a=s(80407);function r(e){let{className:t="",title:s,loading:r=!1,children:i}=e;return(0,n.jsxs)("section",{className:"relative rounded-lg bg-background-grey p-5 ".concat(t),children:[(0,n.jsxs)("div",{className:r?"opacity-50":"opacity-100",children:[s&&(0,n.jsx)("h2",{className:"mb-2 text-h4",children:s}),i]}),r&&(0,n.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,n.jsx)(a.P,{})})]})}},89057:function(e,t,s){"use strict";s.d(t,{x:function(){return i}});var n=s(85893),a=s(17091),r=s(65228);function i(e){let{firstName:t,lastName:s,address:i,contactPhoneNumber:l,contactEmail:c,classNames:d}=e;return(0,n.jsxs)(a.Z,{className:"p-5 ".concat(null!=d?d:""),children:[(0,n.jsx)("h2",{className:"mb-3 text-h4",children:"Contact Information"}),(0,n.jsxs)("div",{className:"flex flex-wrap gap-x-5 gap-y-2",children:[(t||s)&&(0,n.jsxs)("p",{className:"whitespace-nowrap",children:[(0,n.jsx)("span",{className:"text-h6",children:"Name:"})," ",t||""," ",s||""]}
1),i&&(0,n.jsxs)("p",{className:"whitespace-nowrap",children:[(0,n.jsx)("span",{className:"text-h6",children:"Address:"})," ",i]}),l&&(0,n.jsxs)("p",{className:"whitespace-nowrap",children:[(0,n.jsx)("span",{className:"text-h6",children:"Phone:"})," ",(0,r.CN)(l)]}),c&&(0,n.jsxs)("p",{className:"whitespace-nowrap",children:[(0,n.jsx)("span",{className:"text-h6",children:"Email:"})," ",c]})]})]})}},50136:function(e,t,s){"use strict";s.d(t,{H:function(){return d}});var n=s(85893),a=s(14106),r=s(68092),i=s(8766),l=s(80407),c=s(67974);function d(e){let{titlePrefix:t,loading:s=!1,entries:a,totalLabel:i="Total",total:d="",helperText:u,actionButtonLabel:m,actionButtonLoading:x=!1,actionButtonDisabled:h=!1,actionButtonAriaDescription:p,additionalInfo:f,actionButtonOnClick:j}=e;return(0,n.jsxs)("section",{className:"rounded-lg bg-background-grey p-5",children:[(0,n.jsxs)("h2",{className:"text-h4",children:[t,"Order Summary"]}),s?(0,n.jsx)(o,{}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"my-4",children:[a.map((e,t)=>{var s;return e?(0,n.jsx)(c.y,{...e},null!==(s=e.id)&&void 0!==s?s:e.label):(0,n.jsx)("hr",{className:"my-2 border-medium-grey"},"divider-".concat(t))}),(0,n.jsx)("hr",{className:"my-4 border-medium-grey"}),(0,n.jsxs)("p",{className:"flex justify-between text-h5",children:[i,(0,n.jsx)("span",{"data-testid":"order-estimated-total",children:d})]}),f&&(0,n.jsx)("p",{className:"mt-5 text-h6",children:f})]}),j&&(0,n.jsxs)("div",{className:"mb-2 mt-8",children:[p&&(0,n.jsx)("span",{id:"order-summary-btn-desc",className:"sr-only",children:p}),(0,n.jsx)(r.z,{width:"full",disabled:h,onClick:j,"aria-describedby":p?"order-summary-btn-desc":void 0,"data-testid":"order-summary-button",children:x?(0,n.jsx)(l.P,{}):m}),u&&(0,n.jsx)("p",{className:"my-2 text-xs",children:u})]})]})]})}function o(){return(0,n.jsxs)("div",{children:[(0,n.jsxs)("ul",{className:"my-4",children:[(0,a.w6)(1,2).map(e=>(0,n.jsxs)("li",{className:"flex justify-between gap-4",children:[(0,n.jsx)(i.O,{color:"white",width:"40%"}),(0,n.jsx)(i.O,{color:"white",width:"30%"})]},e)),(0,n.jsx)("hr",{className:"my-4 border-medium-grey"}),(0,a.w6)(1,5).map(e=>(0,n.jsxs)("li",{className:"flex justify-between gap-4",children:[(0,n.jsx)(i.O,{color:"white",width:"45%"}),(0,n.jsx)(i.O,{color:"white",width:"30%"})]},e)),(0,n.jsx)("hr",{className:"my-4 border-medium-grey"}),(0,n.jsxs)("li",{className:"flex justify-between gap-4 text-h5",children:[(0,n.jsx)(i.O,{color:"white",width:"50%"}),(0,n.jsx)(i.O,{color:"white",width:"30%"})]})]}),(0,n.jsx)(i.O,{color:"white",width:"100%",height:"2.75rem",rounded:"lg"})]})}},67974:function(e,t,s){"use strict";s.d(t,{y:function(){return a}});var n=s(85893);function a(e){let{id:t,label:s,value:a,negative:r=!1,invalid:i=!1,className:l}=e;return a?(0,n.jsxs)("p",{className:"mb-1 flex justify-between ".concat(r?"text-success":""," ").concat(l),"data-testid":t,children:[s,(0,n.jsxs)("span",{className:"".concat(i&&"line-through"),children:[r&&"-",a]})]}):null}},97544:function(e,t,s){"use strict";s.d(t,{h:function(){return i}});var n=s(85893),a=s(17396),r=s(93230);function i(e){let{paymentMethods:t}=e;return t?(0,n.jsxs)("div",{className:"rounded-lg bg-background-grey p-5",children:[(0,n.jsx)("h1",{className:"mb-4 text-h4",children:"Payment Methods"}),(0,n.jsx)("div",{className:"rounded-lg bg-background-grey",children:t&&t.filter(e=>"REWARDS"!==e.type).map(e=>(0,n.jsx)("div",{children:(0,n.jsx)("div",{className:"mb-1 flex justify-between",children:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("p",{children:(0,r.Jl)(e)}),(0,n.jsx)("span",{children:e.finalizedAmount?a.VF.format(e.finalizedAmount):e.refundedAmount?"-".concat(a.VF.format(e.refundedAmount)):a.VF.format(e.amount)})]})})},e.type))})]}):(0,n.jsx)(n.Fragment,{})}},53015:function(e,t,s){"use strict";function n(e){return"number"==typeof e?Number.isNaN(e)?0:e:e&&"string"==typeof e?Number(e.replace(/\D/g,"")||"0")/100:0}s.d(t,{G:function(){return a}});let a={onChange:e=>{let t=n(e.currentTarget.value);e.currentTarget.value=t.toFixed(2)},setValueAs:n}},26744:function(e,t,s){"use strict";s.d(t,{R:function(){return f}});var n=s(85893),a=s(39902),r=s(68092),i=s(80407),l=s(21867),c=s(32639),d=s(19578),o=s(52483),u=s(53015),m=s(17396),x=s(73083),h=s(67294),p=s(87536);function f(e){var t,s,f,j;let{tipAction:v}=e,[y,N]=(0,h.useState)(!1),[g,b]=(0,h.useState)(),[w,E]=(0,h.useState)(),{order:I,updatingOrder:A,save:C,saveDetails:P}
1=(0,x.A)(),{handleSubmit:S,register:D,resetField:O,watch:T,formState:{errors:_}}=(0,p.cI)(),R=async e=>{let t=null==g?void 0:g.options.find(t=>t.id===e);N(!0);try{"UPDATE_TIP"===v?await C({action:"UPDATE_TIP",tipOptionId:null==t?void 0:t.id}):await P({action:"UPDATE_ORDER_DETAILS",tipOptionId:null==t?void 0:t.id}),E(e),O("tip")}catch(e){(0,c.m)(e.message)}N(!1)},k=async e=>{let{tip:t}=e;N(!0);try{"UPDATE_TIP"===v?await C({action:"UPDATE_TIP",tipAmount:t}):await P({action:"UPDATE_ORDER_DETAILS",tipAmount:t}),E(void 0)}catch(e){(0,c.m)(e.message),O("tip")}N(!1)};return(0,h.useEffect)(()=>{(async function(){var e;if(!I)return;let t=await (0,a.R1)({url:"user/orders/".concat(I.id,"/tip-options")});if(b(t),void 0!=I.tip.optionId){E(I.tip.optionId);return}if(I.tip.value)return;let s=t.options.find(e=>e.default);E(null!==(e=null==s?void 0:s.id)&&void 0!==e?e:0)})()},[I]),(0,n.jsxs)(o.F,{title:"UPDATE_TIP"===v?"Update Your Tip":"Tip Your Shopper",loading:y,children:[g?(0,n.jsx)(d.l,{arrowsNavigation:"MOBILE",children:g.options.map(e=>{let{id:t,label:s,amount:a}=e,i=t===w;return(0,n.jsx)(r.z,{className:i?"scale-90":"",variant:i?"contained":"outlined",width:"square",size:"lg",disabled:y||A,onClick:()=>R(t),"aria-label":"".concat(s," tip, ").concat(a," dollars."),"data-testid":"tip-".concat(s),children:(0,n.jsxs)("div",{className:i?"":"text-black",children:[(0,n.jsx)("p",{className:"text-h5",children:s}),(0,n.jsx)("p",{className:"text-body",children:m.VF.format(a)})]})},t)})}):(0,n.jsx)("div",{className:"flex h-[4.5rem] w-full items-center justify-center",children:(0,n.jsx)(i.P,{})}),(0,n.jsxs)("form",{className:"my-5 flex w-full gap-2",onSubmit:S(k),children:[(0,n.jsx)(l.o,{label:"Custom Tip",placeholder:"0.00",fullWidth:!0,error:null===(t=_.tip)||void 0===t?void 0:t.message,defaultValue:!I||I.tip.optionId?"":null!==(j=null==I?void 0:null===(f=I.tip)||void 0===f?void 0:null===(s=f.value)||void 0===s?void 0:s.toFixed(2))&&void 0!==j?j:"0.00",...D("tip",{required:!0,...u.G}),"aria-invalid":_.tip?"true":"false","data-testid":"custom-tip-input",leadingIcon:"DollarIcon",disabled:y}),(0,n.jsx)(r.z,{className:"mt-[1.875rem] h-10 max-w-[6.875rem] px-2",size:"custom",width:"custom",type:"submit",disabled:A||!(T("tip")>0)||T("tip")===(null==I?void 0:I.tip.value),"data-testid":"submit-custom-tip",children:"Apply"})]}),(0,n.jsx)("p",{className:"text-center text-body-small",children:"Want to reconsider your delivery person's efforts? You can change the tip amount after your delivery is complete - 100% of the tip goes to them."})]})}},68726:function(e,t,s){"use strict";s.d(t,{c:function(){return c}});var n=s(85893),a=s(68092),r=s(24189),i=s(21102);let l={title:"Long Distance Delivery Fee",message:"A fee added to the order for delivery addresses that are outside of a store's standard service area.",hideConfirmButton:!0,cancelButtonLabel:"Close"};function c(e){let{order:t,className:s,hideInfoButton:c=!1}=e,d=(0,i.R)(),{longDistance:o,fee:u}=(null==t?void 0:t.fulfillment.window)||{};if(!o||!u)return null;let{name:m,amountString:x}=u;return(0,n.jsxs)("div",{className:"flex flex-wrap gap-x-2 ".concat(s),children:[(0,n.jsx)("p",{className:"text-h6 text-red",children:null!=m?m:"Long-Distance Delivery Fee"}),!c&&(0,n.jsx)(a.z,{variant:"text",color:"red",className:"!p-0",onClick:()=>d(l),"data-testid":"ldd-fee-info-button",children:(0,n.jsx)(r.J,{name:"Info",className:"text-navy"})}),x&&(0,n.jsxs)("p",{children:[" + ",x," "]})]})}},43471:function(e,t,s){"use strict";s.d(t,{k:function(){return i}});var n=s(85893),a=s(24189),r=s(93230);function i(e){var t;let{className:s="",order:i}=e,l=(0,r.CK)(i.status),c="CANCELED"===i.status,d=!!((null===(t=i.fulfillment.window)||void 0===t?void 0:t.revisedStartTime)&&i.fulfillment.window.revisedEndTime);return l||c||!d?null:(0,n.jsxs)("span",{className:"flex items-center gap-2 text-h6 text-red ".concat(s),children:[(0,n.jsx)(a.J,{name:"RunningLate"})," Running Late"]})}},25136:function(e,t,s){"use strict";s.d(t,{l:function(){return u}});var n=s(85893),a=s(50136),r=s(80054),i=s(17396),l=s(1005),c=s(67294),d=s(73083),o=s(93230);function u(e){var t;let{reconciled:s=!1,buttonTitle:u,buttonDisabled:m=!1,buttonAriaDescription:x,onButtonClick:h}=e,{order:p,loadingOrder:f,updatingOrder:j,validatingOrder:v}=(0,d.A)(),{fulfillmentType:y}=(0,l.s)(),N=(0,c.useMemo)(()=>{var e;if(!p)return[];let t=[];if(t.push({id:"items",label:"".concat(p.items.length," ").concat(1===p.items.length?"item":"items"),value:p.subTotalString}),p.totalDiscounts.length&&t.push(...p.totalDiscounts.map(e=>({id:e.name,label:e.name,value:i.VF.format(e.amount),negative:!0})),void 0,{id:"subtotal",label:"Subtotal",value:i.VF.format(p.subTotalMinusNonPromoCodeDiscounts)}),t.push({id:"tax-amount",label:"".concat(s?"":"Estimated ","Taxes"),value:p.taxAmount},...p.fees.map(e=>({id:"fee_".concat(e.id),label:e.name,value:(0,o.JK)(e)}))),"DELIVERY"===p.fulfillment.type&&t.push({id:"tip",label:"Delivery Tip ".concat(p.tip.label?"(".concat(p.tip.label,")"):""),value:p.tip.amountString}),null===(e=p.promoCodes)||void 0===e?void 0:e.length){let e=p.promoCodes.filter(e=>!e.message&&!!e.discountAmount);t.push(...e.map(e=>({id:"promo-code-summary",label:"Promo - ".concat(e.code),value:e.discountAmountString,negative:!0})))}return p.requestedRewardsPayment&&t.push({id:"rewards-payment",label:"Rewards",value:p.requestedRewardsPaymentString,negative:!0}),t},[p,s]);
1return(0,n.jsx)(a.H,{titlePrefix:s?"":"Estimated ",loading:f||j||v,entries:N,totalLabel:s?"Order Total":"Estimated Total",total:i.VF.format(null!==(t=null==p?void 0:p.totalAfterDiscountsAndRewardsPayments)&&void 0!==t?t:0),helperText:"SELF"===y?r.F.ORDER_SUMMARY_INVALID_CHECKOUT_MESSAGE:void 0,actionButtonLabel:u,actionButtonDisabled:m||"SELF"===y,actionButtonAriaDescription:x,actionButtonOnClick:h})}},7736:function(e,t,s){"use strict";s.d(t,{a:function(){return c}});var n=s(85893),a=s(39902),r=s(67294),i=s(5068),l=s(73083);function c(e){let{orderId:t,fallbackData:s,children:c}=e,[d,o]=(0,r.useState)(!1),[u,m]=(0,r.useState)(!0),{data:x,error:h,isLoading:p,isValidating:f,mutate:j}=(0,i.ZP)(()=>t?{url:"user/orders/".concat(t)}:null,a.R1,{shouldRetryOnError:!1,revalidateOnFocus:!1,fallbackData:s,revalidateOnMount:void 0===s,onSuccess:()=>{m(!1)},onError:()=>{m(!1)}});async function v(e){if(!x)throw Error("Attempt to update a non existing order.");o(!0);try{let t=await (0,a.pE)({url:"user/orders/".concat(null==x?void 0:x.id),body:e});return j(t),t}finally{o(!1)}}async function y(e){if(!x)throw Error("Attempt to update a non existing order.");o(!0);try{let t=await (0,a.pE)({url:"user/orders/".concat(x.id),body:{action:"UPDATE_ORDER_DETAILS",customer:x.customer,tipOptionId:e.tipAmount?void 0:x.tip.optionId,tipAmount:x.tip.optionId||e.tipOptionId?void 0:x.tip.value,leaveUnattended:x.leaveUnattended,note:x.note,smsOptIn:x.smsOptIn,...e}});return j(t),t}finally{o(!1)}}async function N(e){if(!x)throw Error("Cannot add an item without a selected order.");o(!0);try{let t=await (0,a.pE)({url:"user/orders/".concat(x.id),body:{action:"ADD_ITEM",orderItem:e}});j(t)}finally{o(!1)}}async function g(e){throw Error("Not yet implemented")}async function b(e,t){if(!x)throw Error("Cannot update an item without a selected order.");o(!0);try{var s,n,r,i;let l=await (0,a.pE)({url:"user/orders/".concat(x.id),body:{action:"UPDATE_ITEM",orderItem:{upcId:e.upcId,quantity:null!==(n=t.quantity)&&void 0!==n?n:e.quantity,unitOfMeasure:t.unitOfMeasure,note:null!==(r=t.note)&&void 0!==r?r:e.note,replacementPreference:null!==(i=t.replacementPreference)&&void 0!==i?i:e.replacementPreference,replacementUpcIds:(null===(s=t.replacementUpcIds)||void 0===s?void 0:s.length)?t.replacementUpcIds:e.replacementUpcIds}}});j(l)}finally{o(!1)}}async function w(e){if(!x)throw Error("There is no selected order to remove the item from.");o(!0);let t=e.map(e=>e.id);try{let s=e.map(e=>(0,a.pE)({url:"user/orders/".concat(x.id),body:{action:"DELETE_ITEM",orderItemDeleteRequest:{orderItemId:e.id,quantity:0}}}));await Promise.all(s);let n=[];x.items.forEach(e=>{t.includes(e.id)||n.push(e)}),j({...x,items:n})}finally{o(!1)}}async function E(){await j()}let I={orderType:"existing",order:x,orderError:h,loadingOrder:p,checkingForOpenOrder:u,updatingOrder:d,validatingOrder:f,canAddOrEditProduct:(null==x?void 0:x.status)==="SUBMITTED",save:v,saveDetails:y,addItem:N,addItems:g,updateItem:b,removeItems:w,revalidate:E};return(0,n.jsx)(l.y.Provider,{value:I,children:c})}},35289:function(e,t,s){"use strict";s.d(t,{n:function(){return a}});var n=s(85893);function a(e){let{className:t="",amount:s}=e;return(0,n.jsxs)("div",{"data-testid":"temporary-card-authorization",className:"text-center ".concat(t),children:[(0,n.jsx)("h2",{className:"text-h5",children:"*Temporary Card Authorization"}),(0,n.jsxs)("p",{className:"text-body-small","data-testid":"temporary-authorized-amount",children:["By placing your order, you agree to the privacy policy. Your credit/debit card will be"," ",(0,n.jsxs)("b",{children:["temporarily authorized for ",s,"."]})," Your statement will reflect the final order total after order completion."," ",(0,n.jsx)("i",{children:"Prices may vary from in-store prices, including for item substitutions and final weight of some items."})]})]})}},83848:function(e,t,s){"use strict";s.r(t),s.d(t,{OrderDetails:function(){return ei},__N_SSP:function(){return ea},default:function(){return er}});var n=s(85893),a=s(53731),r=s(20265),i=s(71706),l=s(80407),c=s(89057),d=s(97544),o=s(80054),u=s(83978),m=s(26816),x=s(26744),h=s(68092),p=s(32639),f=s(43704),j=s(91307),v=s(28556),y=s(67294);
1function N(e){let{className:t,pastOrder:s,currentOrder:a,addItemsToCurrentOrder:r,disabled:i=!1}=e,[l,c]=(0,y.useState)(!1),[d,u]=(0,y.useState)(!1),{user:m}=(0,j.b)();if("SELF"===(0,v.o)().get("fulfillmentType"))return null;let x=l?"Adding...":o.F.ADD_ALL_TO_CART,N=async()=>{c(!0);let e=null==s?void 0:s.items.filter(e=>!(null==a?void 0:a.items.find(t=>t.upcId===e.upcId)));if(0===e.length){c(!1),u(!0);return}let t=e.map(e=>{var t;let s={replacementPreference:e.replacementPreference,replacementUpcIds:e.replacementUpcIds};return(null===(t=e.replacements)||void 0===t?void 0:t.length)>0&&(s={replacementPreference:"USER_CHOICE",replacementUpcIds:e.replacements.map(e=>e.upcId)}),{upcId:e.upcId,quantity:e.quantity,unitOfMeasure:e.unitOfMeasure,...s}}),[,n]=await (0,f.Y)(r(t));if(c(!1),n){(0,p.m)(n.message);return}u(!0)};return d?(0,n.jsx)(h.z,{className:t,"aria-label":"All items successfully added","data-testid":"add-all-items-to-cart-button",variant:"outlined",color:"red",children:o.F.ALL_ITEMS_ADDED_TO_CART}):(0,n.jsx)(h.z,{className:t,"aria-label":"Click here to add all items from this order to your cart",disabled:i||l||!m,onClick:N,"data-testid":"add-all-items-to-cart-button",children:x})}var g=s(39902),b=s(52659),w=s(11163);function E(e){let{order:t,setCanceling:s}=e,a=(0,w.useRouter)(),[r,i]=(0,y.useState)(!1);async function l(){s(!0);try{await (0,g.pE)({url:"user/orders/".concat(t.id),body:{action:"CANCEL"}}),a.push("/account/purchases/canceled")}catch(e){s(!1),(0,p.m)(e.message)}}return"SUBMITTED"!=t.status?(0,n.jsx)(n.Fragment,{}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(h.z,{variant:"outlined",width:"full",onClick:()=>i(!0),children:"Cancel Order"}),(0,n.jsx)(b.V,{title:"Are You Sure?",message:"Are you sure you want to cancel your order? This cannot be undone.",cancelButtonLabel:"No, Keep Order",confirmButtonLabel:"Yes, Cancel",open:r,onClose:()=>i(!1),onConfirm:l})]})}var I=s(17091),A=s(1005);function C(e){let{hasAlcohol:t}=e,{fulfillmentType:s}=(0,A.s)();if(!t||!s)return(0,n.jsx)(n.Fragment,{});let a="";return"DELIVERY"===s?a=o.F.ALCOHOL_VERIFICATION_MESSAGE_FOR_DELIVERY:"PICKUP"===s&&(a=o.F.ALCOHOL_VERIFICATION_MESSAGE_FOR_PICKUP),(0,n.jsxs)(I.Z,{className:"p-5",children:[(0,n.jsx)("h2",{className:"mb-3 text-h4",children:"Alcohol Verification"}),(0,n.jsx)("p",{children:a})]})}var P=s(24189),S=s(54327),D=s(17396),O=s(93230),T=s(68726),_=s(43471);function R(e){var t;let{order:s}=e;return(0,n.jsxs)(I.Z,{className:"p-5",children:[(0,n.jsx)("h2",{className:"mb-3 text-h4",children:{DELIVERY:"Delivery",PICKUP:"Curbside Pickup",SELF:"In store"}[s.fulfillment.type]}),(0,n.jsx)("div",{children:"CANCELED"===s.status?(0,n.jsxs)("div",{className:"flex items-center",children:[(0,n.jsx)(P.J,{className:"mr-3 text-navy",name:"Clock"}),(0,n.jsx)("div",{children:(0,n.jsxs)("p",{className:"text-h6",children:["Canceled ",(0,O.Gc)(s,"LLL dd, hh:mm a")]})})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"flex",children:[(0,n.jsx)(P.J,{className:"mr-3 text-navy",name:"DeliveryAddress"}),"DELIVERY"===s.fulfillment.type&&(0,n.jsxs)("div",{className:"grid w-full gap-1 xl:grid-cols-[1fr,1fr] xl:gap-8",children:[(0,n.jsxs)("div",{className:"flex flex-col gap-1 xl:gap-0",children:[(null===(t=s.deliveryAddress)||void 0===t?void 0:t.nickName)&&(0,n.jsx)("p",{className:"my-0.5 text-h6",children:s.deliveryAddress.nickName}),(0,n.jsx)("p",{className:"mt-2","data-testid":"delivery-address-line",children:(0,S.S)(s.deliveryAddress)})]}),(0,n.jsx)(T.c,{order:s,className:"self-end"})]}),"PICKUP"===s.fulfillment.type&&(0,n.jsxs)("div",{"data-testid":"pickup-fulfillment-address",children:[(0,n.jsxs)("p",{className:"my-0.5 text-h6",children:["Schnucks ",s.store.name]}),(0,n.jsx)("p",{className:"mt-2",children:(0,S.S)(s.store.address)})]})]}),(0,n.jsx)("hr",{className:"my-4"}),(0,n.jsxs)("div",{className:"flex",children:[(0,n.jsx)(P.J,{className:"mr-3 text-navy",name:"Clock"}),(0,n.jsxs)("div",{children:[(0,n.jsxs)("p",{className:"my-0.5 flex flex-wrap items-center gap-x-4 text-h6","data-testid":"fulfillment-date",children:[(0,O.Gc)(s),(0,n.jsx)(_.k,{className:"",order:s})]}),!(0,O.CK)(s.status)&&(0,n.jsxs)("p",{className:"mt-2",children:[(0,D.kC)(s.fulfillment.type)," is anticipated in this time window."]})]})]})]})})]})}function k(e){let{order:t}=e;return(0,n.jsxs)("section",{className:"flex items-center justify-between rounded-lg bg-coupon px-7 py-5 text-white shadow-md shadow-navy/30 md:py-2",children:[(0,n.jsx)(P.J,{name:"StarCluster",className:"md:hidden"}),(0,n.jsxs)("div",{className:"flex w-full flex-col items-center gap-1.5 md:flex-row md:justify-between",children:[(0,n.jsxs)("div",{className:"flex flex-col items-center justify-between gap-1.5 md:flex-row md:justify-items-start md:gap-2",children:[(0,n.jsx)(P.J,{name:"StarCluster",className:"hidden md:flex"}),(0,n.jsxs)("div",{className:"flex items-center justify-start md:gap-2",children:[(0,n.jsx)("h3",{className:"text-h5 md:text-h3",children:"Schnucks Rewards"}),(0,n.jsx)(P.J,{className:"hidden -scale-x-100 md:flex",name:"StarCluster"})]}),(0,n.jsxs)("h5",{className:"text-h6 md:mx-10 md:text-h5",children:[t.rewardPointsEarned," ",0===t.rewardPointsEarned||t.rewardPointsEarned>1?"Points":"Point"," ","Earned!"]})]}),(0,n.jsx)(r.r,{href:"https://nourish.schnucks.com/web-ext/user/rewards-history",target:"nourish",color:"navy",direction:"right",className:"my-2 flex h-0",size:"custom",children:"View My Rewards"})]}),(0,n.jsx)(P.J,{className:"-scale-x-100 md:hidden",name:"StarCluster"})]})}var F=s(81146),L=s(86598),U=s(73083),V=s(92340);function M(e){let{open:t,onClose:s}=e;return(0,n.jsxs)(V.u,{open:t,onClose:s,children:[(0,n.jsx)(V.u.Header,{title:"Editing Order Failed",onClose:s,style:"grey"}),(0,n.jsx)(V.u.Content,{children:(0,n.jsx)("section",{className:"mx-auto p-8 md:w-3/4",children:(0,n.jsx)("p",{className:"text-center text-body md:text-body-large",children:"Uh Oh! It looks like a shopper has already started shopping for your order. Edits can only be made before an order is being shopped."})})}),(0,n.jsx)(V.u.Footer,{children:(0,n.jsx)(h.z,{className:"mx-auto w-full max-w-[300px]",onClick:s,children:"Ok, Exit Order Editing"})})]})}var z=s(30120);
1function q(e){let{iconName:t,title:s,description:a}=e;return(0,n.jsxs)("li",{className:"mb-4 flex items-start gap-4 border-b border-light-grey pb-4 last-of-type:border-0",children:[(0,n.jsx)(P.J,{name:t,size:24,className:"text-navy"}),(0,n.jsxs)("div",{className:"flex flex-col gap-1.5",children:["string"==typeof s?(0,n.jsx)("h5",{className:"text-h5",children:s}):s,"string"==typeof a?(0,n.jsx)("p",{children:a}):a]})]})}let Y=()=>(0,n.jsx)("div",{className:"flex items-center",children:(0,n.jsx)(l.P,{})});function J(e){var t;let{date:s,location:a}=e;return(0,n.jsxs)("ul",{"data-testid":"pickup-list-test",children:[(0,n.jsx)(q,{iconName:"Parking",title:"Parking Instructions",description:"Please park in designated pickup area."}),(0,n.jsx)(q,{iconName:"PinLocation",title:(null==a?void 0:a.storeName)?"Schnucks ".concat(null==a?void 0:a.storeName):null,description:null!==(t=null==a?void 0:a.fullAddress)&&void 0!==t?t:(0,n.jsx)(Y,{})}),(0,n.jsx)(q,{iconName:"Clock",title:null!=s?s:(0,n.jsx)(Y,{}),description:s?"Order is in a temperature controlled environment until you arrive.":null})]})}function B(e){var t;let{title:s,message:a,open:i,onClose:l}=e,{order:c}=(0,U.A)();return(0,n.jsxs)(V.u,{open:i,onClose:l,children:[(0,n.jsx)(V.u.Header,{title:"Pickup Instructions",onClose:l,style:"grey"}),(0,n.jsx)(V.u.Content,{children:(0,n.jsxs)("section",{className:"p-4 md:mb-48 md:p-8",children:[(0,n.jsxs)("div",{className:"mb-3 border-b border-light-grey pb-3",children:[(0,n.jsx)("h4",{className:"mb-1.5 text-h3 md:text-h4",children:s}),(0,n.jsx)("p",{children:a})]}),(0,n.jsx)(J,{date:function(e){if(!e||!e.fulfillment.window)return;let{window:{date:t,label:s}}=e.fulfillment,{weekdayShort:n,monthShort:a,day:r}=z.ou.fromMillis(t);return"".concat(n,", ").concat(a," ").concat(r,", ").concat(s)}(c),location:function(e){if(!e)return;let{addressLine1:t,city:s,state:n,zipCode:a}=e.store.address;return{fullAddress:"".concat(t," ").concat(s,", ").concat(n," ").concat(a),storeName:"".concat(null==e?void 0:e.store.name)}}(c)})]})}),(0,n.jsx)(V.u.Footer,{children:(null==c?void 0:c.pickupUrlLink)&&(0,n.jsx)(r.r,{variant:"contained",href:null!==(t=null==c?void 0:c.pickupUrlLink)&&void 0!==t?t:"#",className:"mx-auto w-full md:w-[375px]","data-testid":"im-at-the-store-button",children:"I'm at the Store"})})]})}function H(){let{order:e,revalidate:t}=(0,U.A)(),s=(0,w.useRouter)(),[a,r]=(0,y.useState)(!1),[i,l]=(0,y.useState)(!1),{user:c}=(0,j.b)(),{fulfillmentCustomerId:d}=(0,A.s)(),o=e&&(0,O.IE)(e.status,e.fulfillment.type),u=(0,y.useCallback)(async()=>{if(e){if(!await (0,O.HF)(e.id)){l(!0);return}s.push("/shop/orders/".concat(e.id))}},[e,s]),x=()=>{var t;r(!0),(0,m.R)("Viewed PickupInstructionsModal Screen","PICKUP",{order_id:null==e?void 0:e.id,emailAddress:null==c?void 0:null===(t=c.emailAddresses[0])||void 0===t?void 0:t.emailAddress,customer_id:d,ssoUser_id:null==c?void 0:c.ssoUserId})};if(!e||!o)return null;let{title:p,message:f,progress:v}=o;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(I.Z,{className:"flex flex-col items-center bg-white p-5 text-center",children:[(0,n.jsx)("h2",{className:"mb-2 text-h2",children:p}),(0,n.jsx)(_.k,{className:"mb-2",order:e}),f&&(0,n.jsx)("p",{className:"max-w-2xl",children:f}),"CANCELED"===e.status?(0,n.jsx)(F.Q,{className:"mt-4",name:"OrderCanceled"}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"w-full p-5",children:(0,n.jsx)(L.r,{steps:O.zX[e.fulfillment.type],progress:v})}),"SUBMITTED"===e.status&&(0,n.jsx)(h.z,{variant:"contained",onClick:u,children:"Add or Edit Items"}),"READY_FOR_PICKUP"===e.status&&(0,n.jsx)(h.z,{className:"mt-8 w-[322px]",variant:"contained",onClick:()=>x(),children:"Pickup Instructions"})]})]}),(0,n.jsx)(M,{open:i,onClose:async()=>{await t(),l(!1)}}),(0,n.jsx)(B,{open:a,onClose:()=>r(!1),title:p,message:f})]})}var K=s(65874),G=s(74114),Z=s(542),Q=s(25675),W=s.n(Q);function X(e){var t;let{className:s="",item:a,quantity:r,replacementPreference:i,refunded:l=!1,catalogItems:c}=e,{id:d,discounts:o,imageUrl:u,name:m,unitPriceString:x,unit:h,totalPriceString:p,submittedQuantity:f}=a,j=c.find(e=>{let{upcId:t}=e;return t===a.upcId}),[v,N]=(0,y.useState)(!1);return(0,n.jsxs)("div",{className:"flex items-center gap-5 ".concat(s),"data-testid":"item-".concat(d),children:[(0,n.jsx)("div",{className:"size-[66px]",children:(0,n.jsx)(W(),{src:u||"",alt:"",width:66,height:66,"data-testid":"item-".concat(d,"-image"),className:"object-contain ".concat(v?"size-full":""),onLoad:()=>N(!0)})}),(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:"lg:hidden",children:[(0,n.jsx)("p",{className:"text-h6","data-testid":"item-".concat(d,"-total-price-mobile"),children:p}),o.map((e,t)=>(0,n.jsxs)("p",{className:"text-h6 text-red","data-testid":"item-".concat(d,"-discount-mobile"),children:[e.name,": -",D.VF.format(e.amount)]},t))]}),(0,n.jsx)("p",{"data-testid":"item-".concat(d,"-name"),children:m}),(0,n.jsxs)("div",{className:"flex gap-5",children:[(0,n.jsxs)("p",{"data-testid":"item-".concat(d,"-unit-price"),children:[x,h&&" / ".concat(h)]}),null==j?void 0:null===(t=j.loyaltyRules)||void 0===t?void 0:t.map(e=>(0,n.jsx)(G._,{className:"text-h6",fill:"none",decorationStart:(0,n.jsx)(P.J,{className:"text-coupon",name:"SmallStar"}),decorationEnd:(0,n.jsx)(P.J,{className:"text-coupon",name:"SmallStar"}),children:e.promoText},e.id)),(null==j?void 0:j.teammateDiscountEligible)&&(0,n.jsx)(Z.e,{}),(0,n.jsxs)("p",{"data-testid":"item-".concat(d,"-quantity"),children:[l?"Refunded: ".concat(f):"Qty: ".concat(r),"lb"===h&&" lb",!l&&r<f&&" (requested ".concat(f,")")]})]}),i&&(0,n.jsxs)("div",{className:"flex items-center gap-1 text-h6",children:[(0,n.jsx)(P.J,{name:"SubstituteSmall"}),(0,n.jsx)("p",{"data-testid":"item-".concat(d,"-replacement-pref"),children:O.jk[i]})]})]}),(0,n.jsxs)("div",{className:"ml-auto hidden text-right lg:block",children:[(0,n.jsxs)("p",{className:"text-h6","data-testid":"item-".concat(d,"-total-price"),children:[l&&"-",p]}),o.map((e,t)=>(0,n.jsxs)("p",{className:"text-h6 text-red","data-testid":"item-".concat(d,"-discount"),children:[e.name,": -",D.VF.format(e.amount)]},t))]})]})}function $(e){let{item:t,catalogItems:s}=e;return(0,n.jsxs)("div",{children:[(0,n.jsx)(X,{className:"opacity-50",item:t,quantity:t.quantity,catalogItems:s}),(0,n.jsx)(P.J,{className:"my-2.5 flex w-[66px] justify-center",n
1ame:"Replacement"}),t.replacements.map(e=>(0,n.jsx)(X,{item:e,quantity:e.quantity,catalogItems:s},e.id))]})}function ee(e){var t;let{items:s,reconciled:a=!1}=e,r=s.map(e=>e.upcId),{catalogItems:i}=(0,K.r)({upcIds:r}),l=null!==(t=null==i?void 0:i.filter(e=>s.find(t=>t.upcId===e.upcId)))&&void 0!==t?t:[],c=(0,y.useMemo)(()=>{let e=[],t=[],n=[];return a?s.forEach(s=>{var a;if(null===(a=s.replacements)||void 0===a?void 0:a.length){t.push(s);return}if(s.submittedQuantity&&!s.quantity){n.push(s);return}e.push(s)}):e.push(...s),{found:e,replaced:t,refunded:n}},[s,a]);return(0,n.jsxs)(I.Z,{className:"p-5",children:[!!c.found.length&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("h2",{className:"mb-2 text-h4",children:a?"Found Items":"Items Overview"}),(0,n.jsx)("div",{children:c.found.map((e,t)=>(0,n.jsxs)(y.Fragment,{children:[0!=t&&(0,n.jsx)("hr",{className:"my-4"}),(0,n.jsx)(X,{item:e,quantity:e.quantity,replacementPreference:a?void 0:e.replacementPreference,catalogItems:l},e.id)]},e.id))})]}),!!c.replaced.length&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("h2",{className:"mb-2 mt-8 text-h4",children:"Replacements"}),(0,n.jsx)("div",{children:c.replaced.map((e,t)=>(0,n.jsxs)(y.Fragment,{children:[0!=t&&(0,n.jsx)("hr",{className:"my-4"}),(0,n.jsx)($,{item:e,catalogItems:l},e.id)]},e.id))})]}),!!c.refunded.length&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("h2",{className:"mb-2 mt-8 text-h4",children:"Refunds"}),(0,n.jsx)("div",{children:c.refunded.map((e,t)=>(0,n.jsxs)(y.Fragment,{children:[0!=t&&(0,n.jsx)("hr",{className:"my-4"}),(0,n.jsx)(X,{item:e,quantity:e.quantity,catalogItems:l,refunded:!0},e.id)]},e.id))})]})]})}var et=s(25136),es=s(7736),en=s(35289),ea=!0;function er(e){let{siteSettings:t,orderId:s}=e,a=(0,U.A)(),{fulfillmentType:r}=(0,A.s)(),l=(0,y.useRef)(!1);return(0,y.useEffect)(()=>{r&&!l.current&&((0,m.R)("Viewed EcommOrderStatusDetails Screen",r),l.current=!0)},[r]),(0,n.jsx)(i.e,{siteSettings:t,title:o.F.ORDER_DETAILS_PAGE_TITLE,children:(0,n.jsx)(es.a,{orderId:s,children:(0,n.jsx)(ei,{currentOrderContext:a})})})}function ei(e){var t,s,i,o;let{currentOrderContext:m}=e,{order:h,loadingOrder:p}=(0,U.A)(),[f,j]=(0,y.useState)(!1),v=null==h?void 0:h.statusHistory.some(e=>"RECONCILED"===e.status);return p||f?(0,n.jsx)("div",{className:"flex justify-center",children:(0,n.jsx)(l.P,{})}):h?(0,n.jsxs)(a.W,{className:"px-5 md:px-0",children:[(0,n.jsx)(r.r,{href:u._.ACCOUNT_PURCHASES_DELIVERY_AND_CURBSIDE(),direction:"left",color:"navy",size:"sm",className:"mb-8 mt-4",children:"Recent Activity"}),(0,n.jsx)("h1",{className:"mb-5 text-h2",children:(()=>{if(!h)return"";switch(h.fulfillment.type){case"DELIVERY":return"Delivery Order #".concat(h.idString);case"PICKUP":return"Curbside Order #".concat(h.idString);default:return"#".concat(h.idString)}})()}),(0,n.jsxs)("div",{className:"flex flex-col gap-5 md:flex-row",children:[(0,n.jsxs)("div",{className:"flex w-full flex-col gap-5",children:[(0,n.jsx)(H,{}),(0,n.jsx)(R,{order:h}),(0,n.jsx)(c.x,{firstName:null===(t=h.customer)||void 0===t?void 0:t.firstName,lastName:null===(s=h.customer)||void 0===s?void 0:s.lastName,contactPhoneNumber:null===(i=h.customer)||void 0===i?void 0:i.contactPhoneNumber,contactEmail:null===(o=h.customer)||void 0===o?void 0:o.contactEmail}),(0,n.jsx)(C,{hasAlcohol:h.hasAlcohol}),v&&(0,n.jsx)(k,{order:h}),(0,n.jsx)(ee,{items:h.items,reconciled:v}),(0,n.jsx)(N,{addItemsToCurrentOrder:m.addItems,currentOrder:m.order,pastOrder:h,className:"self-center"})]}),(0,n.jsxs)("div",{className:"flex w-full shrink-0 flex-col gap-5 md:w-72 lg:w-96",children:[(0,n.jsx)(et.l,{reconciled:v}),(()=>{if((null==h?void 0:h.fulfillment.type)!=="DELIVERY")return!1;let e=h.statusHistory.some(e=>"DELIVERED"===e.status);switch(null==h?void 0:h.status){case"CANCELED":case"FINALIZED":return!1;default:return e}})()&&(0,n.jsx)(x.R,{orderId:h.id,tipAction:"UPDATE_TIP"}),(0,n.jsx)(d.h,{paymentMethods:h.paymentMethods}),!v&&(0,n.jsx)(en.n,{amount:h.temporaryAuthorizedAmountString}),(0,n.jsx)(E,{order:h,setCanceling:j})]})]})]}):(0,n.jsx)("p",{children:"Order not found"})}}},function(e){e.O(0,[96758,71706,92888,49774,40179],function(){return e(e.s=31354)}),_N_E=e.O()}]);
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.