1import{r as d,s as h,j as e,ak as ie,l as z,aJ as W,aO as ne,Y as oe}from"./vendor-4dc6bb9b.js";import{bW as re,q as B,c as I,C as A,b as le,t as ce,v as ae,x as N,k as H,aC as de,aV as K,R as _,aE as ue,$ as T,cs as $,ct as q,F as M,bK as L,P as pe,bO as Q,Z,cu as me,cv as xe,L as he,cw as Se,cx as fe,cy as ge,cz as J,bz as Ce,cA as ye,b5 as Fe,bp as je,bl as be,bN as ke,cB as Ee,cC as ve}from"./index-53eeb11a.js";import{C as De,u as Le,D as Te,a as Ie,b as Ae,c as we}from"./ConsumerExploreSegment-8e84c00d.js";import{C as Re}from"./Card-fa496090.js";import{p as Oe,S as _e}from"./SegmentFilterIcon-8567e2ee.js";import{N as $e}from"./NetworkingError-c2bb8e27.js";import{D as Me,a as Pe,b as Be,M as Ne,N as G,c as He,T as Ue,d as We}from"./styles-c112e453.js";import{c as X}from"./compostable-20bb66f2.js";import{I as Ye,F as ze,a as ee,P as Ge,D as Ve,T as Ke,b as qe,c as Qe,d as P,e as Ze,f as Je,g as Xe}from"./useIsReviewsExperience-5ed195c9.js";import{D as et}from"./IconUtils-6a909387.js";import{S as te}from"./SpiceTag-7640f871.js";import"./SegmentFilterUtils-3f8d3818.js";import"./useDebounceEffect-795b7b76.js";import"./Utilities-983ae5e1.js";import"./UnavailableOverlay-5564e35f.js";import"./getShefPreviewPath-f682ef30.js";import"./Carousel-28273423.js";import"./useSliderState-59fca23c.js";import"./CuisineIcon-fcfb599f.js";import"./ScrollSnapCarousel-faf7b481.js";import"./arrow-brand-secondary-500-e8bafb0a.js";import"./arrow-ec49624e.js";import"./useScrollSnapCarousel-e1027cfa.js";import"./Row-bd03da6e.js";import"./AppInput-86a9ad24.js";import"./DatePickerInput-62305587.js";import"./index-5e12abcb.js";import"./warning-6a1ec0ac.js";import"./util-cd03b289.js";import"./index-83ae54cc.js";import"./useOutsideClick-9464e492.js";import"./Chip-3fd4bea0.js";const tt=({zipCode:t,deliveryDays:n,dietaryFilters:s,spiceLevelFilters:i,cuisineFilters:a,segmentFilters:o,isEcoFriendlyPackaging:r})=>{const{code:c}=re(),u=!!(c!=null&&c.code),{isSmallScreen:p}=B(),m=d.useMemo(()=>JSON.stringify({excludePromoSegment:u,zipCode:t,deliveryDays:n,dietaryFilters:s,spiceLevelFilters:i,cuisineFilters:a,segmentFilters:o,smallScreen:p,promoCode:c==null?void 0:c.code,isEcoFriendlyPackaging:r}),[u,t,n,s,i,a,o,p,c==null?void 0:c.code,r]);return{filters:d.useMemo(()=>JSON.parse(m),[m]),stringifiedFilters:m}},st=h.div` 2 margin: 24px auto 30px auto; 3 padding: 0 14px; 4 5 @media (min-width: 768px) { 6 width: 750px; 7 8 padding: 0 ${I.SINGLE}; 9 margin: 0 auto ${I.SINGLE_HALF} auto; 10 } 11 @media (min-width: 1200px) { 12 width: 1140px !important; 13 } 14`,it=h.hr` 15 height: 3px; 16 width: 40px; 17 background-color: ${A.RADISH}; 18 19 margin: 7px 0 30px 0; 20 21 @media (max-width: ${le.SMALL}) { 22 margin-top: ${I.SINGLE}; 23 } 24`,nt=h.span` 25 margin-bottom: -4px; 26`,ot=h(Re)` 27 border: none; 28`,rt=h.div` 29 text-align: ${ce("smallScreen","inherit","center")}; 30`,lt=h.div` 31 color: ${A.GRAY_DARK_20}; 32 font-weight: ${ae.BOLD}; 33 font-family: ${N.BODY_SANS}; 34`,ct=h.div` 35 color: ${A.GRAY}; 36 font-family: ${N.BODY_SANS}; 37`,at=({currentCuisineId:t,cuisines:n,smallScreen:s})=>{const i=H(),a=(o,r)=>{i.track(T.MORE_CUISINES_CLICK,{cuisineCategoryId:o,ancestorCuisineCategoryId:r})};return!n||n.length===0?null:e.jsxs(st,{children:[e.jsx(De,{children:e.jsx(nt,{children:"More Cuisines"})}),e.jsx(it,{}),e.jsx("div",{style:{display:"flex",flexDirection:s?"column":"row"},children:n.map(o=>{const{icon:r,hoverIcon:c,title:u}=Oe(o.category),{category:{id:p,title:m},numShefs:l,numDishes:S}=o,f=l===1?"shef":"shefs",x=S===1?"dish":"dishes";return e.jsx(ie,{onClick:()=>a(t,p),to:de(_.CONSUMER_EXPLORE_CUISINE_SEARCH,[{slug:K.CUISINE,value:p}]),children:e.jsx(ot,{noPaddingOnSmallScreen:!0,children:e.jsxs("div",{style:{display:"flex",flexDirection:s?"row":"column",alignItems:"center"},children:[e.jsx(_e,{colored:!0,segmentFilter:p,icon:r,hoverIcon:c,title:u,active:!1,onClick:ue}),e.jsxs(rt,{smallScreen:s,children:[e.jsx(lt,{children:m}),e.jsx(ct,{children:`${l} ${f} ⢠${S} ${x}`})]})]})})},p)})})]})},dt="https://cdn.shef.com/assets/dark-compostable-61bda828.svg",ut=({selected:t,onClick:n})=>{const s=t?dt:X;return e.jsxs(Ye,{name:"eco-filter",onClick:n,selected:t,children:[e.jsx(ze,{children:e.jsx("img",{src:s,alt:"compost-tag",style:{height:24}})}),"Eco Friendly Packaging"]})},pt=({activeDietaryTags:t,activeSpiceLevelFilters:n,isEcoFriendlyPackaging:s,onClick:i})=>{const a=t.length+n.length+(s?1:0),o=a>0;return e.jsxs(ee,{name:"combined-filter",onClick:i,selected:o,showCaret:!0,children:["Filters ",o&&`(${a})`]})},mt=({deliveryDayOptions:t,selectedDates:n,onClick:s})=>{const i=d.useMemo(()=>n.map(r=>r.toFormat($)),[n]),a=d.useCallback(r=>{s(i.includes(r)?[...i.filter(c=>c!==r)]:[...i,r])},[s,i]),o=d.useMemo(()=>t.map(({date:r,count:c},u)=>{const p=r.toFormat($),{dayOfWeekString:m,isSelected:l,handleDeliveryDayButtonClick:S}={handleDeliveryDayButtonClick:()=>a(p),isSelected:i.includes(p),dayOfWeekString:r.weekdayShort};return e.jsxs(Me,{first:u===0,"data-cy":"delivery-day-filter-option",onClick:S,isSelected:l,children:[e.jsxs(Pe,{children:[e.jsx(Be,{children:m}),e.jsxs(Ne,{children:[r.monthShort," ",r.day]})]}),e.jsxs(e.Fragment,{children:[c===1&&e.jsx(G,{children:"1 shef"}),c>1&&e.jsxs(G,{children:[c," shefs"]})]})]},p)}),[t,a,i]);return e.jsx(He,{showSelectedOffscreenCount:!0,children:o})},xt="https://cdn.shef.com/assets/close20-758eb36b.svg",ht="https://cdn.shef.com/assets/thick-red-check-2f048e1b.svg",St=h.div` 38 font-family: ${N.SANS}; 39 font-size: 30px; 40 line-height: 40px; 41 padding: 0 ${I.DOUBLE_HALF}; 42 margin-bottom: 20px; 43`,ft=h.div` 44 width: 100%; 45 display: flex; 46 flex-direction: row; 47 justify-content: space-between; 48 align-items: center; 49 font-family: ${N.SANS}; 50 font-size: 20px; 51 line-height: 30px; 52 height: 30px; 53 margin-bottom: 20px; 54 padding: 0 ${I.DOUBLE_HALF}; 55 cursor: pointer; 56`,se=h.input` 57 -webkit-appearance: none;
58 width: 20px; 59 height: 20px; 60 border: 1px solid ${A.GRAY_DARK_30}; 61 :checked { 62 background-image: url(${ht}); 63 background-position: center; 64 background-repeat: no-repeat; 65 } 66 :focus { 67 outline: none !important; // bootstrap isnt gone yet :/ 68 } 69`;se.defaultProps={type:"checkbox"};const U=({title:t,options:n,selected:s,onSelect:i})=>e.jsxs(e.Fragment,{children:[e.jsx(St,{children:t}),n.map(({label:a,value:o},r)=>e.jsxs(ft,{onClick:()=>i(o),children:[a,e.jsx(se,{checked:s.includes(o),onChange:()=>{}})]},`${o}_${r}`))]}),Y=h.div` 70 display: flex; 71 flex-direction: row; 72 align-items: center; 73`,gt=h.span` 74 color: ${A.RADISH}; 75 font-weight: bold; 76 margin-left: 6px; 77`,Ct=({availableDeliveryDays:t,selectedDeliveryDays:n,setSelectedDeliveryDays:s})=>{const i=Le(),a=d.useMemo(()=>{const{timeZone:r}=Intl.DateTimeFormat().resolvedOptions();return t.map(c=>{const u=q(c,r),p=`${u.weekdayShort}. ${u.monthShort} ${u.day}`,m=i[c];return{value:c,label:e.jsxs(Y,{children:[p," ",m?e.jsx(gt,{children:m}):void 0]})}})},[t,i]),o=d.useCallback(r=>{const c=new Set(n);c.has(r)?c.delete(r):c.add(r),s([...c])},[n,s]);return e.jsx(U,{title:"Delivery Day",onSelect:o,options:a,selected:n})},yt=h(Y)` 78 display: flex; 79 align-items: center; 80`,Ft=h.span` 81 margin-left: ${I.THREE_QUARTERS}; 82 font-size: ${M.Size.M}; 83 font-family: ${M.Family.BODY_SANS}; 84`,V=[L.VEGETARIAN,L.VEGAN,L.GLUTEN_FREE,L.DAIRY_FREE,L.LOW_FODMAP,L.PALEO,L.WHOLE30,L.HALAL,L.KOSHER],jt=({selectedDietaryFilters:t,setSelectedDietaryFilters:n})=>{const s=d.useMemo(()=>V.map(a=>({value:a,label:e.jsxs(yt,{children:[e.jsx(et,{dietaryTag:a}),e.jsx(Ft,{children:a})]})})),[V]),i=d.useCallback(a=>{const r=!!t.includes(a)?[]:[a];n(r)},[t,n]);return e.jsx(U,{title:"Dietary",onSelect:i,options:s,selected:t})},bt=h.div` 85 height: 90px; 86 border-top: 1px solid ${A.GRAY_LITE_20}; 87 width: 100%; 88 display: flex; 89 flex-direction: column; 90 align-items: center; 91 padding-top: 10px; 92`,kt=h(pe)` 93 width: 50%; 94`,Et=({onClick:t})=>e.jsx(bt,{children:e.jsx(kt,{onClick:t,children:"Save"})}),vt=h.img` 95 margin-left: 6px; 96 width: 16px; 97`,Dt=({isEcoSelected:t,setIsEcoSelected:n})=>{const s={value:"eco-filter",label:e.jsxs(Y,{children:["Eco Friendly Packaging",e.jsx(vt,{src:X})]})},i=d.useCallback(()=>{n(!t)},[t,n]);return e.jsx(U,{title:"Other",onSelect:i,options:[s],selected:t?["eco-filter"]:[]})},Lt=h.div` 98 display: flex; 99 align-items: center; 100`,Tt=h.span` 101 margin-left: ${I.THREE_QUARTERS}; 102 font-size: ${M.Size.M}; 103 font-family: ${M.Family.BODY_SANS}; 104`,It=({availableSpiceLevels:t,selectedSpiceLevelFilters:n,setSelectedSpiceLevelFilters:s})=>{const i=d.useMemo(()=>t.map(o=>{const r=e.jsxs(Lt,{children:[e.jsx(te,{spiceLevel:Q[o],imageSize:"20px"}),e.jsx(Tt,{children:o})]});return{value:o,label:r}}),[t]),a=d.useCallback(o=>{const r=new Set(n);r.has(o)?r.delete(o):r.add(o),s([...r])},[n,s]);return e.jsx(U,{title:"Spice Level",onSelect:a,options:i,selected:n})},At=h.div` 105 position: fixed; 106 top: 0; 107 bottom: 0; 108 left: 0; 109 right: 0; 110 background-color: ${A.WHITE}; 111 z-index: ${Z.DropdownFilter}; 112`,wt=h.div` 113 display: flex; 114 flex-direction: column; 115 overflow: scroll; 116 padding-top: 120px; 117 height: calc(100% - 90px); 118`,Rt=h.img` 119 width: 20px; 120 height: 20px; 121 position: fixed; 122 z-index: ${Z.DropdownFilter+1}; 123 object-position: center; 124 object-fit: none; 125 top: 10px; 126 left: 10px; 127 cursor: pointer; 128`,Ot=({availableDeliveryDays:t=[],dateFilters:n=[],dietaryFilters:s,availableSpiceLevels:i=[],spiceLevelFilters:a=[],showEcoFilter:o=!1,isEcoFriendlyPackaging:r=!1,onSave:c,onClose:u})=>{const p=d.useRef(null);me({enabled:!0,scrollableTargetRef:p});const{show:m,hide:l}=xe();he(()=>{l(),document.activeElement instanceof HTMLInputElement&&document.activeElement.blur()}),Se(()=>{m()});const[S,f]=d.useState(s),[x,y]=d.useState(a),[j,D]=d.useState(n),[b,F]=d.useState(r),C=d.useCallback(()=>{c({newDateFilters:j,newDietaryFilters:S,newSpiceLevelFilters:x,newEcoFilter:b})},[b,c,j,S,x]);return e.jsxs(At,{children:[e.jsxs(wt,{ref:p,children:[e.jsx(jt,{selectedDietaryFilters:S,setSelectedDietaryFilters:f}),!!i.length&&e.jsx(It,{availableSpiceLevels:i,selectedSpiceLevelFilters:x,setSelectedSpiceLevelFilters:y}),!!t.length&&e.jsx(Ct,{availableDeliveryDays:t,selectedDeliveryDays:j,setSelectedDeliveryDays:D}),o&&e.jsx(Dt,{isEcoSelected:b,setIsEcoSelected:F})]}),e.jsx(Et,{onClick:C}),e.jsx(Rt,{src:xt,onClick:u})]})},_t=({availableDeliveryDatesWithShefCount:t,selectedDates:n,handleDateFilterChange:s,activeDietaryFilters:i,availableSpiceLevelFilters:a,selectedSpiceLevelFilters:o,isEcoFriendlyPackaging:r,isEcoFilterAvailable:c,handleMultipleFilterChange:u,dietaryFilter:p,ecoFilterButton:m,spiceFilter:l})=>{const[S,f]=d.useState(null),x=H(),y=d.useCallback(g=>{f(null),x.track(T.SUBMIT_DIETARY_FILTER,{dietaryTags:g.newDietaryFilters}),x.track(T.SUBMIT_SPICE_FILTER,{spiceLevels:g.newSpiceLevelFilters}),u({dietaryFilters:g.newDietaryFilters,spiceLevelFilters:g.newSpiceLevelFilters,ecoFilter:g.
128newEcoFilter})},[u,x]),j=d.useCallback(g=>{x.track(T.SUBMIT_DELIVERY_DAY_FILTER,{dates:g}),s(g)},[s,x]),D=d.useCallback(()=>{f(g=>g==="combined"?null:"combined")},[]),b=d.useCallback(()=>{f(null)},[]),{isSmallScreen:F}=B(),C=d.useMemo(()=>i.filter(g=>!fe.includes(g)),[i]);return e.jsxs(Ge,{children:[e.jsx(Ve,{children:"Pick your delivery dates"}),e.jsx(Ke,{children:e.jsx(Ue,{showInfoCircle:!0,event:T.DELIVERY_DATE_TOOLTIP_OPEN,eventProperty:{tooltipPage:"explore"},closeOnClickMobile:!0,content:ge,children:e.jsx(qe,{children:F?"":"Why?"})})}),e.jsx(Qe,{children:F?"":"Filter by"}),F?e.jsxs(P,{"data-cy":"combined-filter-button",children:[e.jsx(pt,{activeDietaryTags:C,activeSpiceLevelFilters:o,isEcoFriendlyPackaging:r,onClick:D}),S==="combined"&&e.jsx(Ot,{onSave:y,onClose:b,dietaryFilters:C,availableSpiceLevels:a,spiceLevelFilters:o,showEcoFilter:c,isEcoFriendlyPackaging:r})]}):e.jsxs(e.Fragment,{children:[p,l,m]}),e.jsx(mt,{deliveryDayOptions:t,selectedDates:n,onClick:j})]})},$t=({activeSpiceLevels:t,onClick:n})=>{const s=t.length>0,i=t.length?"":"Spice Level";return e.jsxs(ee,{name:"spice-level-filter",onClick:n,selected:s,showCaret:!0,children:[i,s&&`${t.join(", ")}`]})},Mt=h.div` 129 display: flex; 130 align-items: center; 131`,Pt=h.span` 132 margin-left: ${I.HALF}; 133`,Bt=({spiceLevelOptions:t,activeSpiceLevels:n,onSubmit:s})=>{const i=d.useMemo(()=>t.map(o=>({value:o,display:e.jsxs(Mt,{children:[e.jsx(te,{spiceLevel:Q[o]}),e.jsx(Pt,{children:o})]})})),[t]),a=d.useCallback(o=>{s(o?{spiceLevels:o}:{})},[s]);return e.jsx(Ze,{filterKey:"spice-level",filterTitle:"Spice Level",filterOptions:i,selectedValues:n,onSubmit:a})},Nt=({isOpen:t,selectedSpiceLevelFilters:n,onOpen:s,onChange:i,className:a})=>{const o=H(),r=d.useCallback(()=>{s(),!t&&o.track(T.CLICK_SPICE_FILTER,{})},[t,s,o]);return e.jsxs(P,{"data-cy":"spice-level-filter-button",className:a,children:[e.jsx($t,{activeSpiceLevels:n,onClick:r}),t&&e.jsx(Bt,{spiceLevelOptions:Object.values(J),activeSpiceLevels:n,onSubmit:i})]})},Ht=({availableDeliveryDates:t,selectedDates:n,handleDateFilterChange:s,activeDietaryFilters:i,handleDietaryFilterChange:a,offsetTop:o=0,isEcoFriendlyPackaging:r,toggleIsEcoFriendlyPackaging:c,isEcoFilterAvailable:u,handleMultipleFilterChange:p,availableSpiceLevelFilters:m,activeSpiceLevelFilters:l,handleSpiceLevelFilterChange:S})=>{const[f,x]=d.useState(null),y=H(),j=d.useCallback(({dates:E,dietaryTags:R,spiceLevels:O})=>{x(null),E&&(y.track(T.SUBMIT_DELIVERY_DAY_FILTER,{dates:E}),s(E)),R&&(y.track(T.SUBMIT_DIETARY_FILTER,{dietaryTags:R}),a(R)),O&&(y.track(T.SUBMIT_SPICE_FILTER,{spiceLevels:O}),S(O))},[y,s,a,S]),D=d.useCallback(()=>{x(E=>E==="deliveryDay"?null:"deliveryDay")},[]),b=d.useCallback(()=>{x(E=>E==="dietaryTag"?null:"dietaryTag")},[]),F=d.useCallback(()=>{x(E=>E==="spiceLevel"?null:"spiceLevel")},[]),{isSmallScreen:C}=B(),{isDishFirst:g}=Ce(),k=e.jsx(Nt,{isOpen:f==="spiceLevel",selectedSpiceLevelFilters:l,onChange:j,onOpen:F}),v=e.jsx(We,{isOpen:f==="dietaryTag",selectedDietaryFilters:i,onChange:j,onOpen:b}),w=u&&e.jsx(P,{"data-cy":"compostable-filter-button",children:e.jsx(ut,{selected:r,onClick:c})});return g?e.jsx(Je,{offsetTop:o,children:e.jsxs(Xe,{noMargin:C,children:[e.jsxs(P,{"data-cy":"delivery-day-filter-button",children:[e.jsx(Te,{selectedDates:n,onClick:D}),f==="deliveryDay"&&e.jsx(Ie,{deliveryDayOptions:t.map(({date:E})=>E),selectedDates:n,onSubmit:j})]}),v,k,w]})}):e.jsx(_t,{availableDeliveryDatesWithShefCount:t,selectedDates:n,handleDateFilterChange:s,activeDietaryFilters:i,availableSpiceLevelFilters:m,selectedSpiceLevelFilters:l,isEcoFriendlyPackaging:r,isEcoFilterAvailable:u,handleMultipleFilterChange:p,dietaryFilter:v,ecoFilterButton:w,spiceFilter:k})},Ut=({loading:t,segmentFilters:n,segments:s,handleDateFilterChange:i,dietaryFilters:a,availableSpiceLevelFilters:o,spiceLevelFilters:r,cuisineStringFilters:c,handleDietaryFilterChange:u,handleSpiceLevelFilterChange:p,handleCuisineFilterChange:m,dateFilters:l,availableDeliveryDays:S,timeZone:f,ecoFilter:x,toggleEcoFilter:y,isEcoFilterAvailable:j,handleMultipleFilterChange:D})=>{const b=d.useMemo(()=>!n.length||n.includes(ye.All)||s.some(k=>{var v;return(v=k.preview)==null?void 0:v.showAllFiltersWhenExpanded})||!s.length,[n,s]),F=[];d.useEffect(()=>{!t&&!z.isEqual(F,c)&&m([...F],"replaceIn")},[c,m,t,F]);const C=d.useMemo(()=>(S==null?void 0:S.map(({date:k,count:v})=>({date:q(k,f),count:v})))??[],[S,f]),g=d.useMemo(()=>l&&l.length>0?C.map(({date:k})=>k).filter(k=>l.find(v=>k.toFormat($)===v)):[],[C,l]);return d.useEffect(()=>
133{if(!t){const k=l.filter(v=>C.find(({date:w})=>v===w.toFormat($)));z.isEqual(l,k)||i(k,"replaceIn")}},[C,l,t,i]),b?e.jsx(Ht,{availableDeliveryDates:C,selectedDates:g,handleDateFilterChange:i,activeDietaryFilters:a,handleDietaryFilterChange:u,availableSpiceLevelFilters:o,activeSpiceLevelFilters:r,handleSpiceLevelFilterChange:p,offsetTop:0,isEcoFriendlyPackaging:x,toggleIsEcoFriendlyPackaging:y,isEcoFilterAvailable:j,handleMultipleFilterChange:D}):null},Wt=({segments:t,timeZone:n,dateFilters:s,handleSegmentFilterChange:i,scrollToSegmentFilter:a,smallScreen:o,hasActiveDietaryFilters:r,query:c,additionalContent:u=e.jsx("div",{children:"GET $10"}),additionalContentIndex:p=2})=>{const m=t.map((l,S,f)=>{const{subcuisineSegmentDetails:x}=l,y=x?{segmentFilter:x.rootCuisineRegion,subcuisineFilter:x.subcuisineId}:{segmentFilter:l.id};return e.jsx(Ae,{smallScreen:o,segment:l,timeZone:n,dateFilters:s,onSeeAllClicked:()=>i(y),isPreview:l.content.isInPreview,onBackClicked:()=>i({segmentFilter:null}),rowNumber:S,totalRows:f.length,enableSpacers:!0,scrollToMe:l.id===a,hasActiveDietaryFilters:r,query:c},l.id)});return u?[...m.slice(0,p),u,...m.slice(p)]:m},Yt=h(Fe)` 134 display: block !important; 135 margin: 16px auto; 136`,zt=h.div` 137 /* Hack for swipeable sections to not cause side scrolling on page */ 138 overflow-x: 'hidden'; 139 padding: 0; 140`,Gt=({segments:t,exploreQueryParams:n,loading:s,error:i,zipCodeNotServed:a,timeZone:o,availableDeliveryDays:r,smallScreen:c})=>{const{searchQuery:u,cuisineFilters:p,activeZipCode:m,segmentFilters:l,scrollToSegmentFilter:S,dateFilters:f,dietaryFilters:x,spiceLevelFilters:y,ecoFilter:j,toggleEcoFilter:D,handleSegmentFilterChange:b,handleDateFilterChange:F,handleDietaryFilterChange:C,handleSpiceLevelFilterChange:g,handleCuisineFilterChange:k,handleMultipleFilterChange:v,clearFilters:w}=n,E=x.length>0,R=d.useMemo(()=>Wt({segments:t,timeZone:o,dateFilters:f,handleSegmentFilterChange:b,scrollToSegmentFilter:S,smallScreen:!!c,hasActiveDietaryFilters:E,query:u??"",additionalContent:null}),[t,o,f,b,S,E,u,c]);return s||!t&&!i?e.jsx(je,{minHeightVh:30,marginTopVh:50,delayMs:300}):m?!s&&!i&&a?e.jsx(W,{to:_.WAITLIST_HOME}):i?e.jsx($e,{error:i,message:"Sorry, looks like you're having trouble connecting! Please try again later."}):e.jsxs(e.Fragment,{children:[e.jsx(ne,{children:e.jsxs("title",{children:["Shef - Search results for ",u??"..."]})}),e.jsxs("div",{children:[e.jsx(Ut,{loading:s,segmentFilters:l,segments:t,handleDateFilterChange:F,dietaryFilters:x,handleDietaryFilterChange:C,availableSpiceLevelFilters:Object.values(J),spiceLevelFilters:y,handleSpiceLevelFilterChange:g,cuisineStringFilters:p,handleCuisineFilterChange:k,availableDeliveryDays:r==null?void 0:r.map(O=>({date:O,count:0})),dateFilters:f,timeZone:o,ecoFilter:j,toggleEcoFilter:D,isEcoFilterAvailable:!1,handleMultipleFilterChange:v}),e.jsx(zt,{children:R.length?R:e.jsxs(e.Fragment,{children:[e.jsx("h4",{style:{textAlign:"center"},children:"No search results found."}),e.jsx(Yt,{title:"Clear Filters",onClick:w})]})})]})]}):e.jsx(W,{to:_.CONSUMER_LANDING})},Es=({match:t})=>{var b,F;const n=be(t,K.CUISINE),s=we({match:t}),{activeZipCode:i,dateFilters:a,dietaryFilters:o,spiceLevelFilters:r,ecoFilter:c,segmentFilters:u}=s,p=d.useMemo(()=>{var C;return((C=ke())==null?void 0:C.id)??oe()},[]),{filters:m}=tt({zipCode:i,deliveryDays:a,dietaryFilters:o,spiceLevelFilters:r,segmentFilters:u,cuisineFilters:[n],isEcoFriendlyPackaging:c}),{data:l,error:S,loading:f}=Ee({variables:{zipCode:i??"",cuisineTitle:"",seed:p,numFoodItems:1,filters:m},fetchPolicy:"cache-first",nextFetchPolicy:"cache-first",skip:i===null}),x=d.useMemo(()=>(l==null?void 0:l.exploreCuisine.segments)??[],[l==null?void 0:l.exploreCuisine.segments]),y=!!(l&&(!l.zipCode||((b=l.zipCode)==null?void 0:b.availableToCustomers)===!1)),j=((F=l==null?void 0:l.zipCode)==null?void 0:F.timeZone)??ve.LosAngeles,{isSmallScreen:D}=B();return i===null?e.jsx(W,{to:_.CONSUMER_LANDING}):e.jsxs(e.Fragment,{children:[e.jsx(Gt,{segments:x,exploreQueryParams:s,loading:f,error:S,zipCodeNotServed:y,timeZone:j,availableDeliveryDays:l==null?void 0:l.exploreCuisine.availableDeliveryDays,smallScreen:D}),e.jsx(at,{currentCuisineId:n,cuisines:l==null?void 0:l.exploreCuisine.ancestorCuisinesAvailability,smallScreen:D})]})};export{Es as ConsumerExploreCuisine,Es as default}; 141//# sourceMappingURL=ConsumerExploreCuisine-85240d75.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.