1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[89],{93980:function(e,n,t){var i=t(52322),r=t(2784),o=t(43580),l=t(58940),s=t(75470),a=t(27949),c=t(89393),d=t(2317);n.Z=()=>{var e;let n=(0,s.I0)(),{location:t,checkoutBasket:o}=(0,s.v9)(e=>e.app.basket),{orderStatus:m}=(0,s.v9)(e=>e.app),b=(0,a.e)(),v=(0,r.useRef)(!1);return m.status===d.pf.INITIALIZING_ORDER&&(v.current=!0),(0,r.useEffect)(()=>{!v.current&&!b&&(null==o?void 0:o.id)&&t.id&&(n(c.Z.validateOrder(null==o?void 0:o.id,t.id)),v.current=!0)},[null==o?void 0:o.id,t.id,b,n]),(0,i.jsxs)(u,{$isVisible:["dev","staging"].includes(l.Vi),children:[(0,i.jsxs)(h,{children:[(0,i.jsxs)(p,{children:[l.Vi.toLocaleUpperCase()," Environment"]}),(0,i.jsxs)(g,{children:["Type: ",(0,i.jsx)(f,{children:m.type})]}),(0,i.jsxs)(g,{children:["Status: ",(0,i.jsx)(f,{children:m.status})]}),(0,i.jsxs)(g,{children:["Message: ",(0,i.jsx)(f,{children:null!==(e=m.message)&&void 0!==e?e:"null"})]})]}),(0,i.jsx)(x,{children:"Only visible in dev and staging environments"})]})};let u=o.ZP.div.withConfig({componentId:"sc-755308a1-0"})(["display:",";padding:16px;background-color:#f0f0f0;color:#333;"],e=>{let{$isVisible:n}=e;return n?"block":"none"}),h=o.ZP.div.withConfig({componentId:"sc-755308a1-1"})(["display:flex;align-items:center;gap:0px 24px;"]),p=o.ZP.p.withConfig({componentId:"sc-755308a1-2"})(["font-weight:800;font-size:20px;margin:0px;"]),g=o.ZP.p.withConfig({componentId:"sc-755308a1-3"})(["margin:0;"]),f=o.ZP.span.withConfig({componentId:"sc-755308a1-4"})(["font-weight:800;font-size:20px;margin:0px;"]),x=o.ZP.p.withConfig({componentId:"sc-755308a1-5"})(["margin:0px;"])},80925:function(e,n,t){t.d(n,{z:function(){return r},bv:function(){return A},gi:function(){return M},lB:function(){return L},ku:function(){return c},$m:function(){return d}});let i={bannerMessage:"This restaurant can't accept online orders right now. Please try again in a few minutes.",callCta:"Call the restaurant",modalTitle:"Can't accept orders right now",modalClose:"Close",checkoutMessage:"Orders can't be sent to this restaurant right now. Your cart is saved â try again in a few minutes.",modalBody:e=>"".concat(e," is temporarily unable to accept online orders. The restaurant is open, but its ordering system is currently unavailable. Please try again in a few minutes.")},r="pos-unavailable-submit-reason";var o=t(2784),l=t(62638);function s(e){let[,n]=(0,o.useState)(0);(0,o.useEffect)(()=>{if(!e)return;let t=new Date(e).getTime()-Date.now();if(!Number.isFinite(t)||t<=0)return;let i=setTimeout(()=>n(e=>e+1),t);return()=>clearTimeout(i)},[e])}function a(){let[e,n]=(0,o.useState)(!1);return(0,o.useEffect)(()=>{n(!0)},[]),e}function c(e){var n;let t=a();return s(null!==(n=null==e?void 0:e.pos_refused_until)&&void 0!==n?n:null),t&&(0,l.Vh)(e)}function d(e){var n;let t=a();return s(null!==(n=null==e?void 0:e.pos_refused_until)&&void 0!==n?n:null),t?(0,l._G)(e):l.Fe.NORMAL}var u=t(52322),h=t(8782),p=t(43580);let g=e=>{let{title:n,width:t,height:i,...r}=e;return(0,u.jsxs)("svg",{...r,xmlns:"http://www.w3.org/2000/svg",fill:"none",width:null!=t?t:"24",height:null!=i?i:"24",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:[(0,u.jsx)("title",{children:null!=n?n:"Ordering offline"}),(0,u.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 15a4.5 4.5 0 0 0 4.5 4.5h9.75a3.75 3.75 0 0 0 1.332-7.257 3 3 0 0 0-3.758-3.848 5.25 5.25 0 0 0-10.233 2.33A4.502 4.502 0 0 0 2.25 15Z"}),(0,u.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 3.75 20.25 21"})]})};var f=t(97421),x=t(36525),m=t(46956),b=t(30686);let v=p.ZP.div.withConfig({componentId:"sc-62b84eb7-0"})(e=>{var n,t;let{theme:i}=e;return{backgroundColor:null!==(n=i.store_banner.background_color)&&void 0!==n?n:"transparent",borderBottom:"1px solid ".concat(null!==(t=i.store_banner.border_color)&&void 0!==t?t:"transparent"),padding:"16px 20px"}}),w=p.ZP.div.withConfig({componentId:"sc-62b84eb7-1"})(e=>{let{theme:n}=e;return{display:"flex",gap:"10px",margin:"0 auto",maxWidth:"900px",alignItems:"center",justifyContent:"center",...(0,m.l)(n.store_banner.font,{color:e=>null!=e?e:(0,b.F)(h.XV)(n.store_banner.background_color)}),svg:{flexShrink:0}}}),j=p.ZP.a.withConfig({componentId:"sc-62b84eb7-2"})({color:"inherit",fontWeight:700,textDecoration:"underline",whiteSpace:"nowrap"}),C=p.ZP.div.withConfig({componentId:"sc-62b84eb7-3"})({width:"100%",padding:"".concat(x._.GUTTER,"px"),textAlign:"center"}),I=p.ZP.div.withConfig({componentId:"sc-62b84eb7-4"})({width:"80px",height:"80px",margin:"0 auto 24px",borderRadius:"100%",backgroundColor:(0,h.m4)(x.DM.PRIMARY_WARNING,.13),border:"1px solid ".concat(x.DM.PRIMARY_WARNING),display:"flex",alignItems:"center",justifyContent:"center"}),_=(0,p.ZP)(g).withConfig({componentId:"sc-62b84eb7-5"})({width:"32px",height:"32px",color:x.DM.PRIMARY_WARNING}),k=p.ZP.h2.withConfig({componentId:"sc-62b84eb7-6"})({fontSize:"24px",fontWeight:700,lineHeight:"32px",margin:"0 0 8px"}),P=p.ZP.p.withConfig({componentId:"sc-62b84eb7-7"})({fontSize:"16px",lineHeight:"24px",margin:0}),y=(0,p.ZP)(f.Db).withConfig({componentId:"sc-62b84eb7-8"})({width:"100%",marginTop:"24px"}
1),Z=p.ZP.p.withConfig({componentId:"sc-62b84eb7-9"})({fontStyle:"italic",margin:0,padding:"8px 16px 0",textAlign:"center"}),A=e=>{let{location:n,className:t}=e,r=null==n?void 0:n.phone_number;return(0,u.jsx)(v,{role:"status",className:t,children:(0,u.jsxs)(w,{children:[(0,u.jsx)(g,{title:"",width:"20",height:"20","aria-hidden":!0,focusable:!1}),(0,u.jsxs)("span",{children:[i.bannerMessage,r?(0,u.jsxs)(u.Fragment,{children:[" ",(0,u.jsx)(j,{href:"tel:".concat(r),children:i.callCta})]}):null]})]})})};var N=t(75470),R=t(20030);let M=()=>{let e=(0,N.v9)(e=>e.app.locations.detail),n=c(e),t=(0,o.useRef)(!1);return((0,o.useEffect)(()=>{n&&!t.current&&(t.current=!0,(0,R.if)("POS Unavailable Blocked Checkout",{locationId:null==e?void 0:e.id}))},[n,null==e?void 0:e.id]),n)?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(A,{location:e}),(0,u.jsx)(Z,{id:r,children:i.checkoutMessage})]}):null};var S=t(70241),E=t(23643),T=t(59047);let L=e=>{var n;let{location:t}=e,r=d(t)===l.Fe.POS_UNAVAILABLE,s=null==t?void 0:t.id,[a,c]=(0,o.useState)(!1);if((0,o.useEffect)(()=>{if(!r||null==s)return;let e="".concat(T.iy.POS_UNAVAILABLE_MODAL_SEEN,":").concat(s);window.sessionStorage.getItem(e)||(window.sessionStorage.setItem(e,"1"),c(!0))},[r,s]),!r)return null;let h=null!==(n=null==t?void 0:t.label)&&void 0!==n?n:"This restaurant";return(0,u.jsx)(E.u.Container,{requestVisibility:a,onCancel:()=>c(!1),children:e=>(0,u.jsxs)(C,{children:[(0,u.jsxs)(E.u.Content,{children:[(0,u.jsx)(I,{children:(0,u.jsx)(_,{title:"","aria-hidden":!0,focusable:!1})}),(0,u.jsx)(S.Dx,{asChild:!0,children:(0,u.jsx)(k,{children:i.modalTitle})}),(0,u.jsx)(S.dk,{asChild:!0,children:(0,u.jsx)(P,{children:i.modalBody(h)})})]}),(0,u.jsx)(E.u.Footer,{children:(0,u.jsx)(y,{type:"button",$buttonTheme:"secondary",onClick:()=>{c(!1),e()},children:i.modalClose})})]})})}}}]); 2//# sourceMappingURL=89-3edd34a67a0375a5.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.