PageSourceSearch

https://schnucks.com/_next/static/chunks/pages/order-ahead/seafood/checkout-d46846316ae2a1d5.js

js schnucks.com collected 2026-10-01 11:35:24 UTC 15,908 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[60148],{25933:function(e,t,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/order-ahead/seafood/checkout",function(){return l(27065)}])},50822:function(e,t,l){"use strict";l.d(t,{D:function(){return n}});var i=l(85893);function n(e){let{label:t,value:l,classNames:n=""}=e;return l?(0,i.jsxs)("p",{className:"line-clamp-1 ".concat(n),children:[t&&(0,i.jsxs)("span",{className:"text-h6",children:[t," "]}),l]}):null}},38306:function(e,t,l){"use strict";l.d(t,{e:function(){return N},z:function(){return j}});var i=l(85893),n=l(21867),s=l(25336),a=l(50822),o=l(32639),r=l(20350),c=l(43704),d=l(84585),u=l(54327),m=l(65228),p=l(68726),f=l(73083),x=l(91307),h=l(67294),v=l(87536);function j(){var e,t,l;let{user:a}=(0,x.b)(),{order:j,loadingOrder:k,updatingOrder:b,saveDetails:g}=(0,f.A)(),{open:S,completed:y,completeStep:E,toggleStep:I}=(0,r._0)("OrderInformationStep"),{handleSubmit:w,register:C,reset:O,formState:{isValid:_}}=(0,v.cI)(),P=async e=>{var t;let[,l]=await (0,c.Y)(g({action:"UPDATE_ORDER_DETAILS",customer:{firstName:e.firstName,lastName:e.lastName,dateOfBirth:null==j?void 0:null===(t=j.customer)||void 0===t?void 0:t.dateOfBirth,contactEmail:e.email,contactPhoneNumber:e.phone}}));l&&(0,o.m)(l.message)};return(0,h.useEffect)(()=>{!k&&(null==j?void 0:j.customer)&&(O({firstName:j.customer.firstName,lastName:j.customer.lastName,email:j.customer.contactEmail,phone:(0,m.CN)(j.customer.contactPhoneNumber)}),E())},[k,j,O,E]),(0,i.jsxs)(s.h,{open:S,completed:y,title:"Order Information",subtitle:S?"*This will not change your Rewards account information":"",subtitleContent:(0,i.jsx)(N,{order:j}),disableContinue:!_||b,onContinue:w(P),onToggle:I,children:[(0,i.jsxs)("section",{className:"flex flex-col gap-5 md:flex-row",children:[(0,i.jsx)(n.o,{label:"First name",fullWidth:!0,defaultValue:null==a?void 0:a.firstName,...C("firstName",{required:!0}),"data-testid":"first-name-input","aria-label":"Please enter your first name"}),(0,i.jsx)(n.o,{label:"Last name",fullWidth:!0,defaultValue:null==a?void 0:a.lastName,...C("lastName",{required:!0}),"data-testid":"last-name-input","aria-label":"Please enter your last name"})]}),(0,i.jsx)("hr",{className:"my-5"}),(null==j?void 0:j.fulfillment.type)&&({DELIVERY:(0,i.jsxs)("section",{children:[(0,i.jsx)("h2",{className:"mb-2 text-h5",children:"Delivery Address"}),(0,i.jsxs)("div",{className:"grid gap-1 xl:grid-cols-[max-content,auto] xl:gap-8",children:[(0,i.jsxs)("div",{className:"flex flex-col gap-1 xl:gap-0",children:[(null==j?void 0:null===(e=j.deliveryAddress)||void 0===e?void 0:e.nickName)&&(0,i.jsx)("p",{children:j.deliveryAddress.nickName}),(0,i.jsx)("p",{"data-testid":"address-line",children:(0,u.S)(null==j?void 0:j.deliveryAddress)})]}),(0,i.jsx)(p.c,{order:j,className:"self-end"})]})]}),PICKUP:(0,i.jsxs)("section",{children:[(0,i.jsx)("h2",{className:"mb-2 text-h5",children:"Pickup location"}),(0,i.jsxs)("p",{children:["Schnucks ",null==j?void 0:j.store.name]}),(0,i.jsx)("p",{"data-testid":"address-line",children:(0,u.S)(null==j?void 0:j.store.address)})]}),SELF:""})[j.fulfillment.type],(0,i.jsx)("hr",{className:"my-5"}),(0,i.jsxs)("section",{className:"flex flex-col gap-5 md:flex-row",children:[(0,i.jsx)("div",{className:"w-full",children:(0,i.jsx)(n.o,{...d._.email({register:C}),defaultValue:null==a?void 0:null===(t=a.emailAddresses[0])||void 0===t?void 0:t.emailAddress,"data-testid":"email-input","aria-label":"Please enter your email address"})}),(0,i.jsx)("div",{className:"w-full",children:(0,i.jsx)(n.o,{...d._.phone({register:C}),defaultValue:(0,m.CN)(null==a?void 0:null===(l=a.phoneNumbers[0])||void 0===l?void 0:l.phoneNumber),"data-testid":"phone-input","aria-label":"Please enter your phone number"})})]})]})}function N(e){var t,l,n,s,o;let{order:r}=e;return(null==r?void 0:r.fulfillment.type)?(0,i.jsxs)(i.Fragment,{children:["DELIVERY"===r.fulfillment.type&&(0,i.jsxs)("div",{className:"flex flex-col",children:[(0,i.jsx)(a.D,{value:"".concat(null===(t=r.customer)||void 0===t?void 0:t.firstName," ").concat(null===(l=r.customer)||void 0===l?void 0:l.lastName),classNames:"pb-2"}),(0,i.jsx)(a.D,{value:"".concat((null===(n=r.deliveryAddress)||void 0===n?void 0:n.nickName)?"".concat(r.deliveryAddress.nickName,", "):"").concat((0,u.S)(r.deliveryAddress))}),(0,i.jsx)(p.c,{order:r,className:"pb-1 pt-2",hideInfoButton:!0})]}),"PICKUP"===r.fulfillment.type&&(0,i.jsx)(a.D,{label:"Pickup at:",value:"Schnucks ".concat(r.store.name,", ").concat((0,u.S)(r.store.address))}),(0,i.jsxs)("div",{className:"flex flex-wrap gap-x-5 gap-y-2",children:[(0,i.jsx)(a.D,{label:"Phone:",value:(0,m.CN)(null===(s=r.customer)||void 0===s?void 0:s.contactPhoneNumber)}),(0,i.jsx)(a.D,{label:"Email:",value:null===(o=r.customer)||void 0===o?void 0:o.contactEmail})]})]}):null}},68726:function(e,t,l){"use strict";l.d(t,{c:function(){return r}});var i=l(85893),n=l(68092),s=l(24189),a=l(21102);let o={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 r(e){let{order:t,className:l,hideInfoButton:r=!1}=e,c=(0,a.R)(),{longDistance:d,fee:u}=(null==t?void 0:t.fulfillment.window)||{};if(!d||!u)return null;let{name:m,amountString:p}=u;return(0,i.jsxs)("div",{className:"flex flex-wrap gap-x-2 ".concat(l),children:[(0,i.jsx)("p",{className:"text-h6 text-red",children:null!=m?m:"Long-Distance Delivery Fee"}),!r&&(0,i.jsx)(n.z,{variant:"text",color:"red",className:"!p-0",onClick:()=>c(o),"data-testid":"ldd-fee-info-button",children:(0,i.jsx)(s.J,{name:"Info",className:"text-navy"})}),p&&(0,i.jsxs)("p",{children:[" + ",p," "]})]})}},27065:function(e,t,l){"use strict";l.r(t),l.d(t,{__N_SSG:function(){return Q},default:function(){return $}});var i=l(85893),n=l(53731),s=l(71706),a=l(74780),o=l(20350),r=l(83978),c=l(26816),d=l(97918),u=l(13109),m=l(99366),p=l(32639),f=l(96898),x=l(21102),h=l(41687),v=l(54122),j=l(21583),N=l(92541),k=l(85041),b=l(62846),g=l(10634),S=l(67294),y=l(63035),E=l(76279),I=l(68092),w=l(17091),C=l(80407),O=l(88809),_=l(54327),P=l(97865),D=l(95560);function T(e){let{storeId:t}=e,{store:l}=(0,g.o)(t),{ticket:n}=(0,u.s)(),[s,a]=(0,S.useState)(!1),{counterClosed:r,loadedPickupWindows:c,pickupWindowsError:d}=(0,P.E)({storeId:null==n?void 0:n.store,counter:null==n?void 0:n.counterType}),{completeStep:m,updateHelperText:p}=(0,o._0)("PickupLocationStep");return(0,S.useEffect)(()=>{c&&(r?p("Please update Pickup Location to proceed with placing an order."):(p(void 0),m()))},[m,p,c,r]),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(w.Z,{children:c?(0,i.jsx)(O.l,{title:"Pickup Location",error:r||d,errorMessage:r?"This Seafood counter is currently closed.":null==d?void 0:d.message,subtitleContent:(0,i.jsxs)("div",{children:[(0,i.jsxs)("p",{children:["Schnucks ",null==l?void 0:l.name]}),(0,i.jsxs)("div",{className:"flex flex-col gap-2 lg:flex-row lg:items-center",children:[(0,i.jsx)("p",{children:(0,_.S)(null==l?void 0:l.address)}),(0,i.jsx)(I.z,{className:"my-[-0.3125rem] shrink-0",variant:"text",color:"navy",size:"sm",onClick:()=>a(!0),children:"Change Pickup Location"})]})]}),checked:!0}):(0,i.jsx)("div",{className:"flex items-center justify-center py-6",children:(0,i.jsx)(C.P,{ariaLabel:"Loading Pickup Location"})})}),(0,i.jsx)(D.N,{open:s,onClose:()=>a(!1),resetNavigationOnStoreSelect:!1})]})}var L=l(38306),A=l(30120),R=l(24189),F=l(92340),W=l(93967),B=l.n(W),V=l(18837);function H(e){let{pickupWindows:t,isLoading:l,onSubmit:n,selectedWindow:s,...a}=e,[o,r]=(0,S.useState)(s);return(0,i.jsxs)(F.u,{...a,children:[(0,i.jsx)(F.u.Header,{onClose:a.onClose,style:"plain",title:"Select Pickup Time"}),(0,i.jsx)(F.u.Content,{children:(0,i.jsx)("div",{className:"mx-8 max-h-120 p-8",children:l?(0,i.jsx)("p",{children:"Loading times..."}):(0,i.jsx)("ul",{"aria-label":"Available pickup times",className:"flex flex-col gap-2.5",children:null==t?void 0:t.map(e=>(0,i.jsx)("li",{className:B()("flex rounded-2xl border p-4 transition-all hover:border-2 ",{"border-2 border-success":e.value===o,"border-light-grey":e.value!==o}),children:(0,i.jsxs)("button",{onClick:()=>r(e.value),className:"flex w-full flex-row items-center justify-between",children:[(0,i.jsx)("span",{className:"flex flex-row",children:e.label}),(0,i.jsxs)("div",{className:"flex items-center gap-2",children:[e.value===o&&(0,i.jsx)(R.J,{name:"CheckedCircleGreen",size:18}),(0,i.jsx)(V.O,{window:e})]})]})},e.value))})})}),(0,i.jsx)(F.u.Footer,{className:"flex items-center justify-center",children:(0,i.jsx)(I.z,{disabled:!o,onClick:()=>o&&n(o),children:"Done"})})]})}function M(){var e;let{ticket:t}=(0,u.s)(),[l,n]=(0,S.useState)(!1),[s]=(0,f.l)(h.m.SEAFOOD_STORE),a=(null==t?void 0:t.store)||(0,v.p3)(s),r=(0,S.useRef)(a),{pickupWindows:c,counterClosed:d,loadedPickupWindows:m,loadingPickupWindows:p,pickupWindowsError:x,mutate:j}=(0,P.E)({storeId:a,counter:"SEAFOOD",ticketId:null==t?void 0:t.t
1icketId}),{data:N,completeStep:k,updateData:b,resetSteps:g,updateHelperText:y}=(0,o._0)("PickupTimeStep"),E=async e=>{c&&void 0!==e&&(b({pickupWindow:{...c[c.findIndex(t=>t.value===e)]}}),k(),n(!1))};(0,S.useEffect)(()=>{r.current!==a&&(g(),r.current=a)},[g,a]),(0,S.useEffect)(()=>{m&&(d?y("Please select a Pickup Time Window to proceed with placing an order."):y(void 0))},[y,m,d]);let C=()=>{j(),n(!0)};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(w.Z,{children:[(0,i.jsx)(O.l,{title:"Pickup Time",error:d||x,errorMessage:d?"This Seafood counter is currently closed.":null==x?void 0:x.message,subtitleContent:(0,i.jsx)(L.e,{}),checked:!!N.pickupWindow,showEdit:!!N.pickupWindow,onEdit:C}),(0,i.jsxs)("div",{className:"flex flex-col gap-2 p-4",children:[(0,i.jsxs)("p",{className:"mb-1 text-h6",children:["Pickup Date: Today, ",A.ou.now().toFormat("MMM dd, yyyy")]}),!N.pickupWindow&&(0,i.jsx)("p",{className:"mb-4 text-body-small",children:"Seafood Orders are currently only available for day-of ordering"}),!!N.pickupWindow&&(0,i.jsx)("span",{children:N.pickupWindow.label}),!N.pickupWindow&&(0,i.jsx)(I.z,{onClick:C,children:"Select Pickup Time"})]})]}),(0,i.jsx)(H,{isLoading:p,open:l,onSubmit:E,pickupWindows:c,onClose:()=>n(!1),selectedWindow:null===(e=N.pickupWindow)||void 0===e?void 0:e.value})]})}var U=l(39902),z=l(43704),K=l(11163),q=l.n(K);function G(e){var t;let{ticket:l,disableButton:n,errorMessage:s}=e,[a,d]=(0,S.useState)(!1),{store:m}=(0,g.o)(l.store),{updateTicket:f}=(0,u.s)(),{data:x,allStepsCompleted:h,steps:v,currentStep:j}=(0,o.H0)(),N=async()=>{if(!x.contact||!x.pickupWindow||!x.notifications)throw Error("Invalid checkout data");d(!0);let[,e]=await (0,z.Y)((0,U.pE)({url:"notifications-api/v1/phone-opt-in/".concat(x.contact.phone),body:{optInType:"SERVICE_COUNTER_TEXTING",optInStatus:"ACCEPTED"}}));if(e){(0,p.m)(e.message),d(!1);return}let t=await f({action:"SCHEDULE",shortName:x.contact.name,cellPhone:x.contact.phone,sendText:x.notifications,pickupSlotId:x.pickupWindow.pickupSlotId,store:l.store,counterType:l.counterType});if(d(!1),t){(0,p.m)(t.message);return}(0,c.R)("Seafood Order Checkout Completed","SELF",{order_id:l.ticketId,order_number:l.sourceOrderNumber,pickup_store_id:l.store,ticket_status:l.ticketStatus}),q().push(r._.SEAFOOD_ORDER_RECEIVED(l.ticketId))};return(0,i.jsxs)("div",{className:"flex flex-col md:ml-4",children:[(0,i.jsxs)("p",{className:"mb-2 text-h4",children:["Place Order for Schnucks ",(0,i.jsx)("br",{className:"hidden xl:block"}),null==m?void 0:m.name]}),(0,i.jsx)("p",{className:"mb-6",children:"When your Seafood order is ready, it will be available for pickup at the Seafood counter."}),s&&(0,i.jsx)("p",{className:"my-4 text-center font-bold text-red",children:s}),(0,i.jsx)(I.z,{width:"custom",disabled:!h||a||n,onClick:N,children:"Place Order"}),(null===(t=v[j])||void 0===t?void 0:t.helperText)&&(0,i.jsx)(i.Fragment,{children:(0,i.jsx)("strong",{className:"mt-4 text-center text-red",children:v[j].helperText})})]})}var Y=l(75156),X=l(69910);function Z(e){let{ticket:t,removeItem:l}=e,n=(0,x.R)(),{ticket:s}=(0,u.s)(),[a]=(0,f.l)(h.m.SEAFOOD_STORE),{store:o,loadingStore:d}=(0,g.o)(a),{seafoodServiceCounters:I,isLoading:w}=(0,X.N)(),C=null==s?void 0:s.ticketItemList.map(e=>e.upcId),O=(0,S.useMemo)(()=>{if(!a)return;let e=null==I?void 0:I.find(e=>{var t;return(null==e?void 0:null===(t=e.storeInfo)||void 0===t?void 0:t.id)===parseInt(a)});return null==e?void 0:e.counterType},[I,a]),{catalogItems:_,loadingProducts:P}=(0,j.W)({store:(0,v.p3)(a),"upc-ids":C,catalog:"SERVICE_COUNTER",counter:O,includeNotOffered:!0,fetch:!!a}),[D,L]=(0,S.useState)(!1),A=(0,S.useCallback)(e=>{let t=null==_?void 0:_.find(t=>t.upcId===e.upcId);if(!t)return"UNAVAILABLE";let l=t.counters.find(e=>e.counter===O);if(l&&l.outOfStock)return"OUT_OF_STOCK"},[_,O]),R=async e=>{if(!await n({title:"Are you sure you want to remove this item from your order?",message:"By removing this item any customizations will be lost.",confirmButtonLabel:"Remove Item from Order",cancelButtonLabel:"Keep Item in Order",toggleHighlightedButton:!0}))return;let t=await l(e.ticketItemId);if(t){(0,p.m)(t.message);return}let i=null==_?void 0:_.find(t=>t.upcId===e.upcId);(0,c.R)("Seafood Cart Item Removed","SELF",{product_id:e.upcId,name:e.name,price:null==i?void 0:i.priceString,deal_price:null==i?void 0:i.dealPriceString,brand:null==i?void 0:i.brandName,quantity:e.quantity,portion_type:e.portioningType,ticket_item_id:e.ticketItemId})};return(0,S.useEffect)(()=>{L(t.ticketItemList.some(e=>A(e)))},[A,t.ticketItemList]),(0,i.jsxs)("div",{className:"flex flex-col gap-6 md:flex-row",children:[(0,i.jsxs)("div",{className:"flex w-full flex-col gap-6","data-testid":"seafood-ticket-item-list",children:[t.ticketItemList.map(e=>{let t=null==_?void 0:_.find(t=>t.upcId===e.upcId);return(0,i.jsx)(k.N,{ticketItem:e,catalogItem:t,onRemove:()=>R(e),unavailableStatus:A(e),quantityLabel:(0,y.PA)(e),portioningDisplayName:(0,E.uH)(e),editLabel:"Edit Seafood Item",loading:P||d||w,counterType:"SEAFOOD",renderModal:l=>{let{open:n,onClose:s}=l;return t?(0,i.jsx)(Y.n,{catalogItem:t,isProductInCart:!0,currentTicketItem:e,open:n,onClose:s},null==t?void 0:t.upcId):null}},e.ticketItemId)}),(0,i.jsx)(m.U,{label:"Add another seafood item to this order?",linkLabel:"Continue Shopping",href:r._.SEAFOOD()}),(o||(null==t?void 0:t.store))&&(0,i.jsx)(T,{storeId:(null==o?void 0:o.id)||(null==t?void 0:t.store)}),(0,i.jsx)(M,{}),(0,i.jsx)(N.h,{}),(0,i.jsx)(b.Z,{})]}),(0,i.jsx)("div",{className:"flex h-fit w-full shrink-0 flex-col gap-5 md:w-64 lg:w-72 xl:w-[26.25rem] tall:md:sticky tall:md:top-36 tall:xl:top-44",children:(0,i.jsx)(G,{ticket:t,disableButton:D,errorMessage:D?"Please remove unavailable items before proceeding.":void 0})})]})}let J={PickupLocationStep:{enabled:!0,completed:!1},PickupTimeStep:{enabled:!0,completed:!1},YourContactInformationStep:{enabled:!0,completed:!1},OrderNotificationsStep:{enabled:!0,completed:!1}};var Q=!0;function $(e){let{siteSettings:t}=e,{ticket:l,loadingTicket:m,validatingTicket:p,removeItem:f}=(0,u.s)();return(0,S.useEffect)(()=>{(0,c.R)("Viewed SeafoodCheckout Screen","SELF")},[]),(0,i.jsx)(s.e,{siteSettings:t,title:"Checkout",fulfillmentBanner:"HI
1DDEN",breadcrumbs:[r.K.HOME,r.K.ORDER_AHEAD,r.K.SEAFOOD,r.K.SEAFOOD_CHECKOUT],children:(0,i.jsxs)(n.W,{className:"px-4",children:[(0,i.jsx)("h1",{className:"mb-7 text-h2 md:text-h1",children:"Checkout"}),m||p?(0,i.jsx)(d.n,{}):(null==l?void 0:l.ticketItemList.length)?(0,i.jsx)(o.HG,{defaultState:J,children:(0,i.jsx)(Z,{ticket:l,removeItem:f})}):(0,i.jsx)(a.j,{noMargin:!0,illustration:"DeliGray",title:"No Order Ahead Items to Show!",message:"When you add items they will appear here",buttonHref:r._.SEAFOOD(),buttonText:"Start Shopping",buttonVariant:"contained"})]})})}}},function(e){e.O(0,[96758,71706,70816,238,92888,49774,40179],function(){return e(e.s=25933)}),_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.