1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7424],{4466:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/order-ahead/cakes",function(){return n(84876)}])},75303:function(e,t,n){"use strict";n.d(t,{B:function(){return f},W:function(){return d}});var r=n(85893),i=n(8766),o=n(83978),s=n(26816),a=n(25675),u=n.n(a),c=n(41664),l=n.n(c);function d(e){let{storeId:t,category:n}=e,i=(()=>{let e=n.cakeItemList[0].type;return o._.CAKES(t,e)})();return(0,r.jsxs)(l(),{className:"flex flex-col items-center text-center",href:i,onClick:()=>{(0,s.R)("Cake Building Started","SELF")},children:[(0,r.jsx)(u(),{className:"aspect-square object-contain",src:n.imageUrl||"",alt:"",width:308,height:308}),(0,r.jsx)("h2",{className:"mb-1 mt-3 text-h3",children:n.name}),(0,r.jsx)("p",{children:n.description}),(0,r.jsx)("p",{className:"font-bold text-red",children:n.leadTimeVerbiage})]})}function f(){return(0,r.jsxs)("div",{className:"flex flex-col items-center",children:[(0,r.jsx)(i.O,{width:"19.25rem",height:"19.25rem",rounded:"lg"}),(0,r.jsx)(i.O,{className:"mb-6 mt-3 text-h3",disableMargin:!0}
1),(0,r.jsx)(i.O,{width:"10.375rem",height:"2.75rem",rounded:"lg"})]})}},22156:function(e,t,n){"use strict";n.d(t,{B:function(){return s}});var r=n(39902),i=n(91307),o=n(5068);function s(e){let{user:t}=(0,i.b)(),n=(0,o.ZP)(()=>e.store?{url:"bakery-api/v1/cake-categories",params:e,authenticated:!!t}:null,r.R1,{shouldRetryOnError:!1,revalidateOnFocus:!1});return{categories:n.data,categoriesError:n.error,loadingCategories:n.isLoading}}},24134:function(e,t,n){"use strict";n.d(t,{G:function(){return s}});var r=n(85893),i=n(53731),o=n(75303);function s(e){let{storeId:t,categories:n}=e;return(0,r.jsx)(i.W,{className:"mb-56 mt-2 px-8",children:(0,r.jsx)("div",{className:"grid grid-cols-1 gap-x-5 gap-y-10 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",children:n.map(e=>(0,r.jsx)(o.W,{storeId:t,category:e},e.cakeCategoryId))})})}},52111:function(e,t,n){"use strict";n.d(t,{P:function(){return f}});var r=n(85893),i=n(62089),o=n(96898),s=n(83978),a=n(41687),u=n(26816),c=n(28482),l=n(88682),d=n(39332);function f(e){let{selectedStoreId:t,...n}=e,f=(0,d.useRouter)(),{cancelTicket:h}=(0,c.z)(),[p,g]=(0,o.l)(a.m.CAKES_STORE);return(0,r.jsx)(i.O,{title:"Select A Cake Pickup Location",description:"Cake order ahead is available in select Schnucks stores. Which store would you like to order and pick up from?",actionLabelType:"ORDER_AT",selectedStoreId:t,featuresFilter:l.bs,onSelectStore:e=>{var t;h(),g(e.id),(0,u.R)("Cake Store Changed","SELF",{pickup_store_id:e.id}),f.push(s._.CAKES(e.id)),null===(t=n.onClose)||void 0===t||t.call(n)},hideCloseButton:!p,displayStoreOfferings:!1,...n})}},15006:function(e,t,n){"use strict";n.d(t,{_:function(){return d}});var r=n(85893),i=n(72225),o=n(21102),s=n(54122),a=n(28482),u=n(87339),c=n(67294),l=n(52111);function d(e){let{store:t,loading:n=!1}=e,[d,f]=(0,c.useState)(!1),{ticket:h}=(0,a.z)(),p=(0,o.R)(),g=t?{label:"In-Store Pickup at",labelHighlight:t.name}:{actionLabel:"Select a Store"};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.y,{illustration:"Cakes",...g,loading:n,onClick:()=>{if(null==h?void 0:h.ticketItemList.length){p({...u.p4,onConfirm:()=>f(!0)});return}f(!0)}}),(0,r.jsx)(l.P,{selectedStoreId:(0,s.p3)(null==t?void 0:t.id),open:!n&&(!t||d),onClose:t&&(()=>f(!1))})]})}},84876:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSG:function(){return O},default:function(){return _}});var r=n(85893),i=n(71706),o=n(96898),s=n(80054),a=n(83978),u=n(41687),c=n(54122),l=n(53731),d=n(14106),f=n(75303);function h(){return(0,r.jsx)(l.W,{className:"mb-56 mt-2 px-8",children:(0,r.jsx)("div",{className:"grid grid-cols-1 gap-x-5 gap-y-10 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",children:(0,d.w6)(1,8).map(e=>(0,r.jsx)(f.B,{},e))})})}var p=n(98678),g=n(33676),y=n(17928),m=n(35863),v=n(88682),S=n(74356),b=n(22156),x=n(24134);function w(e){let[t]=(0,S.yR)(e.pageData,m.EK,{id:"cakes-home"}),{categories:n,categoriesError:i}=(0,b.B)({store:v.q0});return i?(0,r.jsx)("p",{children:"Error"}):n?(0,r.jsxs)(g.r,{slug:"order-ahead/cakes",children:[(0,r.jsx)(y.z,{sections:t.sections}),(0,r.jsx)(x.G,{storeId:v.q0,categories:n}),(0,r.jsx)(p.f,{slug:"order-ahead/cakes"})]}):(0,r.jsx)("p",{children:"Loading"})}var E=n(15006),k=n(39332),j=n(67294),O=!0;function _(e){let{draftMode:t,siteSettings:n,pageData:l}=e,d=(0,k.useRouter)(),[f,,p]=(0,o.l)(u.m.CAKES_STORE);return(0,j.useEffect)(()=>{f&&d.push(a._.CAKES((0,c.p3)(f)))},[d,f]),t?(0,r.jsx)(w,{pageData:l}):(0,r.jsxs)(i.e,{title:s.F.CAKES_PAGE_TITLE,siteSettings:n,customFulfillmentBanner:(0,r.jsx)(E._,{loading:!!f||!p}),breadcrumbs:[a.K.HOME,a.K.ORDER_AHEAD,a.K.CAKES()],children:[(0,r.jsx)("h1",{className:"sr-only",children:"Cakes"}),(0,r.jsx)(y.z,{sections:l.sections}),(0,r.jsx)(h,{})]})}},40275:function(e,t,n){"use strict";let r;n.d(t,{Kx:function(){return p},T:function(){return h},o_:function(){return g}});var i=n(67294);let o=new Uint8Array(16),s=[];for(let e=0;e<256;++e)s.push((e+256).toString(16).slice(1));var a={randomUUID:"u">typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let u=["channel/disconnect","channel/response","channel/heartbeat"],c=["handshake/syn","handshake/syn-ack","handshake/ack"],l=e=>u.some(t=>t===e),d=e=>c.some(t=>t===e),f=({data:e={}})=>"object"==typeof e&&null!==e&&!Array.isArray(e)&&!("domain"in e)&&["id","type","from","to"].every(t=>t in e)&&e.type.startsWith("handshake/");function h(e,t,n){let[u,c]=(0,i.useState)(),[h,p]=(0,i.useState)(!1);(0,i.useEffect)(()=>
1{if(window.self===window.top&&!window.opener)return;let e=function(e){let t=window.self!==window.top||window.opener,n={buffer:[],id:null,origin:null,source:null,status:"connecting"};function i(t,i){if(d(t)||l(t)||"connecting"!==n.status&&"reconnecting"!==n.status){if(n.id&&n.origin&&n.source){let u={connectionId:n.id,data:i,domain:"sanity/channels",from:e.id,id:function(e,t,n){if(a.randomUUID&&!e)return a.randomUUID();let i=(e=e||{}).random||(e.rng||function(){if(!r&&!(r="u">typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(o)})();return i[6]=15&i[6]|64,i[8]=63&i[8]|128,function(e,t=0){return s[e[t+0]]+s[e[t+1]]+s[e[t+2]]+s[e[t+3]]+"-"+s[e[t+4]]+s[e[t+5]]+"-"+s[e[t+6]]+s[e[t+7]]+"-"+s[e[t+8]]+s[e[t+9]]+"-"+s[e[t+10]]+s[e[t+11]]+s[e[t+12]]+s[e[t+13]]+s[e[t+14]]+s[e[t+15]]}(i)}(),to:e.connectTo,type:t};try{n.source.postMessage(u,{targetOrigin:n.origin})}catch{throw Error(`Failed to postMessage '${u.id}' on '${e.id}'`)}}}else n.buffer.push({type:t,data:i})}function u(t){if(f(t))console.error("Visual editing package mismatch detected! Please ensure you are using the latest version of Sanity Studio and any packages listed here:\nhttps://github.com/sanity-io/visual-editing");else if(function(t){let{data:n}=t;return"sanity/channels"===n.domain&&n.to===e.id&&n.from===e.connectTo&&"channel/response"!==n.type}(t)){let{data:e}=t;if(n.origin&&t.origin!==n.origin)return;if(t.source&&n.source!==t.source&&(n.source=t.source),d(e.type)&&e.data){if("handshake/syn"===e.type)return n.origin=t.origin,n.id=e.data.id,p("connecting"),void i("handshake/syn-ack",{id:n.id});if("handshake/ack"===e.type&&e.data.id===n.id)return void p("connected")}else if(e.connectionId===n.id&&t.origin===n.origin){if("channel/disconnect"===e.type)return void p("disconnected");{let t=[e.type,e.data];c.forEach(e=>{e(...t)}),i("channel/response",{responseTo:e.id})}return}}}let c=new Set,h=new Set;function p(e){n.status=e,h.forEach(t=>{t(e)}),"connected"===e&&function(){let e=[...n.buffer];n.buffer.splice(0,n.buffer.length),e.forEach(({type:e,data:t})=>{i(e,t)})}()}return window.addEventListener("message",u,!1),p("connecting"),{destroy:function(){["disconnected"].includes(n.status)||p("disconnected"),c.clear(),h.clear(),window.removeEventListener("message",u,!1)},inFrame:t,send:function(e,t){i(e,t)},subscribe:function(e){return c.add(e),()=>c.delete(e)},onStatusUpdate:function(e){return h.add(e),()=>h.delete(e)}}}({id:"preview-kit",connectTo:"presentation"});e.onStatusUpdate(e=>{"connected"===e?p(!0):"disconnected"===e&&p(!1)});let t=setTimeout(()=>c(e),0);return()=>{clearTimeout(t),e.destroy(),c(void 0)}},[n,t]);let g=JSON.stringify(Array.from(e.keys()));(0,i.useEffect)(()=>{"[]"!==g&&u&&h&&u.send("preview-kit/documents",{projectId:t,dataset:n,perspective:"previewDrafts",documents:Array.from(e.values())})},[g,u,h,n,e,t])}function p(e){let t=(0,i.useMemo)(()=>JSON.stringify(e||{}),[e]);return(0,i.useMemo)(()=>JSON.parse(t),[t])}function g(e){let{refreshInterval:t}=e,n=function(){let[e,t]=(0,i.useState)(!1);(0,i.useEffect)(()=>{t(navigator.onLine);let e=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",e),window.addEventListener("offline",n),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",n)}},[]);let n=(0,i.useSyncExternalStore)(y,()=>document.visibilityState,()=>"hidden");return!e||"hidden"===n}(),[r,o]=(0,i.useState)("hit"),s=(0,i.useCallback)(()=>(o("inflight"),()=>o("hit")),[]);return(0,i.useEffect)(()=>{if(!t||"hit"!==r)return;let e=setTimeout(()=>o("stale"),t);return()=>clearTimeout(e)},[t,r]),(0,i.useEffect)(()=>{if("hit"!==r)return;let e=()=>
1o("stale");return window.addEventListener("focus",e),()=>window.removeEventListener("focus",e)},[t,r]),(0,i.useEffect)(()=>{n&&"hit"===r&&o("stale"),n||"stale"!==r||o("refresh")},[n,r]),[r,s]}function y(e){return document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)}},80684:function(e,t,n){"use strict";n.d(t,{d:function(){return r}});let r=(0,n(67294).createContext)(null)},74356:function(e,t,n){"use strict";n.d(t,{Ji:function(){return m},yR:function(){return y}});var r,i,o=n(40275),s=n(67294),a=n(80684),u="u">typeof Element,c="function"==typeof Map,l="function"==typeof Set,d="function"==typeof ArrayBuffer&&!!ArrayBuffer.isView,f=(r=function(e,t){try{return function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){var r,i,o,s;if(t.constructor!==n.constructor)return!1;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(i=r;0!=i--;)if(!e(t[i],n[i]))return!1;return!0}if(c&&t instanceof Map&&n instanceof Map){if(t.size!==n.size)return!1;for(s=t.entries();!(i=s.next()).done;)if(!n.has(i.value[0]))return!1;for(s=t.entries();!(i=s.next()).done;)if(!e(i.value[1],n.get(i.value[0])))return!1;return!0}if(l&&t instanceof Set&&n instanceof Set){if(t.size!==n.size)return!1;for(s=t.entries();!(i=s.next()).done;)if(!n.has(i.value[0]))return!1;return!0}if(d&&ArrayBuffer.isView(t)&&ArrayBuffer.isView(n)){if((r=t.length)!=n.length)return!1;for(i=r;0!=i--;)if(t[i]!==n[i])return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf&&"function"==typeof t.valueOf&&"function"==typeof n.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString&&"function"==typeof t.toString&&"function"==typeof n.toString)return t.toString()===n.toString();if((r=(o=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(i=r;0!=i--;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;if(u&&t instanceof Element)return!1;for(i=r;0!=i--;)if(("_owner"!==o[i]&&"__v"!==o[i]&&"__o"!==o[i]||!t.$$typeof)&&!e(t[o[i]],n[o[i]]))return!1;return!0}return t!=t&&n!=n}(e,t)}catch(e){if((e.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw e}}).__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r,h={exports:{}},p={};h.exports=function(){if(i)return p;i=1;var e="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},t=s.useSyncExternalStore,n=s.useRef,r=s.useEffect,o=s.useMemo,a=s.useDebugValue;return p.useSyncExternalStoreWithSelector=function(i,s,u,c,l){var d=n(null);if(null===d.current){var f={hasValue:!1,value:null};d.current=f}else f=d.current;var h=t(i,(d=o(function(){function t(t){if(!i){if(i=!0,n=t,t=c(t),void 0!==l&&f.hasValue){var o=f.value;if(l(o,t))return r=o}return r=t}if(o=r,e(n,t))return o;var s=c(t);return void 0!==l&&l(o,s)?o:(n=t,r=s)}var n,r,i=!1,o=void 0===u?null:u;return[function(){return t(s())},null===o?void 0:function(){return t(o())}]},[s,u,c,l]))[0],d[1]);return r(function(){f.hasValue=!0,f.value=h},[h]),a(h),h},p}();var g=h.exports;function y(e,t,n,r){let{isEqual:i=f}=r||{},u=(0,s.useContext)(a.d),c=(0,o.Kx)(n),l=(0,s.useMemo)(()=>({subscribe:()=>()=>{},getSnapshot:()=>e}),[e]),d=(0,s.useMemo)(()=>(null==u?void 0:u(e,t,c))||{subscribe:()=>()=>{},getSnapshot:()=>e},[u,e,c,t]),[h]=(0,s.useState)(()=>{if(void 0===e)throw Error("initialSnapshot can't be undefined, if you don't want an initial value use null instead");try{return JSON.parse(JSON.stringify(e))}catch(t){return console.warn("Failed to deep clone initialSnapshot, this is likely an error and an indication that the snapshot isn't JSON serializable",{initialSnapshot:e,error:t}),e}}),p=(0,s.useCallback)(()=>h,[h]),y=(0,s.useCallback)(e=>e,[]),m=g.useSyncExternalStoreWithSelector((null==d?void 0:d.subscribe)||l.subscribe,(null==d?void 0:d.getSnapshot)||l.getSnapshot,p,y,i),v=null!==u;return[m,v&&h===m,v]}let m=(0,s.lazy)(()=>n.e(2330).then(n.bind(n,22330)))}},function(e){e.O(0,[6758,1548,1706,6047,7928,2888,9774,179],function(){return e(e.s=4466)}),_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.