PageSourceSearch

https://www.concier.ai/_next/static/chunks/pages/listing/[id]-14abc58d72af79de.js

js concier.ai collected 2026-10-05 15:00:54 UTC 27,916 bytes, 24 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3790],{81446:function(e,t,n){"use strict";var a=n(67294);let r=a.forwardRef(function({title:e,titleId:t,...n},r){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?a.createElement("title",{id:t},e):null,a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17.593 3.322c1.1.128 1.907 1.077 1.907 2.185V21L12 17.25 4.5 21V5.507c0-1.108.806-2.057 1.907-2.185a48.507 48.507 0 0111.186 0z"}))});t.Z=r},38946:function(e,t,n){"use strict";var a=n(67294);let r=a.forwardRef(function({title:e,titleId:t,...n},r){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?a.createElement("title",{id:t},e):null,a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.625 12a.375.375 0 11-.75 0 .375.375 0 01.75 0zm0 0H8.25m4.125 0a.375.375 0 11-.75 0 .375.375 0 01.75 0zm0 0H12m4.125 0a.375.375 0 11-.75 0 .375.375 0 01.75 0zm0 0h-.375M21 12c0 4.556-4.03 8.25-9 8.25a9.764 9.764 0 01-2.555-.337A5.972 5.972 0 015.41 20.97a5.969 5.969 0 01-.474-.065 4.48 4.48 0 00.978-2.025c.09-.457-.133-.901-.467-1.226C3.93 16.178 3 14.189 3 12c0-4.556 4.03-8.25 9-8.25s9 3.694 9 8.25z"}))});t.Z=r},11003:function(e,t,n){"use strict";var a=n(67294);let r=a.forwardRef(function({title:e,titleId:t,...n},r){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?a.createElement("title",{id:t},e):null,a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v6m3-3H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z"}))});t.Z=r},68063:function(e,t,n){"use strict";var a=n(67294);let r=a.forwardRef(function({title:e,titleId:t,...n},r){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?a.createElement("title",{id:t},e):null,a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"}))});t.Z=r},24483:function(e,t,n){"use strict";n.d(t,{M:function(){return AnimatePresence}});var a=n(85893),r=n(67294),i=n(38168),l=n(16770),s=n(87649);let PopChildMeasure=class PopChildMeasure extends r.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){let e=this.props.sizeRef.current;e.height=t.offsetHeight||0,e.width=t.offsetWidth||0,e.top=t.offsetTop,e.left=t.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}};function PopChild({children:e,isPresent:t}){let n=(0,r.useId)(),i=(0,r.useRef)(null),l=(0,r.useRef)({width:0,height:0,top:0,left:0}),{nonce:o}=(0,r.useContext)(s._);return(0,r.useInsertionEffect)(()=>{let{width:e,height:a,top:r,left:s}=l.current;if(t||!i.current||!e||!a)return;i.current.dataset.motionPopId=n;let d=document.createElement("style");return o&&(d.nonce=o),document.head.appendChild(d),d.sheet&&d.sheet.insertRule(`
2          [data-motion-pop-id="${n}"] {
3            position: absolute !important;
4            width: ${e}px !important;
5            height: ${a}px !important;
6            top: ${r}px !important;
7            left: ${s}px !important;
8          }
9        `),()=>{document.head.removeChild(d)}},[t]),(0,a.jsx)(PopChildMeasure,{isPresent:t,childRef:i,sizeRef:l,children:r.cloneElement(e,{ref:i})})}let PresenceChild=({children:e,initial:t,isPresent:n,onExitComplete:s,custom:o,presenceAffectsLayout:d,mode:c})=>{let u=(0,l.h)(newChildrenMap),m=(0,r.useId)(),f=(0,r.useCallback)(e=>
9{for(let t of(u.set(e,!0),u.values()))if(!t)return;s&&s()},[u,s]),g=(0,r.useMemo)(()=>({id:m,initial:t,isPresent:n,custom:o,onExitComplete:f,register:e=>(u.set(e,!1),()=>u.delete(e))}),d?[Math.random(),f]:[n,f]);return(0,r.useMemo)(()=>{u.forEach((e,t)=>u.set(t,!1))},[n]),r.useEffect(()=>{n||u.size||!s||s()},[n]),"popLayout"===c&&(e=(0,a.jsx)(PopChild,{isPresent:n,children:e})),(0,a.jsx)(i.O.Provider,{value:g,children:e})};function newChildrenMap(){return new Map}var o=n(96179),d=n(71456);let getChildKey=e=>e.key||"";function onlyElements(e){let t=[];return r.Children.forEach(e,e=>{(0,r.isValidElement)(e)&&t.push(e)}),t}var c=n(54283);let AnimatePresence=({children:e,exitBeforeEnter:t,custom:n,initial:i=!0,onExitComplete:s,presenceAffectsLayout:u=!0,mode:m="sync"})=>{(0,d.k)(!t,"Replace exitBeforeEnter with mode='wait'");let f=(0,r.useMemo)(()=>onlyElements(e),[e]),g=f.map(getChildKey),h=(0,r.useRef)(!0),p=(0,r.useRef)(f),v=(0,l.h)(()=>new Map),[x,b]=(0,r.useState)(f),[y,w]=(0,r.useState)(f);(0,c.L)(()=>{h.current=!1,p.current=f;for(let e=0;e<y.length;e++){let t=getChildKey(y[e]);g.includes(t)?v.delete(t):!0!==v.get(t)&&v.set(t,!1)}},[y,g.length,g.join("-")]);let j=[];if(f!==x){let e=[...f];for(let t=0;t<y.length;t++){let n=y[t],a=getChildKey(n);g.includes(a)||(e.splice(t,0,n),j.push(n))}"wait"===m&&j.length&&(e=j),w(onlyElements(e)),b(f);return}let{forceRender:N}=(0,r.useContext)(o.p);return(0,a.jsx)(a.Fragment,{children:y.map(e=>{let t=getChildKey(e),r=f===y||g.includes(t);return(0,a.jsx)(PresenceChild,{isPresent:r,initial:(!h.current||!!i)&&void 0,custom:r?void 0:n,presenceAffectsLayout:u,mode:m,onExitComplete:r?void 0:()=>{if(!v.has(t))return;v.set(t,!0);let e=!0;v.forEach(t=>{t||(e=!1)}),e&&(null==N||N(),w(p.current),s&&s())},children:e},t)})})}},91373:function(e,t,n){"use strict";n.d(t,{Z:function(){return createLucideIcon}});var a=n(67294);/**
10 * @license lucide-react v0.462.0 - ISC
11 *
12 * This source code is licensed under the ISC license.
13 * See the LICENSE file in the root directory of this source tree.
14 */let toKebabCase=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),mergeClasses=(...e)=>e.filter((e,t,n)=>!!e&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim();/**
15 * @license lucide-react v0.462.0 - ISC
16 *
17 * This source code is licensed under the ISC license.
18 * See the LICENSE file in the root directory of this source tree.
19 */var r={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
20 * @license lucide-react v0.462.0 - ISC
21 *
22 * This source code is licensed under the ISC license.
23 * See the LICENSE file in the root directory of this source tree.
24 */let i=(0,a.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:i,className:l="",children:s,iconNode:o,...d},c)=>(0,a.createElement)("svg",{ref:c,...r,width:t,height:t,stroke:e,strokeWidth:i?24*Number(n)/Number(t):n,className:mergeClasses("lucide",l),...d},[...o.map(([e,t])=>(0,a.createElement)(e,t)),...Array.isArray(s)?s:[s]])),createLucideIcon=(e,t)=>{let n=(0,a.forwardRef)(({className:n,...r},l)=>(0,a.createElement)(i,{ref:l,iconNode:t,className:mergeClasses(`lucide-${toKebabCase(e)}`,n),...r}));return n.displayName=`${e}`,n}},28924:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/listing/[id]",function(){return n(68110)}])},9663:function(e,t,n){"use strict";n.d(t,{d:function(){return o},z:function(){return d}});var a=n(85893),r=n(67294),i=n(65142),l=n(94577),s=n(68990);let o=(0,l.j)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),d=r.forwardRef((e,t)=>
24{let{className:n,variant:r,size:l,asChild:d=!1,...c}=e,u=d?i.g7:"button";return(0,a.jsx)(u,{className:(0,s.cn)(o({variant:r,size:l,className:n})),ref:t,...c})});d.displayName="Button"},78764:function(e,t,n){"use strict";n.d(t,{f:function(){return Calendar}});var a=n(36971),r=n(85893),i=n(67294),l=n(98814),s=n(64998),o=n(8971),d=n(64197),c=n(66919),u=n(68990),m=n(9663);function _templateObject(){let e=(0,a._)(["rtl:**:[.rdp-button_next>svg]:rotate-180"],["rtl:**:[.rdp-button\\_next>svg]:rotate-180"]);return _templateObject=function(){return e},e}function _templateObject1(){let e=(0,a._)(["rtl:**:[.rdp-button_previous>svg]:rotate-180"],["rtl:**:[.rdp-button\\_previous>svg]:rotate-180"]);return _templateObject1=function(){return e},e}function Calendar(e){let{className:t,classNames:n,showOutsideDays:a=!0,captionLayout:i="label",buttonVariant:f="ghost",formatters:g,components:h,...p}=e,v=(0,d.U)();return(0,r.jsx)(c._,{showOutsideDays:a,className:(0,u.cn)("bg-background group/calendar p-3 [--cell-size:2rem] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",String.raw(_templateObject()),String.raw(_templateObject1()),t),captionLayout:i,formatters:{formatMonthDropdown:e=>e.toLocaleString("default",{month:"short"}),...g},classNames:{root:(0,u.cn)("w-fit",v.root),months:(0,u.cn)("relative flex flex-col gap-4 md:flex-row",v.months),month:(0,u.cn)("flex w-full flex-col gap-4",v.month),nav:(0,u.cn)("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",v.nav),button_previous:(0,u.cn)((0,m.d)({variant:f}),"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",v.button_previous),button_next:(0,u.cn)((0,m.d)({variant:f}),"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",v.button_next),month_caption:(0,u.cn)("flex h-[--cell-size] w-full items-center justify-center px-[--cell-size]",v.month_caption),dropdowns:(0,u.cn)("flex h-[--cell-size] w-full items-center justify-center gap-1.5 text-sm font-medium",v.dropdowns),dropdown_root:(0,u.cn)("has-focus:border-ring border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] relative rounded-md border",v.dropdown_root),dropdown:(0,u.cn)("bg-popover absolute inset-0 opacity-0",v.dropdown),caption_label:(0,u.cn)("select-none font-medium","label"===i?"text-sm":"[&>svg]:text-muted-foreground flex h-8 items-center gap-1 rounded-md pl-2 pr-1 text-sm [&>svg]:size-3.5",v.caption_label),table:"w-full border-collapse",weekdays:(0,u.cn)("flex",v.weekdays),weekday:(0,u.cn)("text-muted-foreground flex-1 select-none rounded-md text-[0.8rem] font-normal",v.weekday),week:(0,u.cn)("mt-2 flex w-full",v.week),week_number_header:(0,u.cn)("w-[--cell-size] select-none",v.week_number_header),week_number:(0,u.cn)("text-muted-foreground select-none text-[0.8rem]",v.week_number),day:(0,u.cn)("group/day relative flex items-center justify-center select-none p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md",v.day),range_start:(0,u.cn)("bg-accent rounded-l-md",v.range_start),range_middle:(0,u.cn)("rounded-none",v.range_middle),range_end:(0,u.cn)("bg-accent rounded-r-md",v.range_end),today:(0,u.cn)("bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none",v.today),outside:(0,u.cn)("text-muted-foreground aria-selected:text-muted-foreground",v.outside),disabled:(0,u.cn)("text-muted-foreground opacity-50",v.disabled),hidden:(0,u.cn)("invisible",v.hidden),...n},components:{Root:e=>{let{className:t,rootRef:n,...a}=e;return(0,r.jsx)("div",{"data-slot":"calendar",ref:n,className:(0,u.cn)(t),...a})},Chevron:e=>{let{className:t,orientation:n,...a}=e;return"left"===n?(0,r.jsx)(l.Z,{className:(0,u.cn)("size-4",t),...a}):"right"===n?(0,r.jsx)(s.Z,{className:(0,u.cn)("size-4",t),...a}):(0,r.jsx)(o.Z,{className:(0,u.cn)("size-4",t),...a})},DayButton:CalendarDayButton,WeekNumber:e=>{let{children:t,...n}=e;return(0,r.jsx)("td",{...n,children:(0,r.jsx)("div",{className:"flex size-[--cell-size] items-center justify-center text-center",children:t})})},...h},...p})}function CalendarDayButton(e){let{className:t,day:n,modifiers:a,...l}=e,s=(0,d.U)(),o=i.useRef(null);return i.useEffect(()=>{var e;a.focused&&(null===(e=o.current)||void 0===e||e.focus())},[a.focused]),(0,r.jsx)(m.z,{ref:o,variant:"ghost",size:"icon","data-day":n.date.toLocaleDateString(),"data-selected-single":a.selected&&!a.range_start&&!a.range_end&&!a.range_middle,"data-range-start":a.range_start,"data-range-end":a.range_end,"data-range-middle":a.range_middle,className:(0,u.cn)("data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground focus-visible:ring-0 flex aspect-square size-[--cell-size] flex-col gap-1 font-normal leading-none data-[range-end=true]:rounded-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md [&>span]:text-xs [&>span]:opacity-70",s.day,t),...l})}},45919:function(e,t,n){"use strict";var a=n(85893);n(67294),t.Z=function(){return(0,a.jsxs)("div",{className:"animate-pulse w-full p-6 space-y-4",children:[(0,a.jsx)("div",{className:"h-12 bg-slate-200 rounded w-full"}),(0,a.jsx)("div",{className:"h-16 bg-slate-200 rounded w-full"}),(0,a.jsx)("div",{className:"h-16 bg-slate-200 rounded w-full"})]})}},68990:function(e,t,n){"use strict";n.d(t,{cn:function(){return cn}});var a=n(1410),r=n(22668);function cn(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,r.m6)((0,a.W)(t))}},68110:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return ListingPage}});var a=n(85893),r=n(67294),i=n(9008),l=n.n(i),s=n(16251),o=n(11163),d=n(78764),c=n(9663),u=n(18781),m=n(78317);function formatDateLocal(e){return new Date(e.getTime()-6e4*e.getTimezoneOffset()).toISOString().split("T")[0]}function ListingAvailabilityComponent(e){var t,n,i,l,s;let{listingInfo:o,rangeAvailability:f,date:g,setDate:h,displayedMonth:p,onMonthChange:v,selectedTimeSlot:x,setSelectedTimeSlot:b,isLoadingAvailability:y}=e,[w,j]=(0,r.useState)(!1),[N,S]=(0,r.useState)(null),[_,k]=(0,r.useState)({}),[E,C]=(0,r.useState)("no-preference"),D=null!==(i=null==f?void 0:f.availability)&&void 0!==i?i:{},L=null!==(l=null==f?void 0:f.staffFullList)&&void 0!==l?l:[],M=L.length>0,z=(0,r.useMemo)(()=>new Set(Object.keys(D)),[D]),O=(0,r.useMemo)(()=>
24{if(!E||"no-preference"===E)return z;let e=new Set;for(let[t,n]of Object.entries(D))if(n.availableStaffs){let a=Object.values(n.availableStaffs).some(e=>null==e?void 0:e.some(e=>e.id===E));a&&e.add(t)}return e},[D,E,z]),I=M&&E&&"no-preference"!==E?O:z,T=(0,r.useMemo)(()=>{let e=new Set;for(let t of Object.values(D))if(t.availableStaffs)for(let n of Object.values(t.availableStaffs))null==n||n.forEach(t=>e.add(t.id));return e},[D]),R=g?formatDateLocal(g):null,P=R&&null!==(s=D[R])&&void 0!==s?s:null,A=(0,r.useMemo)(()=>{if(!P)return[];let e=P.availableSlots;return M&&E&&"no-preference"!==E?e.filter(e=>{var t,n;return null===(n=P.availableStaffs)||void 0===n?void 0:null===(t=n[e])||void 0===t?void 0:t.some(e=>e.id===E)}):e},[P,E,M]),selectStaffForTimeSlot=e=>{var t,n;if(!(null==P?void 0:null===(n=P.availableStaffs)||void 0===n?void 0:null===(t=n[e])||void 0===t?void 0:t.length))return;let a=P.availableStaffs[e],r=_[e]||0,i=a[r%a.length];return k(t=>({...t,[e]:r+1})),i.id},F=m.h.reservation.create.useMutation({onSuccess:e=>{var t,n;let a={id:e.reservation.id,startDateTime:(null===(t=e.reservation.startDateTime)||void 0===t?void 0:t.toISOString())||"",endDateTime:(null===(n=e.reservation.endDateTime)||void 0===n?void 0:n.toISOString())||"",firstName:e.reservation.firstName||"",lastName:e.reservation.lastName||"",email:e.reservation.email||"",phone:e.reservation.phone||""};S(a),j(!1)},onError:e=>{throw console.error("Error creating reservation:",e),Error(e.message||"Failed to create reservation")}});(0,r.useMemo)(()=>{if(!(null==P?void 0:P.availableStaffs))return[];let e=new Map;return Object.values(P.availableStaffs).forEach(t=>{null==t||t.forEach(t=>{e.has(t.id)||e.set(t.id,t)})}),Array.from(e.values())},[P]);let handleFormSubmit=async e=>{try{var t,n,a;if(!(null==o?void 0:o.id))throw Error("Listing ID is missing");if(!g||!x)throw Error("Date and time slot are required");let r=e.get("email"),i=e.get("phone");if((!r||!r.trim())&&(!i||!i.trim()))throw Error("Either email or phone number is required");let l=new Date("".concat(g.toISOString().split("T")[0],"T").concat(x)),s=new Date(l.getTime()+6e4*Number(null!==(a=null==f?void 0:null===(t=f.metadata)||void 0===t?void 0:t.bookingDurationInMinutes)&&void 0!==a?a:60)),d="".concat(e.get("phone-countryCode")).concat(e.get("phone")),c=new URLSearchParams(window.location.search),u=c.get("conversationId"),m=E&&"no-preference"!==E?E:selectStaffForTimeSlot(x),h=e.get("firstName"),p=e.get("lastName"),v=e.get("email"),b={firstName:h,...p&&p.trim()&&{lastName:p},...v&&v.trim()&&{email:v},...i&&i.trim()&&{phone:d},startDateTime:l.toISOString(),endDateTime:s.toISOString(),...u&&{conversationId:u},...m&&{contactId:m},listingId:o.id,numberOfGuests:1,createdBy:"CONCIER_PAGE",metadata:{source:"website",bookingDurationInMinutes:Number(null==f?void 0:null===(n=f.metadata)||void 0===n?void 0:n.bookingDurationInMinutes),...m&&{assignedStaffId:m}}};F.mutate({...b,listingId:b.listingId,firstName:b.firstName})}catch(e){throw console.error("Error creating reservation:",e),Error(e instanceof Error?e.message:"Failed to create reservation")}},handleTimeSlotClick=e=>{b(e),j(!0)},handleStaffSelect=e=>{C(null===e?"no-preference":e),b(null),h(void 0)};return(0,a.jsxs)("div",{className:"p-4 w-full",children:[N?(0,a.jsxs)("div",{className:"w-full max-w-md mx-auto p-6 border rounded-lg shadow-sm",children:[(0,a.jsx)("h4",{className:"text-gray-700 font-normal mb-4",children:"Reservation Confirmed!"}),(0,a.jsxs)("div",{className:"space-y-3 text-gray-600",children:[(0,a.jsxs)("p",{children:[(0,a.jsx)("span",{className:"text-gray-500",children:"Reservation ID:"})," ",N.id]}),(0,a.jsxs)("p",{children:[(0,a.jsx)("span",{className:"text-gray-500",children:"Date:"})," ",new Date(N.startDateTime).toLocaleDateString(void 0,{weekday:"long",year:"numeric",month:"long",day:"numeric"})]}),(0,a.jsxs)("p",{children:[(0,a.jsx)("span",{className:"text-gray-500",children:"Time:"})," ",new Date(N.startDateTime).toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"})," - ",new Date(N.endDateTime).toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"})]}),(0,a.jsxs)("p",{children:[(0,a.jsx)("span",{className:"text-gray-500",children:"Name:"})," ","".concat(N.firstName||""," ").concat(N.lastName||"")]}),(0,a.jsxs)("p",{children:[(0,a.jsx)("span",{className:"text-gray-500",children:"Email:"})," ",N.email||"N/A"]}),(0,a.jsxs)("p",{children:[(0,a.jsx)("span",{className:"text-gray-500",children:"Phone:"})," ",N.phone||"N/A"]})]}),(0,a.jsx)(c.z,{className:"mt-6",onClick:()=>{S(null),b(null),C(null),h(void 0)},children:"Make Another Reservation"})]}):(0,a.jsxs)("div",{className:"w-full flex flex-col items-center",children:[M&&(0,a.jsxs)("div",{className:"w-full max-w-md mb-4",children:[(0,a.jsx)("h4",{className:"text-gray-600 font-normal mb-2",children:"Book with"}),(0,a.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,a.jsx)("button",{onClick:()=>handleStaffSelect(null),className:"px-3 py-1.5 rounded-md transition-colors text-sm ".concat("no-preference"===E?"bg-slate-800 text-white":"bg-gray-100 hover:bg-gray-200"),children:"No preference"}),L.map(e=>{let t=T.has(e.id);return(0,a.jsx)("button",{onClick:()=>t&&handleStaffSelect(e.id),disabled:!t,className:"px-3 py-1.5 rounded-md transition-colors text-sm ".concat(E===e.id?"bg-slate-800 text-white":t?"bg-gray-100 hover:bg-gray-200":"bg-gray-50 text-gray-300 cursor-not-allowed"),children:e.name},e.id)})]})]}),(0,a.jsx)("p",{className:"text-gray-400 mb-4 text-center",children:"Select a date to view available booking times"}),(0,a.jsx)(d.f,{mode:"single",selected:g,onSelect:h,month:p,onMonthChange:v,className:"rounded-md border mb-6",disabled:e=>{let t=new Date;if(t.setHours(0,0,0,0),e<t)return!0;
24if(y)return!1;let n=formatDateLocal(e);return!I.has(n)}}),(0,a.jsx)("div",{className:"w-full max-w-md",children:y?(0,a.jsx)("div",{className:"space-y-4",children:(0,a.jsx)("div",{className:"grid grid-cols-3 gap-2",children:[...Array(6)].map((e,t)=>(0,a.jsx)("div",{className:"h-10 bg-gray-200 rounded-md animate-pulse"},t))})}):(0,a.jsxs)(a.Fragment,{children:[g&&P&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h4",{className:"text-gray-600 font-normal mb-2",children:"Available Time Slots"}),(0,a.jsx)("div",{className:"grid grid-cols-3 gap-2",children:A.length>0?A.map(e=>(0,a.jsx)("button",{onClick:()=>handleTimeSlotClick(e),className:"p-2 rounded-md transition-colors ".concat(x===e?"bg-slate-800 text-white":"bg-gray-100 hover:bg-gray-200"),children:e},e)):(0,a.jsx)("p",{className:"col-span-3 text-center text-gray-500 py-4",children:"No available time slots for this selection"})})]}),(null==f?void 0:f.metadata)&&(0,a.jsxs)("div",{className:"mt-6 p-4 bg-gray-50 rounded-lg",children:[(0,a.jsx)("h4",{className:"text-gray-600 font-normal mb-2",children:"Business Hours"}),Object.entries(f.metadata.businessHours).map(e=>{let[t,n]=e;return(0,a.jsxs)("div",{className:"flex justify-between text-sm text-gray-500",children:[(0,a.jsx)("span",{className:"capitalize",children:t}),(0,a.jsx)("span",{children:Array.isArray(n)&&n.length>0?n.map((e,t)=>(0,a.jsxs)("span",{children:[e.open," - ",e.close,t<n.length-1?", ":""]},t)):"Closed"})]},t)}),(0,a.jsx)("div",{className:"mt-2 text-sm text-gray-500",children:(0,a.jsxs)("p",{children:["Duration:"," ",f.metadata.bookingDurationInMinutes," minutes"]})})]})]})})]}),(0,a.jsx)(u.Z,{isOpen:w,onClose:()=>j(!1),title:"Make a Reservation",description:"Time: ".concat(null==g?void 0:g.toLocaleDateString()," ").concat(x).concat(E&&"no-preference"!==E?"\nBook with: ".concat((null===(n=L.find(e=>e.id===E))||void 0===n?void 0:null===(t=n.name)||void 0===t?void 0:t.split(" ")[0])||""):""),fields:[{name:"firstName",label:"First Name",type:"text",required:!0},{name:"lastName",label:"Last Name",type:"text"},{name:"email",label:"Email",type:"email",required:!1},{name:"phone",label:"Phone",type:"phone",placeholder:"(555) 555-5555",required:!1}],onSubmit:handleFormSubmit,submitLabel:"Confirm Reservation",isSubmitting:F.isPending}),(0,a.jsx)("div",{className:"h-24"})]})}var f=n(17078),g=n(24483),h=n(7879),p=n(45919);function _id_formatDateLocal(e){return new Date(e.getTime()-6e4*e.getTimezoneOffset()).toISOString().split("T")[0]}function ListingPage(){var e,t,n;let i=(0,o.useRouter)(),{id:d}=i.query,[c,u]=(0,r.useState)(null),[v,x]=(0,r.useState)(!1),[b,y]=(0,r.useState)(()=>{let e=new Date;return e.setHours(0,0,0,0),e}),[w,j]=(0,r.useState)(null),[N,S]=(0,r.useState)(!1),[_,k]=(0,r.useState)(null),[E,C]=(0,r.useState)(()=>{let e=new Date;return new Date(e.getFullYear(),e.getMonth(),1)});(0,r.useEffect)(()=>{let handleScroll=()=>{let e=window.scrollY;e>50&&!N?S(!0):e<=50&&N&&S(!1)};return window.addEventListener("scroll",handleScroll),()=>{window.removeEventListener("scroll",handleScroll)}},[N]);let{data:D}=m.h.listing.getPublicInfo.useQuery({listingId:d},{enabled:!!d}),{startDate:L,endDate:M}=(0,r.useMemo)(()=>{let e=new Date(E.getFullYear(),E.getMonth(),1),t=new Date(E.getFullYear(),E.getMonth()+1,0);return{startDate:_id_formatDateLocal(e),endDate:_id_formatDateLocal(t)}},[E]),{data:z,isLoading:O}=m.h.listing.getAvailabilityRange.useQuery({listingId:d,startDate:L,endDate:M},{enabled:!!d});return((0,r.useEffect)(()=>{(null==D?void 0:D.listing)&&u(D.listing)},[D]),d)?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(l(),{children:[(0,a.jsx)("title",{children:"Listing Details"}),(0,a.jsx)("meta",{name:"viewport",content:"width=device-width, initial-scale=1, maximum-scale=1"}),(0,a.jsx)("meta",{name:"description",content:"Listing Page is a page to display information about a specific listing."}),(0,a.jsx)("link",{rel:"icon",href:"/concier-ico.svg",type:"image/svg+xml"})]}),(0,a.jsx)(g.M,{children:(0,a.jsxs)(h.E.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:20},transition:{duration:.3,ease:"easeOut"},className:"min-h-screen w-full flex flex-col",children:[(0,a.jsxs)("div",{className:"flex-grow",children:[c&&(0,a.jsxs)(h.E.div,{initial:{opacity:0,y:-20,height:192}
24,animate:{opacity:1,y:0,height:N?96:192,transition:{height:{duration:.3,ease:"easeInOut"}}},transition:{duration:.5,delay:.2},className:"w-full rounded-t-none rounded-b-3xl overflow-hidden sticky top-0 z-10",children:[!v&&(0,a.jsx)(h.E.div,{initial:{opacity:0},animate:{opacity:1},transition:{duration:.3},className:"w-full h-full",children:(0,a.jsx)(p.Z,{})}),(null===(n=c.metadata)||void 0===n?void 0:null===(t=n.pictures)||void 0===t?void 0:null===(e=t[0])||void 0===e?void 0:e.url)?(0,a.jsx)("img",{className:"h-full w-full object-cover transition-opacity duration-300 ".concat(v?"opacity-100":"opacity-0"),src:c.metadata.pictures[0].url,alt:c.title,onLoad:()=>x(!0)}):(0,a.jsx)("img",{className:"h-full w-full object-cover transition-opacity duration-300 ".concat(v?"opacity-100":"opacity-0"),src:"/pictures/default-bg.png",alt:"Default Listing Image",onLoad:()=>x(!0)}),(0,a.jsx)("div",{className:"absolute inset-x-0 top-0 h-1/2 bg-gradient-to-b from-black to-transparent opacity-40"}),(0,a.jsx)("div",{className:"absolute inset-x-0 top-0 py-4 flex items-center",children:(0,a.jsx)("p",{className:"text-lg font-bold text-white ml-2 px-3 py-1 bg-black/10 rounded-lg backdrop-blur-sm",children:c.title})})]}),c&&(0,a.jsx)(a.Fragment,{children:c.children&&c.children.length>0?(0,a.jsxs)(h.E.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:.4},className:"p-4 pb-24",children:[(0,a.jsx)("h4",{className:"text-gray-600 font-normal mb-4",children:"Services"}),(0,a.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 overflow-y-auto p-2",children:c.children.map(e=>{var t,n,r;return(0,a.jsxs)("div",{className:"p-3 border rounded-lg cursor-pointer transition-all duration-200 ".concat(_===e.id?"shadow-md scale-[1.005]":"hover:shadow-md"),onClick:()=>{i.query,e.id,i.push({pathname:"/listing/".concat(e.id),query:i.query})},onMouseEnter:()=>k(e.id),onMouseLeave:()=>k(null),children:[(null===(r=e.metadata)||void 0===r?void 0:null===(n=r.pictures)||void 0===n?void 0:null===(t=n[0])||void 0===t?void 0:t.url)&&(0,a.jsx)("img",{src:e.metadata.pictures[0].url,alt:e.title,className:"w-full h-40 object-cover rounded-lg"}),(0,a.jsx)("h3",{className:"text-gray-700 font-normal mt-2",children:e.title})]},e.id)})})]}):c&&(0,a.jsx)(h.E.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:.4},children:(0,a.jsx)(ListingAvailabilityComponent,{listingInfo:c,rangeAvailability:z||null,date:b,setDate:y,displayedMonth:E,onMonthChange:C,selectedTimeSlot:w,setSelectedTimeSlot:j,isLoadingAvailability:O})})})]}),(0,a.jsx)(h.E.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:.6}})]})}),(0,a.jsx)(f.Z,{listingId:(null==c?void 0:c.parentId)||d})]}):(0,a.jsx)(s.Z,{})}}},function(e){e.O(0,[7879,265,2688,300,9774,2888,179],function(){return e(e.s=28924)}),_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.