1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[852],{5269:(e,l,t)=>{"use strict";t.d(l,{A:()=>v});var s=t(37876),r=t(89033),a=t(14232),i=t(98477),o=t(16253),n=t(626),c=t(66497),d=t(69936),u=t(98942),h=t(33473),p=t(46637),m=t(72576),x=t(42710);function v(e){let{title:l,handleSelection:t,allActiveStores:v,metroAreas:f,isStoreButtonLink:g,isStateZoom:y,pickupLocationSelection:j=!1}=e,{t:N}=(0,r.Bd)(),{geolocation:w,fetchGeolocation:S,loading:_}=(0,u.m)(),[b,A]=(0,a.useState)(""),[k,E]=(0,a.useState)(b),[L,C]=(0,a.useState)(!1),T=w&&"string"!=typeof w?w:null,R=(0,a.useRef)(null),I=(0,a.useCallback)(async(e,l,s,r)=>{(0,i.flushSync)(()=>{C(!0)});try{await t(e,l,s,r)}finally{C(!1)}},[t]),{data:M,loading:q}=(0,p.Fi)({searchTerm:k,latitude:null==T?void 0:T.lat,longitude:null==T?void 0:T.lng}),z=(0,a.useMemo)(()=>{var e,l;return(null==M||null==(l=M.stores)||null==(e=l.publicStoreInfoSearch)?void 0:e.map(e=>({distanceInMiles:e.distanceInMiles,...e.store})))||[]},[M]);(0,a.useEffect)(()=>{let e=setTimeout(()=>{E(b)},500);return()=>{clearTimeout(e)}},[b]);let B=(0,a.useMemo)(()=>(null==T?void 0:T.lat)&&(null==T?void 0:T.lng)?(0,x.j)(v,null==T?void 0:T.lat,null==T?void 0:T.lng):v,[null==T?void 0:T.lat,null==T?void 0:T.lng,v]),D=((null==z?void 0:z.length)||0)>0?z:B;return(0,a.useEffect)(()=>{S()},[S]),(0,s.jsxs)("div",{className:"bg-white p-4 pt-0 sm:pb-0 sm:pt-[40px]",children:[(0,s.jsxs)("div",{className:"flex px-0 lg:pt-10 lg:px-20",children:[(0,s.jsx)("div",{id:"map",className:"hidden lg:block flex-1 rounded-xl",children:(0,s.jsx)(h.A,{storeList:D,isLoading:q,hideCustomZoom:!((null==T?void 0:T.lat)&&(null==T?void 0:T.lng)||k&&!q&&(null==D?void 0:D.length)||y),isStateZoom:y})}),(0,s.jsxs)("div",{className:"flex-1",children:[(0,s.jsxs)("div",{"data-testid":"store-search-input",className:"md:px-4 pt-4 sm:pt-0 sticky top-[60px] sm:top-[80px] z-[9] bg-white lg:relative lg:top-0 lg:pt-2 lg:pl-[65px] lg:pr-0",children:[(0,s.jsx)(d.A,{as:"h1",variant:"display3",className:"mb-4 lg:mb-9",children:l}),(0,s.jsx)(c.A,{autoFocus:!0,className:"!h-[40px] bg-white",value:b,onChange:e=>A(e.target.value),placeholder:N("order:search_store"),contentLeft:(0,s.jsx)(n.A,{className:"text-grey-20 relative size-5"}),contentRight:b&&(null==b?void 0:b.length)<3?(0,s.jsx)(d.A,{variant:"finePrint",className:"text-grey-60",children:N("stores:keep_typing")}):void 0})]}),(0,s.jsx)("div",{className:"px-1 relative text-sm pl-0 lg:pl-[65px] flex-1 sm:overflow-y-scroll",ref:R,children:(0,s.jsx)("div",{id:"store-list",className:"flex-1 mt-4 sm:mt-0 md:px-4 lg:px-0",children:(0,s.jsx)(m.A,{showLoader:q||_,stores:D,searchTerm:b,geoLocation:w,handleSelection:I,metroAreas:f,isButtonLink:g,pickupLocationSelection:j})})})]})]}),L?(0,s.jsx)("div",{className:"fixed z-50 inset-0 backdrop-blur",children:(0,s.jsx)("div",{className:"flex flex-col items-center justify-center w-full h-full",children:(0,s.jsx)("div",{className:"w-24 h-24 sm:w-32 sm:h-32 lg:w-36 lg:h-36",children:(0,s.jsx)(o.A,{})})})}):null]})}},15956:(e,l,t)=>{"use strict";t.r(l),t.d(l,{__N_SSG:()=>p,default:()=>m});var s=t(37876),r=t(89033),a=t(89099),i=t(14232),o=t(16253),n=t(85426),c=t(94517),d=t(5269),u=t(55020),h=t(76202),p=!0;function m(e){let{allActiveStores:l,metroAreas:t}=e,u=(0,a.useRouter)(),{customer:p}=(0,n.L)(),{clearOrder:m,setIsCatering:x,setTempCateringStoreSlug:v}=(0,c.jg)(),{t:f}=(0,r.Bd)(),g="string"==typeof u.query.hasSelectedStore?u.query.hasSelectedStore:"",y=u.query.sourceType===h.Y14.Delivery?h.Y14.Delivery:h.Y14.CarryOut,j=e=>"/order/".concat(y.toLowerCase(),"/").concat(e);(0,i.useEffect)(()=>{u.isReady&&p&&g&&(m(),x(!0),v(g),u.replace(j(g)))},[m,p,g,u.isReady,u,x,v,y]);let N=async(e,l)=>{try{(function(e,l){if(!l)throw Error("No store ID available for the selected store.");if(!e)throw Error("No store slug available for the selected store.")})(e,l),m(),x(!0),v(e),await u.push(j(e))}catch(e){console.error("Selection Error:",e instanceof Error?e.message:e)}};return(null==u?void 0:u.isReady)?p?(0,s.jsx)("div",{className:"p-4 space-y-3 h-full",children:(0,s.jsx)("div",{className:"max-w-9xl m-auto",children:(0,s.jsx)(d.A,{title:f("order:pickup_location"),handleSelection:N,allActiveStores:l,metroAreas:t})})}):(u.push("/order"),null):(0,s.jsx)(o.A,{})}m.getLayout=e=>(0,s.jsx)(u.A,{cta:!1,footer:!1,children:e})},37352:(e,l,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/order/catering",function(){return t(15956)}])},41946:(e,l,t)=>{var s=t(71266);e.exports=function(e,l){return s(e,l)}}},e=>{e.O(0,[2953,6578,4e3,9555,1221,5020,198,636,6593,8792],()=>e(e.s=37352)),_N_E=e.O()}]); 2//# sourceMappingURL=catering-df1736b251542b40.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.