PageSourceSearch

https://www.firsttable.co.uk/_next/static/chunks/pages/shared-booking-76b94980f71bb74a.js

js firsttable.co.uk collected 2026-09-28 12:37:18 UTC 15,446 bytes, 2 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2165],{42879:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/shared-booking",function(){return n(54592)}])},78734:function(e,t,n){"use strict";n.d(t,{D:function(){return a.Z}});var a=n(67605)},54592:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSP:function(){return P},default:function(){return O}});var a,r=n(52322),s=n(2784),i=n(280),l=n(32749),o=n(39097),c=n.n(o),d=n(74204),m=n(76689),h=n(78734),u=n(66577);function x(){return(x=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}).apply(null,arguments)}var p=function(e){return s.createElement("svg",x({width:22,height:22,viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),a||(a=s.createElement("path",{d:"M19.16 12.107c-.242 0-.495-.077-.737-.132-.49-.11-.972-.253-1.442-.429a2.201 2.201 0 0 0-2.73 1.1l-.242.507a14.495 14.495 0 0 1-2.939-2.201 14.495 14.495 0 0 1-2.201-2.94l.506-.23a2.201 2.201 0 0 0 1.1-2.73c-.174-.474-.317-.96-.428-1.453a8.625 8.625 0 0 1-.132-.737A3.302 3.302 0 0 0 6.613.122H3.3a3.302 3.302 0 0 0-2.466 1.1 3.302 3.302 0 0 0-.803 2.641 20.99 20.99 0 0 0 5.954 12.108 20.99 20.99 0 0 0 12.108 5.954c.142.011.286.011.429 0a3.302 3.302 0 0 0 2.201-.836 3.302 3.302 0 0 0 1.1-2.466v-3.302a3.302 3.302 0 0 0-2.663-3.214Zm.54 6.605a1.102 1.102 0 0 1-1.266 1.09A18.887 18.887 0 0 1 7.57 14.473 18.888 18.888 0 0 1 2.2 3.577a1.1 1.1 0 0 1 .649-1.172A1.1 1.1 0 0 1 3.3 2.31h3.302a1.1 1.1 0 0 1 1.1.859c0 .297.1.605.165.902.128.577.297 1.144.507 1.696l-1.541.726a1.1 1.1 0 0 0-.573.616 1.1 1.1 0 0 0 0 .837 15.949 15.949 0 0 0 7.705 7.705c.268.11.569.11.837 0 .273-.102.494-.308.616-.573l.693-1.54a13.648 13.648 0 0 0 2.631.67 1.1 1.1 0 0 1 .858 1.101l.1 3.402ZM13.206 0h-.77a1.105 1.105 0 0 0 .186 2.201h.584a6.604 6.604 0 0 1 6.604 6.604v.584a1.101 1.101 0 0 0 1.001 1.189h.088A1.101 1.101 0 0 0 22 9.575v-.77A8.805 8.805 0 0 0 13.206 0Zm2.201 8.805a1.1 1.1 0 1 0 2.201 0 4.403 4.403 0 0 0-4.402-4.402 1.1 1.1 0 0 0 0 2.201 2.201 2.201 0 0 1 2.201 2.201Z",fill:"currentColor"})))},f=n(97855),g=n(62261),j=n(19448),v=e=>{let{firstName:t,restaurantTitle:n,bookingType:a,phone:s,website:i,handleShareLink:l}=e;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(h.D,{as:"h1",textAlign:"center",mb:2,children:[t,"'s reservation for",(0,r.jsx)("br",{}),(0,r.jsx)("span",{className:(0,g.cn)("REGULAR_TABLE"!==a&&"text-gold"),children:n})]}),(0,r.jsx)("div",{className:"mt-2 flex items-center justify-center",children:(0,r.jsxs)("div",{className:"my-0 flex gap-1 sm:my-2",children:[s&&(0,r.jsx)(j.Yl,{link_name:"Restaurant Phone",link_type:"navigation",children:(0,r.jsx)(c(),{href:"tel:".concat(s),target:"_blank",rel:"noopener noreferrer",className:"flex size-8 items-center justify-center rounded-full bg-primary p-2.5 text-white transition-transform hover:scale-110 md:size-10",children:(0,r.jsx)(p,{className:"mt-0.5"})})}),i&&(0,r.jsx)(j.Yl,{link_name:"Restaurant Website",link_type:"navigation",children:(0,r.jsx)(c(),{href:i,target:"_blank",rel:"noopener noreferrer",className:"text-primary transition-transform hover:scale-110",children:(0,r.jsx)(u.Z,{className:"size-8 md:size-10"})})}),(0,r.jsx)(j.Yl,{button_name:"Share Booking",button_type:"copy",children:(0,r.jsx)("button",{type:"button",onClick:l,className:"flex size-8 items-center justify-center rounded-full bg-primary p-2.5 text-white transition-transform hover:scale-110 md:size-10",children:(0,r.jsx)(f.Z,{})})})]})})]})},b=n(38219),y=n(66807),k=e=>{let{label:t,value:n}=e;return(0,r.jsxs)("div",{className:"mb-1 flex gap-1",children:[(0,r.jsxs)("strong",{className:"whitespace-nowrap text-primary",children:[t,":"]}),(0,r.jsx)("div",{children:n})]})},w=e=>{let{booking:t}=e,n=t.isPublicHoliday||t.isWeekendSurcharge;return(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"mb-2 text-md font-bold",children:"Booking details:"}),(0,r.jsx)(k,{label:"Reservation Name",value:t.publicName}),(0,r.jsx)(k,{label:"Reservation Time",value:(0,r.jsxs)("div",{className:"flex flex-col",children:[(0,r.jsx)("div",{children:(0,d.ZX)(t.date,t.time)}),(0,r.jsx)(b.Z,{leaveTime:t.leaveTime,className:(0,g.cn)("text-base text-black",n?"mb-1":void 0)}),(0,r.jsx)(y.Z,{isPublicHoliday:t.isPublicHoliday,isWeekendSurcharge:t.isWeekendSurcharge,className:"text-base text-black"})]})}),(0,r.jsxs)("p",{className:(0,g.cn)("REGULAR_TABLE"!==t.bookingType&&"text-gold"),children:[(0,r.jsx)("strong",{className:"text-primary",children:"Booking type: "}),(0,r.jsx)("span",{className:"font-bold",children:"REGULAR_TABLE"===t.bookingType?"Regular table":"First Table (".concat(t.discount||"50%"," off food)")})]}),(0,r.jsx)(k,{label:"People",value:t.people.toString()})]})},N=n(97599),C=n(36191),Z=e=>{let{restaurant:t,streetAddress:n,specialConditions:a}=e,s="https://www.google.com/maps?q=".concat(t.lat,",").concat(t.lng);return(0,r.jsxs)("div",{className:"mt-0 sm:mt-5",children:[(0,r.jsx)("p",{className:"mb-2 text-md font-bold",children:"Restaurant details:"}),(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsxs)(N.x,{mb:2,children:[(0,r.jsx)("strong",{className:"text-primary",children:"Restaurant: "})," ",(0,r.jsx)(j.Yl,{link_name:"Restaurant Link",link_type:"navigation",children:(0,r.jsx)(c(),{target:"_blank",href:"".concat(t.slug),className:"text-primary underline underline-offset-2 hover:no-underline",children:t.title})})]}),t.rating>0&&(0,r.jsx)("div",{className:"hidden items-center gap-1 sm:flex",children:(0,r.jsxs)("p",{children:["(",t.rating.toFixed(1),")"]})})]}),t.street&&t.city&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"hidden sm:block",children:(0,r.jsx)(k,{label:"Address",value:n})}),(0,r.jsx)("div",{className:"block sm:hidden",children:(0,r.jsxs)(N.x,{mb:2,children:[(0,r.jsx)("strong",{className:"text-primary",children:"Address: "})," ",(0,r.jsx)(j.Yl,{link_name:"Address Link To Maps",link_type:"navigation",children:(0,r.jsx)(c(),{href:s,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline underline-offset-2 hover:no-underline",children:n})})]})})]}),t.phone&&(0,r.jsx)(k,{label:"Phone",value:t.phone}),a&&(0,r.jsxs)("div",{children:[(0,r.jsx)("strong",{className:"text-primary",children:"Special conditions: "}),(0,C.Z)(a)]})]})},L=n(96440),_=e=>{let{promoCode:t,siteConfig:n,link:a=!0,className:s}=e,i="Sign up and you both get ".concat(n.currencySymbol).concat(n.freeCreditAmount," credit");return(0,r.jsx)("div",{className:(0,g.cn)("mt-7",!a&&"hidden sm:block",s),children:(0,r.jsx)(j.Yl,{button_name:"referral sign up",button_type:"navigation",children:(0,r.jsx)(c(),{href:"/invite/".concat(t),className:a?"text-coral underline underline-offset-2 hover:no-underline":"",children:a?i:(0,r.jsx)(L.z,{kind:"cta",wide:!0,children:i})})})})},T=n(3667),E=n(86243),A=n(94189),S=n(35966),F=n(14562);n(86189);var M=n(1788),B=e=>{let{lat:t,lng:n,className:a}
1=e,[i,l]=(0,s.useState)(!1),[o,c]=(0,s.useState)(!1),d={latitude:parseFloat(t),longitude:parseFloat(n),zoom:14};return!o&&t&&n?(0,r.jsxs)("div",{className:(0,g.cn)("relative h-[400px] w-full overflow-hidden rounded",a),children:[!i&&(0,r.jsx)("div",{className:"absolute inset-0 flex items-center justify-center bg-gray-100",children:(0,r.jsx)("p",{className:"text-gray-500",children:"Loading map..."})}),(0,r.jsxs)(S.ZP,{id:"map",initialViewState:d,mapboxAccessToken:M.Xq,style:{width:"100%",height:"100%"},mapStyle:"mapbox://styles/mapbox/light-v10",onLoad:()=>l(!0),onError:()=>c(!0),children:[(0,r.jsx)(S.Pv,{position:"top-right"}),(0,r.jsx)(S.Jx,{latitude:parseFloat(t),longitude:parseFloat(n),anchor:"bottom",children:(0,r.jsx)(F.Z,{style:{fill:"#245883",innerFill:"#fff"}})})]})]}):(0,r.jsx)("div",{className:"flex h-[400px] w-full items-center justify-center rounded-lg bg-gray-100",children:(0,r.jsx)("p",{className:"text-gray-500",children:"Unable to load map"})})},R=n(37745),P=!0,O=function(e){let{globalData:t,booking:n}=e,a=(0,l.VY)(),{isLoggedIn:o}=(0,R.F_)(),{siteConfig:h}
1=t,[u,x]=(0,s.useState)(!1),p=(0,E.useIsDesktop)();(0,s.useEffect)(()=>{let e=setTimeout(()=>{x(!0)},200);return()=>clearTimeout(e)},[]);let f="".concat(n.restaurant.street,", ").concat(n.restaurant.city),g="".concat(n.firstName,"'s Booking at ").concat(n.restaurant.title," - ").concat((0,d.ZX)(n.date,n.time)),b="Join ".concat(n.firstName," at ").concat(n.restaurant.title," on ").concat((0,d.ZX)(n.date,n.time),", ").concat("REGULAR_TABLE"!==n.bookingType?"Enjoy ".concat(n.discount||"50%"," off your meal"):"Book your next dining experience"," with First Table."),y=async()=>{if(navigator.share&&!p){let e={title:g,text:b,url:window.location.href};try{await navigator.share(e)}catch(e){e instanceof Error&&"Share canceled"!==e.message&&a.error("Failed to share booking link")}}else try{await navigator.clipboard.writeText(window.location.href),a.success("Booking link copied! Share this booking with your dining companions.")}catch(e){a.error(e.message||"Failed to copy booking link")}};return(0,r.jsx)(A.Z,{appState:{global:{...t}},children:(0,r.jsxs)(j.Yl,{pageEventName:"share_viewed",page_name:"Shared Booking",children:[(0,r.jsx)(T.Z,{title:g,description:b,ogImage:n.restaurant.ogImage,metaTags:n.restaurant.metaTags,slug:"/shared-booking?reference=".concat(n.reference)}),(0,r.jsxs)(i.Z,{className:"my-8 sm:mt-10",children:[(0,r.jsx)(v,{firstName:n.firstName,restaurantTitle:n.restaurant.title,bookingType:n.bookingType,phone:n.restaurant.phone,website:n.restaurant.website,handleShareLink:y}),(0,r.jsxs)("div",{className:"relative mt-0 grid grid-cols-1 gap-5 sm:mt-10 sm:grid-cols-2",children:[(0,r.jsxs)(m.kF,{children:[(0,r.jsx)(w,{booking:n}),u&&!o&&(0,r.jsx)(_,{promoCode:n.memberPromoCode,siteConfig:h,className:"my-3 sm:hidden"}),(0,r.jsx)(Z,{streetAddress:f,restaurant:n.restaurant,specialConditions:n.specialConditions}),(0,r.jsx)(c(),{href:"/terms-and-conditions",className:"text-primary underline underline-offset-2 hover:no-underline",children:"First Table Terms & Conditions"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(B,{lat:n.restaurant.lat,lng:n.restaurant.lng,className:"hidden sm:block"}),u&&!o&&(0,r.jsx)(_,{promoCode:n.memberPromoCode,siteConfig:h,link:!1})]})]})]})]})})}},14562:function(e,t,n){"use strict";var a=n(52322);n(2784);var r=n(13980),s=n.n(r);let i=e=>{let{onClick:t,style:n}=e;return(0,a.jsxs)("svg",{onClick:t,style:n,width:"36",height:"50",viewBox:"0 0 36 50",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,a.jsx)("ellipse",{cx:"18",cy:"46",rx:"16",ry:"4",fill:"#272B2E",fillOpacity:"0.12"}),(0,a.jsx)("path",{d:"M36 19.1667C36 29.7521 18 46 18 46C18 46 0 29.7521 0 19.1667C0 8.58121 8.05887 0 18 0C27.9411 0 36 8.58121 36 19.1667Z",fill:n.fill}),(0,a.jsx)("mask",{id:"mask0",masktype:"alpha",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"36",height:"46",children:(0,a.jsx)("path",{d:"M36 19.1667C36 29.7521 18 46 18 46C18 46 0 29.7521 0 19.1667C0 8.58121 8.05887 0 18 0C27.9411 0 36 8.58121 36 19.1667Z",fill:n.innerFill||"#D6BB96"})}),(0,a.jsx)("g",{mask:"url(#mask0)",children:(0,a.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.5242 40.3892C17.5134 39.7739 28.4224 31.4077 22.54 16.1519L25 12.5835L22.0054 15.2905L23.8235 10L20.7219 13.5679C19.2246 11.8457 15.032 8.96631 10.2407 11.2305C7.24805 12.998 5.90674 16.5957 5.15332 18.6167L5.15088 18.6235C4.90918 19.2715 4.72827 19.7568 4.57227 19.9658C4.49487 20.0698 4.38013 20.2661 4.22412 20.5332C3.08813 22.479 -0.231445 28.1646 -7.19263 28.9473C-11.1733 28.9473 -13.9304 25.9941 -15 24.7642C-13.5027 29.9722 -7.68457 40.3892 3.60962 40.3892L3.7561 41.2261L3.75903 41.2432C4.14624 43.4507 4.79541 47.1538 5.10693 49.6626L6.60425 40.7583H8.63647L10.0269 49.1704L11.5242 40.3892ZM-0.0439453 32.1045C2.52856 33.6133 5.47852 33.98 8.34668 33.6768C6.93164 34.4155 5.09155 35.0781 2.64233 35.7041C10.4189 38.0757 15.6904 36.1592 20.3442 28.3062C20.3442 28.3062 20.2573 28.3477 20.1023 28.4097C19.3723 28.7007 17.1292 29.4326 15.3069 28.3052C12.6555 26.666 11.8533 24.6499 11.8533 24.6499C9.55054 29.4067 3.92627 31.7808 -0.0439453 32.1045ZM15.4812 16.52L17.9412 13.0752C17.5134 13.1572 16.6362 13.4688 16.123 14.0596C15.6096 14.6499 15.4456 15.9458 15.4812 16.52ZM10.5615 49.5396C10.647 49.5396 11.8806 49.6216 12.4866 49.6626L11.9519 51.1392L10.5615 49.5396ZM10.2405 49.6626L10.4546 52L11.5239 51.2622L10.2405 49.6626ZM8.8501 51.2622L9.91968 49.6626L10.0266 51.877L8.8501 51.2622ZM7.24585 49.9087L6.81812 51.1392L5.21387 49.9087H7.24585ZM6.60425 51.2622L5.21387 50.2778L5.3208 52L6.60425 51.2622ZM5 50.1548V52L3.93042 51.6313L5 50.1548Z",fill:"white"})})]})};i.propTypes={onClick:s().func,style:s().shape({fill:s().string,innerFill:s().string})},i.defaultProps={onClick:()=>{},style:{cursor:"pointer",fill:"#FF685D",stroke:"none"}},t.Z=i},86189:function(){},55750:function(e,t,n){"use strict";var a,r=n(2784);function s(){return(s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}).apply(null,arguments)}t.Z=function(e){return r.createElement("svg",s({width:14,height:11,viewBox:"0 0 14 11",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),a||(a=r.createElement("path",{d:"m1.5 5.5 4 3.5L13 1.5",stroke:"currentColor",strokeWidth:2})))}},66577:function(e,t,n){"use strict";var a,r,s=n(2784);function i(){return(i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}).apply(null,arguments)}t.Z=function(e){return s.createElement("svg",i({width:40,height:40,viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),a||(a=s.createElement("circle",{cx:20,cy:20,r:20,fill:"currentColor"})),r||(r=s.createElement("path",{d:"M20 29c4.962 0 9-4.037 9-9s-4.038-9-9-9c-4.963 0-9 4.037-9 9s4.037 9 9 9Zm-5.868-4.557c.713-.28 1.611-.504 2.62-.657a15 15 0 0 0 .543 2.258c.118.352.241.663.37.94a7.393 7.393 0 0 1-3.533-2.54ZM12.636 20c0-1.077.233-2.1.65-3.023.885.378 2.003.671 3.262.86a24.807 24.807 0 0 0 0 4.326c-1.26.189-2.377.482-3.262.86a7.321 7.321 0 0 1-.65-3.023ZM20 12.636c.176 0 .69.45 1.152 1.837.19.57.347 1.218.467 1.919a23.314 23.314 0 0 1-3.239 0c.121-.701.277-1.348.468-1.919.462-1.388.976-1.837 1.152-1.837Zm0 5.448c.623 0 1.234-.023 1.826-.067.055.639.083 1.304.083 1.983 0 .68-.028 1.344-.083 1.983a24.836 24.836 0 0 0-3.652 0A23.33 23.33 0 0 1 18.091 20c0-.68.028-1.344.083-1.983.592.044 1.203.067 1.826.067ZM27.363 20a7.32 7.32 0 0 1-.65 3.023c-.884-.378-2.002-.671-3.261-.86a24.806 24.806 0 0 0 0-4.326c1.26-.189 2.377-.482 3.262-.86a7.32 7.32 0 0 1 .65 3.023ZM20 27.364c-.176 0-.69-.45-1.152-1.837-.19-.57-.347-1.218-.468-1.919a23.253 23.253 0 0 1 3.24 0c-.121.701-.278 1.348-.468 1.919-.462 1.388-.976 1.837-1.152 1.837Zm2.336-.38c.128-.277.251-.588.369-.94.224-.673.406-1.435.543-2.258 1.009.153 1.907.377 2.62.657a7.395 7.395 0 0 1-3.532 2.54Zm3.532-11.428c-.713.281-1.611.505-2.62.658a14.985 14.985 0 0 0-.543-2.258 9.067 9.067 0 0 0-.37-.94 7.394 7.394 0 0 1 3.533 2.54Zm-8.204-2.54a9.057 9.057 0 0 0-.369.94 15 15 0 0 0-.543 2.258c-1.009-.153-1.907-.377-2.62-.657a7.394 7.394 0 0 1 3.532-2.54Z",fill:"#fff"})))}}},function(e){e.O(0,[8934,5657,389,6353,6191,4547,887,8197,2888,9774,179],function(){return e(e.s=42879)}),_N_E=e.O()}]);
2//# sourceMappingURL=shared-booking-76b94980f71bb74a.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.