1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8125],{1770:e=>{e.exports={header:"SearchTitleUI_header__ck3qR",headerContent:"SearchTitleUI_headerContent__3ZSdC",subCopy:"SearchTitleUI_subCopy__fwK1F",headerSectionWrapper:"SearchTitleUI_headerSectionWrapper__w9SCH",headerTitle:"SearchTitleUI_headerTitle__LaiDI","fade-in":"SearchTitleUI_fade-in__sdFwP","fade-out":"SearchTitleUI_fade-out__0u4lh","fade-in-and-zoom":"SearchTitleUI_fade-in-and-zoom__NLc6h","fade-out-and-zoom":"SearchTitleUI_fade-out-and-zoom__qXG9K"}},8298:(e,t,r)=>{"use strict";r.d(t,{y:()=>l});var a=r(14232),o=r(13803),n=r(85253);let l=()=>{let e=(0,o.o)().get("rwg_token");(0,a.useEffect)(()=>{e&&(0,n.TV)("rwgToken",e,{path:"/"})},[e])}},56813:(e,t,r)=>{"use strict";r.d(t,{FL:()=>d,SK:()=>s,vi:()=>i,xV:()=>c});var a=r(69180),o=r(66329),n=r(79735),l=r(34460);function s(e){let t=[],r=[];for(let a of e)(0,l.e2)(a.orderability)?t.push(a):r.push(a);return{available:t,unavailable:r}}function i(e){let t=e.getHours(),r=e.getMinutes();return t<n.M8||t===n.M8&&r<n.Ih}function c(e,t,r,n={}){let l=t&&!!n.allClosed,s=t&&!!n.allOfflineWithinHours;return e===a.n.COLLECTION?s?"Our restaurants are temporarily offline for collection. Please check back shortly.":l?"Our restaurants are closed for collection right now. Check back during opening hours.":t?"Unfortunately, no restaurants are available for collection right now. Please check back later or why not try delivery!":"These restaurants arenât offering collect right now. Please check back soon.":s?"Our restaurants are temporarily offline for delivery. Please check back shortly.":t&&i(r)?o.Z:l?"Our restaurants are closed for delivery right now. Check back during opening hours.":t?"Looks like we donât have any restaurants that can deliver to you right now - check back later or order Collect instead.":"These restaurants arenât delivering right now. Please check back soon."}function d(e){return"outsideDeliveryCatchment"===e?{title:"We canât deliver to this address right now",message:"Why not try ordering for collection instead?"}:"allCollectionSlotsBooked"===e?{title:"All collection times for today are booked",message:"Try delivery instead or check back tomorrow."}:{title:"No restaurants found",message:"Try searching for a different location"}}},62736:(e,t,r)=>{"use strict";r.d(t,{f:()=>o});var a=r(79964);let o={[a.D.UK]:"https://deliveroo.co.uk/brands/nandos",[a.D.IE]:"https://deliveroo.ie/takeaway/nandos"}},66329:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o,y:()=>a});let a="Sorry, we canât take orders at the moment.",o="Steady on early bird, our restaurants usually open at 11:30am."},67121:e=>{e.exports={infoBox:"SearchInstructions_infoBox__8wK4G",banner:"SearchInstructions_banner__XIFOe","fade-in":"SearchInstructions_fade-in__JBSY4","fade-out"
1:"SearchInstructions_fade-out__LFlGI","fade-in-and-zoom":"SearchInstructions_fade-in-and-zoom__ho1DK","fade-out-and-zoom":"SearchInstructions_fade-out-and-zoom__kSU6x"}},78215:e=>{e.exports={gridWrapper:"SearchContainer_gridWrapper__PqnWI",formSectionWrapper:"SearchContainer_formSectionWrapper__wrzOd",formWrapper:"SearchContainer_formWrapper__nK4zR","fade-in":"SearchContainer_fade-in__EUYNR","fade-out":"SearchContainer_fade-out__15ynH","fade-in-and-zoom":"SearchContainer_fade-in-and-zoom__FugpF","fade-out-and-zoom":"SearchContainer_fade-out-and-zoom__RiZat"}},79735:(e,t,r)=>{"use strict";r.d(t,{Ih:()=>o,M8:()=>a,u_:()=>n});let a=11,o=30,n=621371e-9},83844:e=>{e.exports={deliveroo:"styles_deliveroo__EDxCo","fade-in":"styles_fade-in__T1NpW","fade-out":"styles_fade-out__nJczn","fade-in-and-zoom":"styles_fade-in-and-zoom__awkAm","fade-out-and-zoom":"styles_fade-out-and-zoom__IjOIe"}},86710:(e,t,r)=>{"use strict";r.d(t,{Rb:()=>h,rG:()=>u});var a=r(67914),o=r(37149),n=r(67768),l=r(69180),s=r(19865);let i="restaurantSearch";function c(e){return e===l.n.DELIVERY?8e3:8e4}function d(e,t){return[i,e.fulfilmentType,e.latitude,e.longitude,t]}function u(e){let t=(0,s.Yy)(),r=e?.radius??(e?.fulfilmentType?c(e.fulfilmentType):0);return(0,a.I)({queryKey:e?d(e,r):[i,null],staleTime:15e4,queryFn:e?async()=>(await t.search(e.fulfilmentType,{latitude:e.latitude,longitude:e.longitude,radius:r})).getValueOrThrow():o.hT})}function h(){let e=(0,s.Yy)(),t=(0,n.jE)();return r=>{let a=r.radius??c(r.fulfilmentType);return t.fetchQuery({queryKey:d(r,a),staleTime:15e4,queryFn:async()=>(await e.search(r.fulfilmentType,{latitude:r.latitude,longitude:r.longitude,radius:a})).getValueOrThrow()})}}},89455:(e,t,r)=>{"use strict";r.d(t,{K:()=>l,Q:()=>n});var a,o,n=((a={}).UNAVAILABLE_RESTAURANTS="restaurants-unavailable-error-modal",a.RESTAURANT_SEARCH_ERROR="restaurant-search-error-modal",a.ORDER_EXPERIENCE_ERROR="order-experience-error-modal",a.CURRENT_LOCATION="current-location-error-modal",a.ADDRESS_SEARCH_ERROR="address-search-error-modal",a),l=((o={}).RESTAURANT_CLOSED="restaurant-closed-error-model",o.PREORDER_AVAILABLE="preorder-available-error-modal",o.CLOSING_SOON="closing-soon-error-modal",o)},94642:(e,t,r)=>{"use strict";function a(e){if(e.results.length>0)return e.allOfflineWithinHours?"allTemporarilyOffline":e.allClosed?"allClosed":e.allUnavailable?"allUnavailable":null;switch(e.emptyReason){case"OUTSIDE_CATCHMENT":return"outsideDeliveryCatchment";case"ALL_CLOSED":return"allClosed";case"ALL_OFFLINE":return"allTemporarilyOffline";case"ALL_UNAVAILABLE":return"allUnavailable";case"NO_CAPACITY_TODAY":return"allCollectionSlotsBooked";default:return"noRestaurantsNearby"}}r.d(t,{b:()=>a})},98125:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Search:()=>eN,SearchHeader:()=>eL,__N_SSG:()=>eR,default:()=>ej});var a=r(37876),o=r(29454),n=r(77328),l=r.n(n),s=r(14232),i=r(87574),c=r(48929),d=r(9435),u=r(78215),h=r.n(u),f=r(97417),p=r(54494),m=r(48326),y=r(43048),g=r(89918),_=r(3523),C=r(44295),b=r(57124),v=r(89455),k=r(99005),S=r.n(k),w=r(6595),T=r(69825),E=r(40097),A=r(19865);let x=`We need to know where you are to find nearby ${b.G} restaurants. 2Location access is blocked for this site. You can turn it back on in your browser settings, or search by postcode instead.`,I=`We need to know where you are to find nearby ${b.G} restaurants. 3We couldnât get your location just then. Please try again, or search by postcode instead.`,R=({onClick:e,loading:t,id:r})=>(0,a.jsx)("button",{"aria-label":t?"Locatingâ¦":void 0,"data-testid":"locate-me-button",type:"button",className:"absolute top-9 left-1 flex h-[34px] w-8 cursor-pointer items-center justify-center rounded-xs border-none bg-transparent p-0 outline-none",disabled:t,onClick:e,id:r,children:t?(0,a.jsx)("div",{className:"h-5 w-5 animate-spin rounded-full border-2 border-transparent border-t-black"}):(0,a.jsx)("span",{className:(0,d.cn)("h-8 w-8 p-0",S().locateIcon),children:(0,a.jsx)(f.aZ,{})})}),L=({onLocate:e,manualEntryRef:t,id:r})=>{let{locate:o,loading:n,error:l,isPermissionDenied:i}=(({onLocate:e}={})=>
3{let[t,r]=(0,s.useState)(!1),[a,o]=(0,s.useState)(null),n=function(e){let{market:t}=e,r=(0,A.$G)();return(0,E.n)({mutationFn:({latitude:e,longitude:a})=>r.reverseGeocode({latitude:e,longitude:a,market:t})})}({market:(0,T.A)()}),l=(0,w.U)(),i=(0,s.useCallback)(()=>{let t=async t=>{try{let r=await n.mutateAsync({latitude:t.coords.latitude,longitude:t.coords.longitude});e?.(r)}finally{r(!1)}};r(!0),o(null),window.navigator.geolocation.getCurrentPosition(t,e=>{o(e),r(!1)})},[n,e]),c=a?.code===1;return(0,s.useEffect)(()=>{if(a){if(1===a.code)return void l.info("User declined geolocation permission",{error:a});l.error("Error locating user",{error:a})}},[a,l]),{locate:i,error:a,isPermissionDenied:c,loading:t||n.isPending,status:n.status,address:n.data??void 0}})({onLocate:e}),[c,d]=(0,s.useState)(!1),u=()=>{d(!1)};(0,s.useEffect)(()=>{l&&d(!0)},[l]);let h=i?{title:"Where are you at?",message:x,cta:"SEARCH BY POSTCODE"}:{title:"Where are you at?",message:I,cta:"TRY AGAIN"};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(_.W,{open:c,onClose:u,icon:"EGG",title:h.title,message:h.message.split("\n").map(e=>(0,a.jsx)("p",{children:e},e)),"data-testid":v.Q.CURRENT_LOCATION,restoreFocusTo:i?t:void 0,children:(0,a.jsx)(y.$,{primary:!0,onClick:i?u:()=>{d(!1),o()},children:h.cta})}),(0,a.jsx)(R,{onClick:o,loading:n,id:r})]})};var N=r(69180),j=r(12058);let D=({show:e,onClose:t})=>(0,a.jsx)(_.W,{open:e,onClose:t,icon:"EGG",title:j.h.title,message:j.h.message,"data-testid":v.Q.RESTAURANT_SEARCH_ERROR,children:(0,a.jsx)(y.$,{primary:!0,onClick:t,children:j.h.actionLabel})});var O=r(56813),W=r(21343),U=r(24400),V=r(54122),F=r(10346);let $="Itâs not you, itâs us",B="Try Collect",P="Try Delivery",z="Opening times",G={title:$,message:"We donât deliver to your area yet.",actions:[{kind:"switch",label:B}]},Y={title:$,message:"Weâre not taking orders right now, sorry. Check back soon."},H={title:$,message:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("p",{children:"Unfortunately, no restaurants are offering collections right now."}),(0,a.jsx)("p",{children:"Please check back soon."})]})},K={noRestaurantsNearby:G,outsideDeliveryCatchment:G,allClosed:{title:"Weâre closed for Delivery right now",message:"Check back tomorrow or see if you can Collect.",actions:[{kind:"restaurantSearch",label:z},{kind:"switch",label:B}],messageWithoutSwitchAction:"Check back tomorrow."},allTemporarilyOffline:{title:$,message:"Delivery is offline right now. Check again later or head to us for Eat-in or Collect.",actions:[{kind:"switch",label:B},{kind:"restaurantSearch",label:"Find your local"}]},allCollectionSlotsBooked:{title:$,message:"We are unable to deliver to you just yet, but weâre working on it!"},allUnavailable:Y},M={noRestaurantsNearby:{title:$,message:"Weâve not landed in your area yet."},outsideDeliveryCatchment:H,allClosed:{title:"Weâre closed right now",message:"Check back tomorrow.",actions:[{kind:"restaurantSearch",label:z}]},allTemporarilyOffline:{title:"Weâre closed right now",message:"Check back later or see if you can get it delivered.",actions:[{kind:"switch",label:P}],messageWithoutSwitchAction:"Check back later."},allCollectionSlotsBooked:{title:"Looks like everyone else had the same idea...",message:"There arenât any Collect slots left for today. See if you can get it delivered or check back tomorrow.",actions:[{kind:"switch",label:P}],messageWithoutSwitchAction:"There arenât any Collect slots left for today. Check back tomorrow."},allUnavailable:Y},Z={title:"Early bird...",message:"Weâre not open for Delivery yet but you can order ahead with Collect.",actions:[{kind:"switch",label:"Order Collect"}],messageWithoutSwitchAction:"Weâre not open for Delivery yet."},q={title:$,message:"We canât take delivery orders right now but you can still order Nandoâs on Deliveroo.",actions:[{kind:"switch",label:"Iâll Collect"},{kind:"deliveroo",label:"Head to Deliveroo"}]},Q=({show:e,onClose:t,variant:r,scenario:o,isBeforeOpeningTime:n,showSwitchAction:l,onSwitchAction:s,onRestaurantSearchAction:i,onDeliverooAction:c,onBackToSearch:d})=>{let u="deliveryKillSwitch"===o?q:"delivery"===r&&"allClosed"===o&&n?Z:"delivery"===r?K[o]:M[o],h=u.actions??[],f=l?h:h.filter(e=>"switch"!==e.kind),p=f.length<h.length?u.messageWithoutSwitchAction??u.message:u.message,m={switch:s,restaurantSearch:i,deliveroo:c},g=f.map(e=>({label:e.label,onClick:m[e.kind]}));return g.length<2&&g.push({label:"Back to search",onClick:d}),(0,a.jsx)(_.W,{open:e,onClose:t,icon:"HEART",title:u.title,message:p,"data-testid":v.Q.UNAVAILABLE_RESTAURANTS,children:(0,a.jsx)("div",{className:"flex flex-col gap-4",children:g.map(({label:e,onClick:t},r)=>(0,a.jsx)(y.$,{primary:0===r,cta:r>0,onClick:t,children:e},e))})})},X=({scenario:e,fulfilment:t,onClose:r,onSwitchFulfilment:o,onFindRestaurants:n,onGoToDeliveroo:l})=>{let i=function({scenario:e,fulfilment:t,onClose:r,onSwitchFulfilment:a}){let o=(0,W.$m)(),n=!!(0,V._)(U.T.DELIVERY_UNAVAILABLE),l=!!(0,V._)(U.T.COLLECT_UNAVAILABLE),i=t===N.n.DELIVERY,c=i?N.n.COLLECTION:N.n.DELIVERY,d=c===N.n.COLLECTION?!l:!n;return(0,s.useEffect)(()=>
3{o.emit("search:no_results_modal_viewed",{fulfilment:t,scenario:e})},[e,t,o]),{variant:i?"delivery":"collection",isBeforeOpeningTime:(0,O.vi)((0,F.Ln)()),showSwitchAction:d,onSwitchAction:()=>{o.emit("search:no_results_switch_fulfilment_clicked",{target:c,scenario:e}),a(c)},onBackToSearch:()=>{o.emit("search:no_results_back_to_home_clicked",{}),r()}}}({scenario:e,fulfilment:t,onClose:r,onSwitchFulfilment:o});return(0,a.jsx)(Q,{show:!0,onClose:r,variant:i.variant,scenario:e,isBeforeOpeningTime:i.isBeforeOpeningTime,showSwitchAction:i.showSwitchAction,onSwitchAction:i.onSwitchAction,onRestaurantSearchAction:n,onDeliverooAction:l,onBackToSearch:i.onBackToSearch})};var J=r(47193),ee=r(79964),et=r(67121),er=r.n(et);let ea={[ee.D.UK]:"Try a postcode around the *SW15 2SW* area to get a result.",[ee.D.IE]:"Try an eircode around the *D09 H7F9* area to get a result."},eo=({market:e,disableCollect:t,disableDelivery:r,disableRooAndDelivery:o,disableCollectAndDelivery:n,isDevCopyEnabled:l})=>(0,a.jsx)("div",{className:er().infoBox,children:(0,a.jsx)(J.l,{type:J.x.INFO,className:er().banner,testId:"search-instructions",children:[t?"We canât take orders for collect right now. You can still head to the restaurant and order for collection from there or order a delivery.":null,r?"We canât take delivery orders right now but you can still order with Deliveroo":null,o?"Weâre offline for delivery right now but you can still order Collect or come and Eat-In if you fancy?":null,n?"Sorry, weâre not taking Collect or Delivery orders on Web right now. However you can still collect or eat in at our restaurants!":null,l?(0,a.jsx)("p",{children:ea[e].split(/\*(.+?)\*/g).map((e,t)=>t%2==1?(0,a.jsx)("strong",{children:e},e):e)},"dev-copy"):null].filter(Boolean)})});var en=r(86710),el=r(85756),es=r(7305),ei=r(94642);async function ec(e,t,r){let a,{address:o,inputValue:n,featureFlags:l,focusInput:s,onInputError:i}=t,{deliveryUnavailable:c,searchType:d}=l;if(e===N.n.DELIVERY&&c)return void t.onNoResults({scenario:"deliveryKillSwitch",fulfilment:N.n.DELIVERY});if(!o){let e=((e,t,r,a)=>{if(!e||""===e.trim()||!t&&"autocomplete"===a)return{isValid:!1,errorType:"empty"};let o=(0,es.ng)(r,a);return o.pattern&&!o.pattern.test(e.toUpperCase())?{isValid:!1,errorType:"invalid"}:{isValid:!0}})(n,o,r.market,d);if(!e.isValid){e.errorType&&i(e.errorType),s();return}}let u=o||await r.geocodeAddress(n).catch(()=>null);if(!u){i("addressNotFound"),s();return}r.setFulfilment(e);let h=u.latitude,f=u.longitude,p=r.storeAddressAdapter.saveAddress(u).catch(()=>void 0);try{let[,t]=await Promise.all([p,r.searchRestaurants({fulfilmentType:e,latitude:h,longitude:f})]);a=t}catch{t.onSearchError();return}let m=(0,ei.b)(a);null===m?r.navigationService.navigateToSearchResults(e):t.onNoResults({scenario:m,fulfilment:e})}var ed=r(14e3),eu=r(62736);let eh="/restaurants/search";var ef=r(48740);let ep=`to earn ${b.G} Rewards`,em=({onLogin:e})=>(0,a.jsxs)("p",{"data-testid":"search-login-prompt",children:[(0,a.jsx)("a",{href:"#","aria-label":"Log in",onClick:t=>{t.preventDefault(),e()},children:"Log in"})," ",ep]});var ey=r(83844),eg=r.n(ey);function e_(e){let t=e.trim().toUpperCase().replace(/\s/g,""),r=t.replace(/^([A-Z]{1,2}\d{1,2}[A-Z]?)(\d[A-Z]{2})$/g,"$1 $2");return t===r?e:r}function eC(e){let t=e.trim().toUpperCase().replace(/\s/g,""),r=t.replace(/^([AC-FHKNPRTV-Y]{1}[0-9]{2}|D6W)\s?([0-9AC-FHKNPRTV-Y]{4})$/,"$1 $2");return t===r?e:r}let eb=()=>{let e,t,r=(0,p.N)(),{authenticated:o,login:n}=(0,m.uM)(),{state:l,handlers:i,ui:c,inputRef:d,market:u}=(()=>{let e,t,r,a,o,n,l=(0,T.A)(),i=(0,A.WD)(),c=(0,s.useCallback)(e=>i.setFulfilment(e),[i]),d=(e=(0,ed.useRouter)(),t=(0,s.useCallback)(t=>{e.push(`/search/results?fulfilment=${t}`)},[e]),{navigateToSearchResults:t,navigateToDeliveroo:(0,s.useCallback)(e=>{window.location.assign(eu.f[e])},[]),navigateToRestaurantSearch:(0,s.useCallback)(e=>{let t;window.location.assign((t=e?.trim())?`${eh}?location=${encodeURIComponent(t)}`:eh)},[])}),u=(0,ef.W)(),h=(0,en.Rb)(),f=(0,w.U)(),p=(0,s.useRef)(null),m=(0,el.g)({market:l}),y=(r=!!(0,V._)(U.T.DELIVEROO_UNAVAILABLE),a=!!(0,V._)(U.T.DELIVERY_UNAVAILABLE),o=!!(0,V._)(U.T.COLLECT_UNAVAILABLE),n=!!(0,V._)(U.T.DEV_COPY),{searchType:(0,V._)(U.T.SEARCH_ADDRESS_INPUT_TYPE),deliverooUnavailable:r,deliveryUnavailable:a,collectUnavailable:o,isDevCopyEnabled:n,renderDeliveryInstructions:r||a||o||n,deliveryDisabled:a&&r}),g=(0,s.useMemo)(()=>(0,es.ng)(l,y.searchType),[l,y.searchType]),_=(0,s.useMemo)(()=>e=>(0,es.CS)(e,y.searchType),[y.searchType]),C=((e,t)=>
3{let[r,a]=(0,s.useState)(e),[o,n]=(0,s.useState)(t(e)),[l,i]=(0,s.useState)(null),c=(0,s.useCallback)(e=>{n(e),i(null),a(null)},[]),d=(0,s.useCallback)(e=>{a(e),n(t(e)),i(null)},[t]);return{address:r,inputValue:o,inputError:l,setAddress:a,setInputValue:n,setInputError:i,handleInputChange:c,handleAddressSelected:d}})(u.getAddress(),_),b=((e,t)=>{let{collectUnavailable:r,deliverooUnavailable:a,deliveryUnavailable:o}=e,n=(0,s.useMemo)(()=>a&&o?"Delivery Unavailable":o?"Head to Deliveroo":"Deliver to me",[a,o]);return{collectText:r?"Collect Unavailable":"Iâll Collect",deliveryText:n,errorMessages:(0,s.useMemo)(()=>({empty:t.error.emptyInput,invalid:t.error.invalidInput,addressNotFound:t.error.addressNotFound}),[t.error]),input:{label:t.label,placeholder:t.placeholder}}})(y,g),[v,k]=(0,s.useState)(!1),[S,E]=(0,s.useState)(null),[x,I]=(0,s.useState)(!1),[R,L]=(0,s.useState)(null),N=(0,s.useCallback)(e=>{e&&(C.handleInputChange(_(e)),C.setAddress(e))},[C.handleInputChange,C.setAddress,C.setInputError,_]),j=(0,s.useCallback)(async e=>{L(e);try{await ec(e,{address:C.address,inputValue:C.inputValue,featureFlags:y,focusInput:()=>p.current?.focus(),onInputError:e=>{"addressNotFound"==e?k(!0):C.setInputError(b.errorMessages[e])},onNoResults:E,onSearchError:()=>I(!0)},{geocodeAddress:e=>m.mutateAsync(e),setFulfilment:c,storeAddressAdapter:u,navigationService:d,market:l,searchRestaurants:h,logger:f})}finally{L(null)}},[C,y,m,c,u,d,l,b,h,f]),D=(0,s.useCallback)(async e=>{E(null),await j(e)},[j]),O=(0,s.useCallback)(()=>{d.navigateToRestaurantSearch(C.inputValue)},[d,C.inputValue]),W=(0,s.useCallback)(()=>{d.navigateToDeliveroo(l)},[d,l]),F=(0,s.useCallback)(()=>{k(!1)},[]),$=(0,s.useCallback)(()=>{E(null)},[]),B=(0,s.useCallback)(()=>{I(!1)},[]);return{state:{address:C.address,inputValue:C.inputValue,inputError:C.inputError,showNoLocationFoundModal:v,noResultsState:S,showSearchErrorModal:x,searchingFulfilmentType:R},handlers:{handleAddressSelected:C.handleAddressSelected,handleInputChange:C.handleInputChange,handleLocateMe:N,handleFulfilmentSelect:j,handleSwitchFulfilment:D,handleFindRestaurants:O,handleGoToDeliveroo:W,handleNoLocationFoundModalClose:F,handleNoResultsModalClose:$,handleSearchErrorModalClose:B},ui:{...y,...b},inputRef:p,market:l}})(),{inputValue:h,inputError:b,showNoLocationFoundModal:v,noResultsState:k,showSearchErrorModal:S,searchingFulfilmentType:E}=l,{handleInputChange:x,handleLocateMe:I,handleFulfilmentSelect:R,handleSwitchFulfilment:j,handleFindRestaurants:O,handleGoToDeliveroo:W,handleAddressSelected:F,handleNoLocationFoundModalClose:$,handleNoResultsModalClose:B,handleSearchErrorModalClose:P}=i,{searchType:z,deliveryDisabled:G,deliveryUnavailable:Y,collectUnavailable:H,isDevCopyEnabled:K,renderDeliveryInstructions:M,deliveryText:Z,collectText:q}=c,Q=function(e){switch(e){case ee.D.UK:return e_;case ee.D.IE:return eC;default:return e_}}(u);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(_.W,{open:v,onClose:$,icon:"HEART",title:"Where are you?",message:"We're having trouble finding your location. Please check your search and try again.",children:(0,a.jsx)(y.$,{primary:!0,onClick:$,children:"Try again"})}),k&&(0,a.jsx)(X,{scenario:k.scenario,fulfilment:k.fulfilment,onClose:B,onSwitchFulfilment:j,onFindRestaurants:O,onGoToDeliveroo:W}),(0,a.jsx)(D,{show:S,onClose:P}),M&&(0,a.jsx)(eo,{disableCollect:H,disableDelivery:Y,disableRooAndDelivery:G,disableCollectAndDelivery:H&&G,isDevCopyEnabled:K,market:u}),(0,a.jsxs)("fieldset",{className:"relative flex flex-col gap-4",children:[(0,a.jsx)("legend",{className:"sr-only",children:(t="string"==typeof(e=({[ee.D.UK]:{autocomplete:"address or postcode",postcode:"postcode"},[ee.D.IE]:"address or Eircode"})[u])?e:e?.[z]||"address",`Find a restaurant near you by entering your ${t} or using the browser's location`)}),"postcode"===z&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(g.p,{indentLeft:!0,label:c.input.label,placeholder:c.input.placeholder,id:"search-input","data-testid":"postcode-search-input",onChange:e=>x(e.target.value),onBlur:e=>{let t=Q(e.target.value);t!==h&&x(t)},value:h,ref:d,error:b||void 0,sensitive:!0,type:"search"}),(0,a.jsx)("label",{htmlFor:"user-locate-button",className:"sr-only",children:"Find your location using the browser"}),(0,a.jsx)(L,{id:"user-locate-button",onLocate:I,manualEntryRef:
3d})]}),"autocomplete"===z&&(0,a.jsx)(C.R,{label:c.input.label,placeholder:c.input.placeholder,market:u,inputRef:d,onAddressSelected:F,onInputValueChange:e=>x(e),inputValue:h}),!o&&(0,a.jsx)(em,{onLogin:()=>n(r,"rewards")}),(0,a.jsx)(y.$,{accent:!0,primary:!0,loading:E===N.n.COLLECTION,onClick:()=>R(N.n.COLLECTION),disabled:H,testid:"collect-button","aria-description":"Search for collection restaurants",children:q}),(0,a.jsx)(y.$,{accent:!0,primary:!0,loading:E===N.n.DELIVERY,onClick:()=>R(N.n.DELIVERY),disabled:G,testid:"delivery-button","aria-description":"Search for delivery restaurants",children:Z}),(0,a.jsx)(f.V5,{className:eg().deliveroo})]})]})};var ev=r(1770),ek=r.n(ev);let eS=({marketingCopy:e})=>(0,a.jsx)("section",{className:ek().headerSectionWrapper,children:(0,a.jsx)("header",{className:ek().header,children:(0,a.jsxs)("div",{className:ek().headerContent,children:[(0,a.jsxs)("h1",{className:(0,d.cn)("hand",ek().headerTitle),children:["Craving",(0,a.jsx)("br",{}),(0,a.jsx)("span",{children:"PERi-PERi?"})]}),(0,a.jsx)("p",{className:`my-[18px] ${ek().subCopy}`,children:e})]})})}),ew=()=>{let e,{marketingCopy:t}=(e=(0,V._)(U.T.CUSTOM_MARKETING),{marketingCopy:e?.enabled?e.marketingCopy:"This must be the place"});return(0,a.jsx)(eS,{marketingCopy:t})},eT=()=>(0,a.jsx)("main",{id:"main",tabIndex:-1,children:(0,a.jsxs)("div",{"data-testid":"search-container",className:(0,d.cn)("tailwind-box-sizing-fix",h().gridWrapper),children:[(0,a.jsx)(ew,{}),(0,a.jsx)("div",{className:h().formSectionWrapper,children:(0,a.jsx)("section",{className:(0,d.cn)(h().formWrapper,"tailwind-box-sizing-fix"),children:(0,a.jsx)(eb,{})})})]})});var eE=r(50735),eA=r(8298),ex=r(2428),eI=r(69284),eR=!0;let eL=()=>(0,a.jsxs)(l(),{children:[(0,a.jsx)("title",{children:`Choose your ${b.G} restaurant | ${b.G}`}),(0,a.jsx)("meta",{name:"description",content:`Need ${b.G} now? Find your nearest ${b.G} restaurant and place your order online for click and collect or delivery. PERi-PERi goodness available for everyone.`}),(0,a.jsx)("meta",{property:"og:site_name",content:b.G}),(0,a.jsx)("meta",{property:"og:title",content:`Choose your ${b.G} restaurant | ${b.G}`})]}),eN=()=>((0,ex.b)(),(0,eE.I)("search"),(0,eA.y)(),(0,eI.K)({type:"OTHER",label:"search"}),(0,a.jsx)(eT,{})),ej=()=>((0,s.useEffect)(()=>{let e=()=>o.A.remove(i.xe,{path:"/"});return e(),window.addEventListener("pageshow",e),()=>window.removeEventListener("pageshow",e)},[]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(eL,{}),(0,a.jsx)(c.T,{children:(0,a.jsx)(eN,{})})]}))},99005:e=>{e.exports={locateIcon:"LocateMe_locateIcon__5Cnhh","fade-in":"LocateMe_fade-in__TldL4","fade-out"
3:"LocateMe_fade-out__0AOk2","fade-in-and-zoom":"LocateMe_fade-in-and-zoom__fUc7O","fade-out-and-zoom":"LocateMe_fade-out-and-zoom__1hIns"}}}]);
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.