PageSourceSearch

https://campin-frontend-lj93.vercel.app/_next/static/chunks/pages/camps/[camp_id]-c1ed151ee3b86137.js

js campin-frontend-lj93.vercel.app collected 2026-10-03 06:21:01 UTC 59,662 bytes, 20 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1926],{44137:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/camps/[camp_id]",function(){return s(67136)}])},65114:function(e,t,s){"use strict";var l=s(85893);t.Z=e=>{let{header:t,navbar:s,footer:a,children:i}=e;return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)("div",{className:"flex min-h-screen flex-col items-center",children:[t,(0,l.jsx)("main",{className:"container flex h-full w-full grow flex-col sm:px-10 sm:py-5",children:i}),(0,l.jsx)("div",{className:"m-auto"}),a,s]})})}},4684:function(e,t,s){"use strict";var l=s(85893),a=s(90804),i=s(67294),n=s(89583),r=s(70231),o=s(2585),c=s(60155);let d=["motorhome","caravan","tent","van","rooftop_tent"];t.Z=e=>{let{selectedAccommodation:t,onChange:s,className:u,size:m}=e,x=(0,i.useMemo)(()=>{switch(m){case"sm":return{iconSize:16,textMain:"text-sm",textSub:"text-xs",rowGap:0,rowPadX:0,iconGap:2,iconPad:1};case"md":default:return{iconSize:20,textMain:"text-base",textSub:"text-sm",rowGap:8,rowPadX:3,iconGap:4,iconPad:2};case"lg":return{iconSize:22,textMain:"text-lg",textSub:"text-base",rowGap:10,rowPadX:4,iconGap:4,iconPad:4}}},[m]),h=(e,t)=>{let s="",a="",d=[];switch(e){case"motorhome":s="Motorhome",a="* excludes some plots",d=[c.fv3];break;case"caravan":s="Caravan",a="* excludes some plots",d=[n.f8Q];break;case"tent":s="Tent",a="* Any number of tents",d=[o.Wbh];break;case"van":s="Van",a="* excludes some plots",d=[r.um_];break;case"rooftop_tent":s="Rooftop tent",a="* excludes some plots",d=[o.HrY];break;default:console.error("Unsupported accommodation type")}return(0,l.jsx)("div",{className:"\n          ".concat(t?"text-primary":"text-gray-500 hover:text-gray-800","\n          cursor-pointer\n        "),children:(0,l.jsxs)("div",{className:"flex w-full items-center justify-between gap-".concat(x.rowGap," py-3 px-").concat(x.rowPadX),children:[(0,l.jsxs)("div",{className:"grow",children:[(0,l.jsxs)("div",{className:"flex items-center gap-1",children:[d.map((e,t)=>(0,i.createElement)(e,{key:t,size:18})),(0,l.jsx)("p",{className:"".concat(x.textMain," font-medium"),children:s})]}),(0,l.jsx)("p",{className:"".concat(x.textSub," font-light"),children:a})]}),t&&(0,l.jsx)(c.jI1,{size:24})]})})};return(0,l.jsx)("div",{className:u,children:(0,l.jsx)(a.g,{children:d.map((e,a)=>(0,l.jsx)("div",{onClick:e!==t?()=>null==s?void 0:s(e):void 0,children:h(e,e===t)},e))})})}},58146:function(e,t,s){"use strict";var l=s(85893),a=s(67294);t.Z=e=>{let{category:t,size:s,className:i}=e,n=(0,a.useMemo)(()=>{switch(s){case"sm":return{textMain:"text-2xs"};case"md":default:return{textMain:"text-xs"};case"lg":return{textMain:"text-sm"}}},[s]);return(0,l.jsx)("div",{style:{backgroundColor:t.color},className:"rounded-md p-1 px-2 ".concat(n.textMain," text-white"),children:(0,l.jsx)("p",{children:t.name})})}},82010:function(e,t,s){"use strict";var l=s(85893),a=s(82606),i=s(17106),n=s(67294),r=s(60155);t.Z=e=>{let{title:t,subtitle:s,children:o}=e;return(0,l.jsx)(a.v,{as:"div",className:"relative inline-block w-full",children:e=>{let{open:c}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(a.v.Button,{className:"w-full",children:(0,l.jsx)("span",{children:(0,l.jsxs)("div",{className:"flex min-h-[45px] items-center justify-between p-3",children:[(0,l.jsxs)("div",{className:"text-left",children:[(0,l.jsx)("p",{className:"".concat(s?"text-[10px] font-semibold":"text-md font-normal"),children:t}),s&&(0,l.jsx)("p",{className:"text-xs text-gray-700",children:s})]}),c?(0,l.jsx)(r.AZg,{size:12}):(0,l.jsx)(r.CgR,{size:12})]})})}),(0,l.jsx)(i.u,{as:n.Fragment,enter:"transition ease-out duration-100",enterFrom:"transform opacity-0 scale-95",enterTo:"transform opacity-100 scale-100",leave:"transition ease-in duration-75",leaveFrom:"transform opacity-100 scale-100",leaveTo:"transform opacity-0 scale-95",children:(0,l.jsx)(a.v.Items,{style:{zIndex:9999},className:"absolute -left-1 -right-1 z-50 origin-top-right divide-y divide-gray-200 rounded-lg bg-white p-3 shadow-xl ring-1 ring-black ring-opacity-5 focus:outline-none",children:o})})]})}})}},38128:function(e,t,s){"use strict";var l=s(85893),a=s(67294),i=s(73935),n=s(60155),r=s(70436);let o=a.forwardRef((e,t)=>
1{let{children:s,onFullscreenChange:o}=e,[c,d]=(0,a.useState)(!1),u=(0,a.useRef)(null),m=e=>{d(t=>void 0!==e?e:!t),(void 0!==e?e:!c)?document.body.style.overflow="hidden":document.body.style.overflow="auto",null==o||o(void 0!==e?e:!c)};return(0,a.useImperativeHandle)(t,()=>({handleFullscreen:m,isFullscreen:()=>c})),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"relative",ref:u,children:[(0,l.jsx)("div",{style:{zIndex:999},onClick:()=>m(!c),className:"absolute bottom-3 right-3 cursor-pointer rounded-full bg-white p-2 shadow hover:brightness-95",children:(0,l.jsx)(r.Z,{trigger:"hover",text:c?"Minimize":"Fullscreen",children:c?(0,l.jsx)(n.sAO,{size:30}):(0,l.jsx)(n.Jek,{size:30})})}),s]}),c&&i.createPortal((0,l.jsxs)("div",{style:{zIndex:9999999999},className:"fixed left-0 top-0 flex h-screen w-screen bg-white",children:[(0,l.jsx)("div",{style:{zIndex:1e10},onClick:()=>m(!1),className:"absolute bottom-6 right-6 cursor-pointer rounded-full bg-white p-3 text-primary shadow-lg hover:brightness-90",children:(0,l.jsx)(r.Z,{trigger:"hover",text:"Minimize",children:(0,l.jsx)(n.sAO,{size:30})})}),s]}),document.getElementById("modal-root"))]})});o.displayName="Fullscreenable",t.Z=o},28170:function(e,t,s){"use strict";var l=s(85893);s(67294),t.Z=e=>{let{message:t,messageColor:s,onlySpinner:a,spinnerColor:i,spinnerSize:n}=e;return(0,l.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2",children:(0,l.jsxs)("div",{className:"flex flex-col items-center justify-center gap-4 text-center text-gray-500",children:[(0,l.jsx)("div",{style:{borderColor:null!=i?i:"#23B9FF",width:null!=n?n:40,height:null!=n?n:40},className:"animate-spin rounded-full border-b-2"}),!a&&(0,l.jsx)("div",{style:{color:null!=s?s:"#23B9FF"},children:t||"Loading..."})]})})}},64168:function(e,t,s){"use strict";var l=s(85893),a=s(67294),i=s(28170);t.Z=e=>{let{children:t,onClick:s,size:n,className:r,isLoading:o}=e,c=(0,a.useMemo)(()=>{switch(n){case"sm":return{textMain:"text-sm",padding:"p-1",height:"h-10"};case"md":return{textMain:"text-md",padding:"p-2",height:"h-12"};case"lg":return{textMain:"text-lg",padding:"p-4",height:"h-14"};default:return{textMain:"text-md",padding:"p-2",height:"h-18"}}},[n]);return(0,l.jsx)("button",{className:"my-4 w-full cursor-pointer rounded-xl bg-gradient-to-r from-primary to-secondary ".concat(r," ").concat(c.padding," ").concat(c.textMain," ").concat(c.height," font-medium text-white transition-all hover:shadow-xl"),onClick:s,children:o?(0,l.jsx)("div",{className:"relative h-full w-full",children:(0,l.jsx)(i.Z,{onlySpinner:!0,spinnerColor:"white",spinnerSize:20})}):t})}},68067:function(e,t,s){"use strict";var l=s(85893),a=s(34386),i=s(59871),n=s(23171);t.Z=e=>{let{image:t,url:s,statusColor:r,tooltip:o,className:c,...d}=e;return(0,l.jsx)(a.Z,{title:o,children:(0,l.jsxs)("button",{...d,className:"relative ".concat(c),onClick:()=>console.log(s),children:[r&&(0,l.jsx)("div",{style:{backgroundColor:r},className:"absolute -right-1 top-0 z-50 h-4 w-4 rounded-full border-2 border-white"}),(0,l.jsx)(n.Z,{className:"rounded-full",fromSupabase:null!=t,src:t||"/avatars/default.png",alt:"Camp",sizes:i.Q7,fill:!0})]})})}},21090:function(e,t,s){"use strict";var l=s(85893),a=s(67294);t.Z=function(e){let{data:t,skeleton:s,render:i,isAlwaysSkeleton:n=!1}=e,r=(0,a.cloneElement)(s,{...s.props,className:"animate-pulse ".concat(s.props.className)});return n?(0,l.jsx)(l.Fragment,{children:r}):t?(0,l.jsx)(l.Fragment,{children:i(t)}):(0,l.jsx)(l.Fragment,{children:r})}},70436:function(e,t,s){"use strict";var l=s(85893),a=s(67294);let i=e=>{let{direction:t,color:s="black",shadow:a=!1,size:i=8}=e,n="".concat(i,"px"),r="transparent",o={up:{borderLeft:"".concat(n," solid ").concat(r),borderRight:"".concat(n," solid ").concat(r),borderBottom:"".concat(n," solid ").concat(s)},down:{borderLeft:"".concat(n," solid ").concat(r),borderRight:"".concat(n," solid ").concat(r),borderTop:"".concat(n," solid ").concat(s)},left:{borderTop:"".concat(n," solid ").concat(r),borderBottom:"".concat(n," solid ").concat(r),borderRight:"".concat(n," solid ").concat(s)},right:{borderTop:"".concat(n," solid ").concat(r),borderBottom:"".concat(n," solid ").concat(r),borderLeft:"".concat(n," solid ").concat(s)}};return(0,l.jsx)("div",{className:"w-0 h-0",style:{...o[t],...a?{filter:"drop-shadow(2px 2px 2px rgba(0, 0, 0, 0.1))"}:{}}})};t.Z=e=>{let{children:t,text:s="Tooltip Text",duration:n=3e3,backgroundColor:r="white",textColor:o="black",position:c="top",trigger:d="click",className:u}=e,[m,x]=(0,a.useState)(!1),h=()=>{x(!0),n&&setTimeout(()=>{x(!1)},n)},p={top:"-bottom-2 left-1/2 transform -translate-x-1/2",right:"-left-2 top-1/2 transform -translate-y-1/2",bottom:"-top-2 left-1/2 transform -translate-x-1/2",left:"-right-2 top-1/2 transform -translate-y-1/2"};return(0,l.jsxs)("div",{className:"relative h-full w-full cursor-pointer",children:[t,(0,l.jsx)("div",{className:"absolute top-0 left-0 right-0 bottom-0 inline-block h-full w-full",onClick:"click"===d?h:void 0,onMouseEnter:"hover"===d?h:void 0,onMouseLeave:"hover"===d?()=>{x(!1)}:void 0,children:(0,l.jsxs)("div",{className:"absolute ".concat({top:"top-0 left-1/2 transform -translate-x-1/2 -translate-y-8",right:"top-1/2 right-0 transform -translate-y-1/2 -translate-x-2",bottom:"top-0 bottom-1/2 transform -translate-x-1/2 -translate-y-2",left:"top-1/2 left-0 transform -translate-y-1/2 translate-x-2"}[c]," rounded transition-all duration-300 ease-in-out ").concat(m?"opacity-100":"opacity-0"," ").concat(u),children:[(0,l.jsx)("div",{className:"absolute -z-10 ".concat(p[c]," ").concat(u),children:(0,l.jsx)(i,{direction:"down",color:r,shadow:!0,size:12})}),(0,l.jsx)("div",{className:"z-20 h-full w-full whitespace-nowrap rounded-md px-2 py-1 text-xs shadow-md bg-".concat(r," text-").concat(o),children:s}),(0,l.jsx)("div",{className:"absolute ".concat(p[c]," ").concat(u),children:(0,l.jsx)(i,{direction:"down",color:r,size:12})})]})})]})}},37204:function(e,t,s){"use strict";s.d(t,{Z:function(){return o}});var l=s(85893),a=s(67294),i=s(69729),n=s(77349),r=s(30286);s(81759),s(15138);var o=(0,i.Z)(e=>{var t;let{onChange:s,initialRange:i}=e,o=function(){let[e,t]=(0,a.useState)({width:void 0,height:void 0});return(0,a.useEffect)(()=>{return window.addEventListener("resize",e),e(),()=>window.removeEventListener("resize",e);function e(){t({width:window.innerWidth,height:window.innerHeight})}},[]),e}
1(),[c,d]=(0,a.useState)([{startDate:i?i.from:new Date,endDate:i?i.to:(0,n.default)(new Date,7),key:"selection"}]);return(0,l.jsx)(r.Dw,{className:"",onChange:e=>{let t=e.selection;t.startDate&&t.endDate&&(d([t]),null==s||s(t.startDate,t.endDate))},preventSnapRefocus:!0,showMonthAndYearPickers:!1,showDateDisplay:!1,fixedHeight:!1,staticRanges:[],inputRanges:[],weekStartsOn:1,minDate:new Date,maxDate:(0,n.default)(new Date,100),months:null!==(t=o.width)&&void 0!==t&&t?2:1,ranges:c,direction:"horizontal"})},(0,l.jsxs)("div",{className:"mt-4 flex aspect-[2.4] flex-col gap-4",children:[(0,l.jsx)("div",{className:"h-[10%] w-full rounded-xl bg-gray-100"}),(0,l.jsx)("div",{className:"h-[90%] w-full rounded-xl bg-gray-100"})]}))},46352:function(e,t,s){"use strict";var l=s(85893),a=s(23171),i=s(48888),n=s(67294),r=s(66653),o=s(60155),c=s(59871),d=s(63416);t.Z=e=>{let{images:t=[i.g_],isSquare:s,lightbox:u,unoptimized:m,className:x,...h}=e,[p,f]=(0,n.useState)(0),[g,v]=(0,n.useState)(!1),[j,b]=(0,n.useState)(!1);return 0==t.length&&(t=[i.g_]),(0,l.jsx)("div",{...h,className:x,children:(0,l.jsxs)("div",{onMouseEnter:()=>v(!0),onMouseLeave:()=>v(!1),className:"relative w-full overflow-hidden ".concat(x),children:[u&&(0,l.jsx)(d.Z,{images:t,isOpen:j,onClose:()=>b(!1)}),(0,l.jsx)("div",{className:"-z-50 flex duration-300 ease-out",style:{transform:"translateX(-".concat(100*p,"%)")},children:t.map((e,t)=>(0,l.jsx)("div",{className:"relative w-full shrink-0 bg-gray-100 ".concat(s?"aspect-square":x),children:(0,l.jsx)(a.Z,{priority:0==t,src:e,alt:"Camp",fill:!0,fromSupabase:!0,unoptimized:m,sizes:c.Q7,style:{objectFit:"cover"}})},e+t))}),(0,l.jsx)("div",{className:"absolute bottom-3 flex w-full justify-center",children:(0,l.jsx)("div",{style:{width:"".concat(.625*Math.min(5,t.length),"rem")},className:"overflow-hidden",children:(0,l.jsx)("div",{className:"flex items-center justify-start gap-1 duration-200 ease-out",style:{transform:"translateX(-".concat(.625*Math.min(Math.max(p-2,0),t.length-5),"rem)")},children:t.map((e,t)=>(0,l.jsx)("div",{style:{opacity:t==p?1:.5,transform:"scale(".concat(1-.1*Math.abs(p-t),")")},className:"h-1.5 w-1.5 shrink-0 rounded-full bg-white duration-300 ease-out"},t))})})}),(0,l.jsx)("div",{className:"duration-200 ".concat(g?"opacity-100":"opacity-0"),children:(0,l.jsxs)("div",{className:"absolute bottom-0 left-0 right-0 top-0 flex items-center justify-between",children:[(0,l.jsx)("div",{className:"duration-200 ".concat(0==p?"opacity-0":"opacity-100"),children:(0,l.jsx)("button",{className:"m-1 rounded-full bg-white p-2 opacity-90 duration-100 hover:scale-105 hover:opacity-100 hover:shadow-lg",onClick:e=>{e.preventDefault(),f(Math.max(p-1,0))},children:(0,l.jsx)(o.nOT,{size:14})})}),u&&(0,l.jsx)("div",{className:"flex h-full grow items-center justify-center",children:(0,l.jsx)("button",{onClick:e=>{e.preventDefault(),e.stopPropagation(),b(!0)},children:(0,l.jsx)(r.zmR,{className:"text-4xl text-white opacity-60 transition-transform hover:scale-125 hover:opacity-100"})})}),(0,l.jsx)("div",{className:"duration-200 ".concat(p==t.length-1?"opacity-0":"opacity-100"),children:(0,l.jsx)("button",{className:"m-1 rounded-full bg-white p-2 opacity-90 duration-100 hover:scale-105 hover:opacity-100 hover:shadow-lg",onClick:e=>{e.preventDefault(),f(Math.min(p+1,t.length-1))},children:(0,l.jsx)(o.onJ,{size:14})})})]})})]})})}},63416:function(e,t,s){"use strict";var l=s(85893),a=s(23171),i=s(59871),n=s(46524);s(34346);let r=e=>{let{slide:t,rect:s}=e,{imageFit:r}=(0,n.RD)().carousel,o=(0,n.QB)(t)&&(0,n.VI)(t,r);return(0,l.jsx)("div",{className:"relative h-full w-[80%]",children:(0,l.jsx)(a.Z,{fill:!0,alt:"",fromSupabase:!0,src:t.src,loading:"eager",draggable:!1,style:{objectFit:o?"cover":"contain"},sizes:i.Q7})})};t.Z=e=>{let{images:t,isOpen:s,onClose:a}=e;return(0,l.jsx)(n.ZP,{open:s,close:a,slides:t.map(e=>({src:e})),render:{slide:r}})}},5076:function(e,t,s){"use strict";s.d(t,{y5:function(){return f},U0:function(){return g},eY:function(){return p},LO:function(){return v}});var l=s(84053),a=s(88767),i=s(96754),n=s(16434),r=s(48888),o=s(90697);let c=e=>Array.isArray(e)&&null!==e?e.map(e=>{let{lat:t,lng:s}=e;return{lat:t,lng:s}}):[];class d{static toCamp(e){var t,s,l,a,i,c,u,m,x,h,p;return{id:e.id,name:e.name,slug:e.slug,rating:parseFloat((null!==(a=e.rating)&&void 0!==a?a:r.TK).toFixed(2)),location:d.toLocation(e.location),images:null!==(i=e.images)&&void 0!==i?i:[],description:e.description,email:e.email,mapImage:null!==(c=e.map_image)&&void 0!==c?c:r.g_,status:e.status,owner:o.e.toProfile({id:e.owner_id,bio:null!==(u=e.owner_bio)&&void 0!==u?u:null,profile_image:null!==(m=e.owner_profile_image)&&void 0!==m?m:null,username:null!==(x=e.owner_username)&&void 0!==x?x:null}),facilities:null!==(h=null===(t=e.facilities)||void 0===t?void 0:t.map(d.toFacility)
1)&&void 0!==h?h:[],amenities:null!==(p=e.amenity_ids)&&void 0!==p?p:[],website:e.website||void 0,phone:e.phone_number||void 0,facebook:e.facebook||void 0,instagram:e.instagram||void 0,campSettings:{...e.camp_settings,checkInTimes:(0,n.Qk)(null==e?void 0:null===(s=e.camp_settings)||void 0===s?void 0:s.check_in_times),checkOutTimes:(0,n.Qk)(null==e?void 0:null===(l=e.camp_settings)||void 0===l?void 0:l.check_out_times)}}}static toAmenity(e){var t,s;return{id:e.id,name:null!==(t=e.name)&&void 0!==t?t:r.$w,icon:null!==(s=e.icon)&&void 0!==s?s:r.$w}}static toLocation(e){if(e)return{id:e.id,name:e.name,country:e.country,region:e.region,description:e.description,coordinates:{lat:e.latitude,lng:e.longitude}}}static toFacility(e){var t,s;return{id:e.id,name:null!==(t=e.name)&&void 0!==t?t:r.$w,icon:null!==(s=e.icon)&&void 0!==s?s:r.$w,mapCoords:c(e.map_coords)}}}async function u(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:20,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,l=arguments.length>3?arguments[3]:void 0,a=e.from("view_camps").select("\n      *,\n      location:camp_locations(*), \n      facilities:camp_facilities(*)\n    ").order("id",{ascending:!0}).eq("status","active").range(s,s+t-1);l&&a.eq("country",l);let{data:n,error:r}=await a.returns();if(r)throw(0,i.I)(r);return n.map(d.toCamp)}async function m(e){var t,s;let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:20,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=await e.auth.getUser();if(!(null===(s=n.data)||void 0===s?void 0:null===(t=s.user)||void 0===t?void 0:t.id))throw Error("No user found");let{data:r,error:o}=await e.rpc("is_admin",{user_id:n.data.user.id});if(o)throw(0,i.I)(o);let{data:c,error:u}=await e.from("view_user_organization_permissions").select("*").eq("user_id",n.data.user.id);if(u)throw(0,i.I)(u);let m=e.from("view_camps").select("\n      *,\n      location:camp_locations(*), \n      facilities:camp_facilities(*)\n    ").order("id",{ascending:!0}).range(a,a+l-1);r||m.in("id",c.map(e=>e.camp_id));let{data:x,error:h}=await m.returns();if(h)throw(0,i.I)(h);return x.map(d.toCamp)}async function x(e,t){let{data:s,error:l}=await e.from("view_camps").select("\n      *,\n      location:camp_locations(*), \n      facilities:camp_facilities(*),\n      camp_settings:camp_settings(*)\n    ").eq("id",t).returns().single();if(l)throw(0,i.I)(l);return d.toCamp(s)}async function h(e,t,s){let{error:l}=await e.from("camps").update({name:s.name,slug:s.slug,description:s.description,images:s.images,email:s.email,status:s.status,map_image:s.map_image,phone_number:s.phone_number,amenity_ids:s.amenity_ids}).eq("id",t);if(l)throw(0,i.I)(l)}function p(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:20,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,s=arguments.length>2?arguments[2]:void 0,i=(0,l.useSupabaseClient)();return(0,a.useQuery)(["camps"],async()=>u(i,e,t,s))}function f(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:20,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,s=(0,l.useSupabaseClient)();return(0,a.useQuery)(["admin","camps"],async()=>m(s,e,t))}function g(e){let t=["camps",e],s=(0,l.useSupabaseClient)();return(0,a.useQuery)(t,async()=>x(s,e),{enabled:!!e})}function v(e){let t=["camps",e],s=(0,a.useQueryClient)(),i=(0,l.useSupabaseClient)();return(0,a.useMutation)(async t=>h(i,e,t),{onSettled:()=>{s.invalidateQueries(t)}})}},12835:function(e,t,s){"use strict";s.d(t,{kw:function(){return h},Vo:function(){return f},c2:function(){return g},GH:function(){return m},es:function(){return x},lI:function(){return p}});var l=s(96754),a=s(84053),i=s(88767),n=s(20194);async function r(e,t){let{error:s}=await e.from("plots").delete().eq("id",t);if(s)throw(0,l.I)(s)}async function o(e,t){let{error:s}=await e.from("plots").insert({camp_id:t.campId,description:t.description,map_coords:t.mapCoords,number:t.plotNumber,category_id:t.category.id});if(s)throw(0,l.I)(s)}async function c(e,t){let{data:s,error:a}=await e.from("plots").select("*,category:plot_categories(*)").eq("camp_id",t).order("number",{ascending:!0}).returns();if(a)throw(0,l.I)(a);return s.map(n.y.toPlot)}async function d(e,t){let{data:s,error:a}=await e.from("plots").select("*,category:plot_categories(*)").eq("id",t).returns().single();if(a)throw(0,l.I)(a);return n.y.toPlot(s)}async function u(e,t,s){let{error:a}=await e.from("plots").update({description:s.description,map_coords:s.mapCoords,number:s.plotNumber,category_id:s.category.id,images:s.images}).eq("id",t).single();if(a)throw(0,l.I)(a)}function m(e){let t=["plots",e],s=(0,a.useSupabaseClient)();return(0,i.useQuery)(t,async()=>d(s,e),{enabled:!!e})}function x(e){let t=["camps",e,"plots"],s=(0,a.useSupabaseClient)();return(0,i.useQuery)(t,async()=>e&&c(s,e))}function h(e,t,s){let n=["camps",e,"plots","available",t,s],r=(0,a.useSupabaseClient)();return(0,i.useQuery)(n,async()=>{let{data:a,error:i}=await r.rpc("get_available_plots",{_camp_id:e,_from_date:t.toDateString(),_to_date:s.toDateString()});if(i)throw(0,l.I)(i);return a.map(e=>e.plot_id)},{enabled:!!e&&!!t&&!!s})}function p(){let e=(0,a.useSupabaseClient)();return(0,i.useMutation)(async t=>u(e,t.id,t))}function f(){let e=(0,a.useSupabaseClient)();return(0,i.useMutation)(async t=>o(e,t))}function g(){let e=(0,a.useSupabaseClient)();return(0,i.useMutation)(async t=>r(e,t))}},94378:function(e,t,s){"use strict";s.d(t,{G:function(){return a},x:function(){return l}});let l=(e,t,s)=>new Intl.NumberFormat(s,{style:"currency",currency:t}).format(e/100),a=(e,t,s)=>{if(!e||!t)return;let a=t;return s?a+=s*e:a+=e,"From ".concat(l(a,"EUR","en-EU"))}},31850:function(e,t,s){"use strict";s.d(t,{be:function(){return r},w6:function(){return n}});let l=(e,t,s)=>e*(1-s)+t*s,a=(e,t,s)=>i((s-e)/(t-e)),i=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Math.min(s,Math.max(t,e))},n=(e,t,s,i,n)=>l(s,i,a(e,t,n)),r=function(e){if(0==e.length)return{lat:0,lng:0};let t=0,s=0;
1return e.forEach(e=>{t+=e.lat,s+=e.lng}),{lat:t/e.length,lng:s/e.length}}},43594:function(e,t,s){"use strict";s.d(t,{$G:function(){return a},KT:function(){return c},Ls:function(){return r},ye:function(){return o},zn:function(){return i}});var l=s(69708);let a=(e,t)=>(null==e?void 0:e.length)>t?"".concat(e.substring(0,t),"..."):e,i=(e,t)=>{let s="";return e.forEach((e,l)=>{let a=0;"string"==typeof e?a=parseInt(e):"number"==typeof e&&(a=e),a>0&&(s.length>0&&(s+=", "),s+="".concat(a," ").concat(t[l]))}),s},n=e=>{if(e)return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()},r=e=>{if(e)return e.split("_").map(e=>n(e)).join(" ")},o=(e,t)=>{let s="";if(e.forEach((e,l)=>{let a=parseInt(e)||0;a>0&&(s.length>0&&(s+=", "),s+="".concat(a," ").concat(t[l]))}),s.length>0)return s},c=e=>{for(let[t,s]of Object.entries(l.X))if(s===e)return r(t.split("_").join(" ").toLowerCase())}},69729:function(e,t,s){"use strict";var l=s(85893),a=s(67294);t.Z=function(e,t){return function(s){let{isLoading:i,skeleton:n,...r}=s;if(!i)return(0,l.jsx)(e,{...r});{let e=null!=n?n:t;if(!e)return(0,l.jsx)("div",{className:"flex h-32 w-full animate-pulse items-center justify-center rounded-xl bg-pink-500",children:(0,l.jsx)("p",{className:"text-2xl font-bold text-white",children:"Missing Skeleton"})});let s=(0,a.cloneElement)(e,{...e.props,className:"animate-pulse ".concat(e.props.className)});return(0,l.jsx)(l.Fragment,{children:s})}}}},95677:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var s in t)Object.defineProperty(e,s,{enumerable:!0,get:t[s]})}(t,{noSSR:function(){return n},default:function(){return r}});let l=s(38754),a=(s(67294),l._(s(8976)));function i(e){return{default:(null==e?void 0:e.default)||e}}function n(e,t){return delete t.webpack,delete t.modules,e(t)}function r(e,t){let s=a.default,l={loading:e=>{let{error:t,isLoading:s,pastDelay:l}=e;return null}};e instanceof Promise?l.loader=()=>e:"function"==typeof e?l.loader=e:"object"==typeof e&&(l={...l,...e}),l={...l,...t};let r=l.loader;return(l.loadableGenerated&&(l={...l,...l.loadableGenerated},delete l.loadableGenerated),"boolean"!=typeof l.ssr||l.ssr)?s({...l,loader:()=>null!=r?r().then(i):Promise.resolve(i(()=>null))}):(delete l.webpack,delete l.modules,n(s,l))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},92254:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"LoadableContext",{enumerable:!0,get:function(){return i}});let l=s(38754),a=l._(s(67294)),i=a.default.createContext(null)},8976:function(e,t,s){"use strict";/**
2@copyright (c) 2017-present James Kyle <[email protected]>
3 MIT License
4 Permission is hereby granted, free of charge, to any person obtaining
5a copy of this software and associated documentation files (the
6"Software"), to deal in the Software without restriction, including
7without limitation the rights to use, copy, modify, merge, publish,
8distribute, sublicense, and/or sell copies of the Software, and to
9permit persons to whom the Software is furnished to do so, subject to
10the following conditions:
11 The above copyright notice and this permission notice shall be
12included in all copies or substantial portions of the Software.
13 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
14EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
15MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
16NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
17LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
18OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
19WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE
20*/Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return x}});let l=s(38754),a=l._(s(67294)),i=s(92254),n=[],r=[],o=!1;function c(e){let t=e(),s={loading:!0,loaded:null,error:null};return s.promise=t.then(e=>(s.loading=!1,s.loaded=e,e)).catch(e=>{throw s.loading=!1,s.error=e,e}),s}class d{promise(){return this._res.promise}retry(){this._clearTimeouts(),this._res=this._loadFn(this._opts.loader),this._state={pastDelay:!1,timedOut:!1};let{_res:e,_opts:t}=this;e.loading&&("number"==typeof t.delay&&(0===t.delay?this._state.pastDelay=!0:this._delay=setTimeout(()=>{this._update({pastDelay:!0})},t.delay)),"number"==typeof t.timeout&&(this._timeout=setTimeout(()=>{this._update({timedOut:!0})},t.timeout))),this._res.promise.then(()=>{this._update({}),this._clearTimeouts()}).catch(e=>{this._update({}),this._clearTimeouts()}),this._update({})}_update(e){this._state={...this._state,error:this._res.error,loaded:this._res.loaded,loading:this._res.loading,...e}
20,this._callbacks.forEach(e=>e())}_clearTimeouts(){clearTimeout(this._delay),clearTimeout(this._timeout)}getCurrentValue(){return this._state}subscribe(e){return this._callbacks.add(e),()=>{this._callbacks.delete(e)}}constructor(e,t){this._loadFn=e,this._opts=t,this._callbacks=new Set,this._delay=null,this._timeout=null,this.retry()}}function u(e){return function(e,t){let s=Object.assign({loader:null,loading:null,delay:200,timeout:null,webpack:null,modules:null},t),l=null;function n(){if(!l){let t=new d(e,s);l={getCurrentValue:t.getCurrentValue.bind(t),subscribe:t.subscribe.bind(t),retry:t.retry.bind(t),promise:t.promise.bind(t)}}return l.promise()}if(!o){let e=s.webpack?s.webpack():s.modules;e&&r.push(t=>{for(let s of e)if(t.includes(s))return n()})}function c(e,t){!function(){n();let e=a.default.useContext(i.LoadableContext);e&&Array.isArray(s.modules)&&s.modules.forEach(t=>{e(t)})}();let r=a.default.useSyncExternalStore(l.subscribe,l.getCurrentValue,l.getCurrentValue);return a.default.useImperativeHandle(t,()=>({retry:l.retry}),[]),a.default.useMemo(()=>{var t;return r.loading||r.error?a.default.createElement(s.loading,{isLoading:r.loading,pastDelay:r.pastDelay,timedOut:r.timedOut,error:r.error,retry:l.retry}):r.loaded?a.default.createElement((t=r.loaded)&&t.default?t.default:t,e):null},[e,r])}return c.preload=()=>n(),c.displayName="LoadableComponent",a.default.forwardRef(c)}(c,e)}function m(e,t){let s=[];for(;e.length;){let l=e.pop();s.push(l(t))}return Promise.all(s).then(()=>{if(e.length)return m(e,t)})}u.preloadAll=()=>new Promise((e,t)=>{m(n).then(e,t)}),u.preloadReady=e=>(void 0===e&&(e=[]),new Promise(t=>{let s=()=>(o=!0,t());m(r,e).then(s,s)})),window.__NEXT_PRELOADREADY=u.preloadReady;let x=u},67136:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return eI}});var l,a,i,n=s(85893),r=s(65114),o=s(15570),c=s(692),d=s(41664),u=s.n(d);let m=e=>{let{shown:t,children:s,className:l,...a}=e;return(0,n.jsx)("header",{style:{zIndex:9999,transform:"translateY(".concat(t?0:-100,"%)")},...a,className:"fixed top-0 left-0 h-20 w-full bg-white drop-shadow ".concat(l," transition-all"),children:(0,n.jsx)("div",{className:"container mx-auto flex h-full items-center gap-6 px-6 sm:px-10",children:s})})},x=e=>{let{text:t,href:s,onClick:l}=e;return(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(u(),{href:s,scroll:!1,children:(0,n.jsx)("button",{onClick:l,className:"flex h-full cursor-pointer items-center border-black transition-all hover:border-b-4",children:(0,n.jsx)("p",{className:"text-sm font-semibold",children:t})})})})};var h=s(61163),p=s(69016),f=s(38128),g=s(68067),v=s(69729),j=s(67294);let b=e=>{let{title:t,subtitle:s,...l}=e;return(0,n.jsxs)("div",{...l,children:[(0,n.jsx)("p",{className:"text-lg font-bold",children:t}),s?(0,n.jsx)("p",{className:"text-xs",children:s}):(0,n.jsx)(n.Fragment,{})]})};var y=(0,v.Z)(b,(0,n.jsxs)("div",{className:"flex h-[44px] flex-col gap-2",children:[(0,n.jsx)("div",{className:"h-[24px] w-1/4 rounded-xl bg-gray-100"}
20),(null===(l=b.defaultProps)||void 0===l?void 0:l.subtitle)&&(0,n.jsx)("div",{className:"h-[10px] w-1/3 rounded-xl bg-gray-100"})]})),w=s(21090),N=s(60155),_=s(4684),k=s(58146),C=s(82010),S=s(64168),Z=s(31054),z=s(70436),I=s(64590),P=s(2979),L=s(43594),M=s(80806),E=s(90710),D=s(34386),F=s(84053),T=s(11163),O=s(58192),A=s(60966),R=e=>{var t,s,l,a,i;let{selectedPlot:r,price:o,rating:c,startDate:d,endDate:m,isCollapsed:x,bookSettings:h,className:p,...f}=e,g=(0,T.useRouter)(),[v,b]=(0,M.Z)(),y=(0,F.useUser)(),w=(0,I.MK)(),{push:R,clear:q}=(0,E.dd)(),G=(0,O.U0)(),[Q,U]=(0,j.useState)(!1),[H,V]=(0,Z.a)(),B=async()=>{var e,t,s;if(null==G||G.capture("booking_request",{camp_id:null==v?void 0:v.camp_id,plot_id:null==r?void 0:r.id,from:d,to:m,number_of_adults:null==v?void 0:v.adults,number_of_kids:null==v?void 0:v.children,number_of_infants:null==v?void 0:v.infants,accommodation_type:null==v?void 0:v.accommodation,user_id:null==y?void 0:y.id}),null==h?void 0:h.isInquiryOnly){H(Error("This campsite is not available for booking. Please send an inquiry to the host."),{isFriendly:!0});return}if(!y){R({id:"auth",title:"Log in & Sign up",props:{view:"sign_in",redirectTo:g.asPath}});return}if(!d||!m){H(Error("Please select a start and end date"),{isFriendly:!0});return}if(!r){H(Error("Please select a plot"),{isFriendly:!0});return}if(!(null==v?void 0:v.camp_id)){H(Error("Please select a campsite, Camp ID not found"),{isFriendly:!0});return}if(!(null==v?void 0:v.adults)){H(Error("Please select the number of adults"),{isFriendly:!0});return}if(!(null==v?void 0:v.accommodation)){H(Error("Please select an accommodation type"),{isFriendly:!0});return}try{U(!0);let l={plot_id:r.id,from:d,to:m,number_of_adults:null!==(e=v.adults)&&void 0!==e?e:0,number_of_kids:null!==(t=v.children)&&void 0!==t?t:0,number_of_infants:null!==(s=v.infants)&&void 0!==s?s:0,accommodation_type:v.accommodation},a=await w.mutateAsync(l);a.bookingId&&(null==G||G.capture("booking_request_success",{bookingId:a.bookingId}),g.push({pathname:"".concat(null==v?void 0:v.camp_id,"/book/").concat(a.bookingId)}))}catch(e){H(e,{isFriendly:!0})}finally{U(!1)}};return(0,n.jsx)("div",{...f,style:{height:x?64:378,overflow:x?"hidden":"visible",zIndex:1001},className:"sticky top-16 mt-12 w-full rounded-3xl border border-gray-300 bg-white bg-opacity-70 shadow-xl backdrop-blur-md transition-all duration-300 ".concat(p),children:(0,n.jsxs)("div",{className:"h-full w-full p-5",children:[o&&(0,n.jsxs)("div",{className:"flex items-center justify-between",children:[(0,n.jsxs)("span",{className:"flex items-baseline gap-2",children:[(0,n.jsx)("p",{className:"font-semibold",children:o}),(0,n.jsx)("p",{className:"text-sm text-gray-500",children:"per night"}),(0,n.jsx)(D.Z,{title:"This price is informational.",children:(0,n.jsx)("div",{className:"cursor-pointer self-center rounded-full bg-gray-100 p-1 text-gray-500 hover:bg-gray-200",children:(0,n.jsx)(N.Oag,{size:12})})})]}),(0,n.jsxs)("span",{className:"flex items-center",children:[(0,n.jsx)(N.naV,{size:11}),(0,n.jsx)("p",{className:"ml-1 text-xs",children:c})]})]}),(0,n.jsxs)("div",{className:"mb-4 mt-3 flex items-center justify-between transition-opacity ".concat(x?"opacity-0":"opacity-100"),children:[(0,n.jsx)("span",{className:"flex items-baseline gap-2",children:(0,n.jsx)(u(),{href:"#map-section",scroll:!1,children:(0,n.jsx)("p",{className:"hover:pointer text-sm font-semibold ".concat(r?"text-mygray":"text-primary"," "),children:r?"Plot ".concat(r.plotNumber):"Select a plot"})})}),(0,n.jsx)("span",{className:"flex items-center",children:(0,n.jsx)(k.Z,{category:null!==(t=null==r?void 0:r.category)&&void 0!==t?t:{id:-1,name:"category",color:"#888888"}})})]}),(0,n.jsxs)("div",{style:{opacity:x?0:1,transform:"scale(".concat(x?.5:1,")")},className:"mt-2 rounded-xl border border-gray-600 duration-200",children:[(0,n.jsxs)("span",{className:"relative flex border-b border-gray-600",children:[g.query.camp_id&&(0,n.jsx)(u(),{href:"#date-picker-section",scroll:!1,children:(0,n.jsx)("div",{className:"absolute bottom-[-1px] left-[-1px] right-[-1px] top-[-1px] z-10 cursor-pointer rounded-t-xl border border-transparent transition-all hover:shadow-md",children:(0,n.jsx)(z.Z,{text:"Select dates on the left",duration:5e3,className:"-mt-2",backgroundColor:"white",textColor:"primary",position:"top",trigger:"click",children:(0,n.jsx)("div",{className:"h-full w-full"})})})}),(0,n.jsxs)("div",{className:"grow border-r border-gray-600 p-3",children:[(0,n.jsx)("p",{className:"text-[10px] font-semibold ",children:"CHECK-IN"}),(0,n.jsx)("p",{className:"text-xs text-gray-700",children:d?(0,P.LP)(d):"Choose a date"})]}),(0,n.jsxs)("div",{className:"grow p-3",children:[(0,n.jsx)("p",{className:"text-[10px] font-semibold ",children:"CHECK-OUT"}),(0,n.jsx)("p",{className:"text-xs text-gray-700",children:m?(0,P.LP)(m):"Choose a date"})]})]}),(0,n.jsx)("div",{className:"border-b border-gray-600",children:(0,n.jsx)(C.Z,{title:"GUESTS",subtitle:null!==(s=(0,L.ye)([v.adults,v.children,v.infants],["Adults","Children","Babies"]))&&void 0!==s?s:"Select who is coming",children:(0,n.jsx)(A.Z,{size:"sm",infantsAgeLimit:null!==(l=null==h?void 0:h.infantsAgeLimit)&&void 0!==l?l:2,childrenAgeLimit:null!==(a=null==h?void 0:h.childrenAgeLimit)&&void 0!==a?a:12,guests:{adults:v.adults,children:v.children,infants:v.infants},onChange:e=>b({adults:e.adults,children:e.children,infants:e.infants})})})}),(0,n.jsx)("div",{children:(0,n.jsx)(C.Z,{title:"ACCOMMODATION",subtitle:null!==(i=(0,L.Ls)(v.accommodation))&&void 0!==i?i:"Select how you're staying",children:(0,n.jsx)(_.Z,{size:"sm",selectedAccommodation:v.accommodation,onChange:e=>b({accommodation:e})})})})]}),(0,n.jsxs)("div",{className:"flex flex-col items-center",children:[(0,n.jsx)(S.Z,{isLoading:Q,size:"sm",onClick:B,children:y?(null==h?void 0:h.isInquiryOnly)?"Send Inquiry":"Request To Book":"Log in to book"}),(0,n.jsx)("p",{className:"text-center text-xs text-gray-500",children:"You wont be charged yet"})]})]})})},q=s(37204),G=e=>{let{text:t,href:s,className:l,...a}=e;return(0,n.jsx)(u(),{href:null!=s?s:"#",scroll:!1,children:(0,n.jsx)("button",{...a,className:"cursor-pointer hover:text-gray-600 ".concat(l),children:(0,n.jsx)("p",{className:"underline",children:t})})})},Q=s(55708),U=(0,v.Z)(e=>{let{className:t,data:s}=e;return s?(0,n.jsxs)("div",{className:t,children:[(0,n.jsx)("p",{className:"text-3xl font-semibold",children:s.title}),(0,n.jsxs)("div",{className:"flex justify-between",children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,n.jsxs)("div",{className:"flex items-center",children:[(0,n.jsx)(N.naV,{}),(0,n.jsx)("p",{className:"ml-2",children:s.rating})]}),(0,n.jsx)("p",{children:"•"}),(0,n.jsx)(G,{text:"".concat(s.reviews," reviews"),href:"#reviews-section"}),(0,n.jsx)("p",{children:"•"}),(0,n.jsxs)("div",{className:"flex gap-px",children:[s.country&&(0,n.jsx)(G,{text:s.country,href:"#location-section"}),(0,n.jsx)("p",{children:","}),s.region&&(0,n.jsx)(G,{text:s.region,href:"#location-section"})]})]}),(0,n.jsxs)("div",{className:"relative hidden items-center gap-3 sm:flex",children:[(0,n.jsxs)(Q.Z,{onClick:()=>{navigator.clipboard.writeText(window.location.href)},className:"rounded-lg p-1",children:[(0,n.jsx)(N.Hs8,{}),(0,n.jsx)(z.Z,{text:"Link copied!",children:(0,n.jsx)("p",{className:"underline",children:"Share"})})]}),(0,n.jsxs)(Q.Z,{className:"rounded-lg p-1",children:[(0,n.jsx)(N.Zwb,{className:"shrink-0"}),(0,n.jsx)(z.Z,{text:"Save feature comming soon!",children:(0,n.jsx)("p",{className:"underline",children:"Save"})})]})]})]})]}):null},(0,n.jsxs)("div",{className:"flex h-[68px] flex-col gap-2",children:[(0,n.jsx)("div",{className:"h-2/3 w-1/4 rounded-xl bg-gray-100"}),(0,n.jsx)("div",{className:"h-1/3 w-full rounded-xl bg-gray-100"})]})),H=s(59871),V=s(23171),B=e=>{let{amenity:t,size:s,className:l}=e;return(0,n.jsxs)("div",{className:"flex min-w-0 items-center gap-2 ".concat(l),children:[(0,n.jsx)("div",{className:"relative h-8 w-8 op
20acity-60",children:(0,n.jsx)(V.Z,{fromSupabase:!0,isSvg:!0,src:t.icon,alt:t.name,sizes:H.Q7,fill:!0})}),(0,n.jsx)("p",{className:"truncate text-sm font-medium text-mydarkgray",children:t.name})]})},Y=e=>{let{text:t,className:s,...l}=e;return(0,n.jsx)("button",{...l,className:"hover:text-gray-600 text-black font-semibold cursor-pointer ".concat(s),children:(0,n.jsxs)("span",{className:"flex items-center gap-0.5 hover:gap-1 transition-all",children:[(0,n.jsx)("p",{className:"underline",children:t}),(0,n.jsx)(N.mzm,{className:"mt-1",size:15})]})})},X=s(31850),W=(0,v.Z)(e=>{let{className:t,data:s}=e,{push:l,clear:a}=(0,E.dd)({"camp-info":e=>{let{hostName:t,hostImage:s,plots:l,sanitaries:a,restaurants:r,description:o,amenities:c}=e;return(0,n.jsxs)("div",{className:"flex w-full flex-col gap-4",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("p",{className:"text-md font-bold",children:t}),(0,n.jsx)("p",{className:"text-sm",children:"".concat(l," plots • ").concat(a," sanitaries • ").concat(r," restaurant")})]}),(0,n.jsx)(g.Z,{className:"h-8 w-8",image:s,url:"/"})]}),(0,n.jsx)(h.Z,{className:"my-6 hidden sm:block md:my-3"}),(0,n.jsx)("p",{className:"mt-6 text-justify text-sm leading-snug sm:mt-0",children:o}),(0,n.jsx)(h.Z,{className:"my-3 hidden md:block"}),(0,n.jsx)("div",{className:"mt-6 grid h-full grid-flow-col grid-rows-3 flex-wrap place-content-evenly items-center gap-2 sm:flex sm:justify-between md:mt-0 md:grid md:justify-evenly",children:c.map(e=>(0,n.jsx)(B,{className:"flex",amenity:e,size:(0,X.w6)(700,1200,18,25,i)},e.id))})]})}}),[i,r]=(0,j.useState)(0);return((0,j.useEffect)(()=>{let e=()=>{r(window.innerWidth)};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[]),s)?(0,n.jsxs)("div",{className:"flex w-full flex-col ".concat(t),children:[(0,n.jsxs)("div",{className:"flex items-center justify-between",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("p",{className:"text-md font-bold",children:s.hostName}),(0,n.jsx)("p",{className:"text-sm",children:"".concat(s.plots," plots • ").concat(s.sanitaries," sanitaries • ").concat(s.restaurants," restaurant")})]}),(0,n.jsx)(g.Z,{className:"h-8 w-8",image:s.hostImage,url:"/"})]}),(0,n.jsx)(h.Z,{className:"my-6 hidden sm:block md:my-3"}),(0,n.jsxs)("p",{className:"relative mt-6 text-justify text-sm leading-[1.6] sm:mt-0",children:[(0,L.$G)(s.description,400),(0,n.jsx)("span",{className:"absolute bottom-0 right-0 bg-gradient-to-r from-transparent via-white to-white pl-16",children:(0,n.jsx)(Y,{text:"More",onClick:()=>l({id:"camp-info",title:"Camp Info",props:{...s}})})})]}),(0,n.jsx)(h.Z,{className:"my-3 hidden md:block"}),(0,n.jsx)("div",{className:"mt-6 grid h-full grid-flow-col grid-rows-3 flex-wrap place-content-evenly items-center gap-2 sm:flex sm:justify-between md:mt-0 md:grid md:justify-evenly",children:s.amenities.map(e=>(0,n.jsx)(B,{className:"flex",amenity:e,size:(0,X.w6)(700,1200,18,25,i)},e.id))})]}):null},(0,n.jsx)("div",{className:"mt-4 h-80  px-6 sm:mt-6 sm:px-0 md:mt-0 md:h-96 md:w-1/3 md:pl-6",children:(0,n.jsxs)("div",{className:"flex h-full flex-col justify-between gap-4",children:[(0,n.jsxs)("div",{className:"flex h-36 w-full items-center justify-between",children:[(0,n.jsxs)("div",{className:"flex h-full grow flex-col gap-2 ",children:[(0,n.jsx)("div",{className:"h-2/3 w-2/3 rounded-xl bg-gray-100"}),(0,n.jsx)("div",{className:"h-1/3 w-5/6 rounded-xl bg-gray-100"})]}),(0,n.jsx)("div",{className:"h-8 w-8 rounded-full bg-gray-100"})]}),(0,n.jsx)("div",{className:"h-full w-full rounded-xl bg-gray-100"}),(0,n.jsx)("div",{className:"h-full w-full rounded-xl bg-gray-100"})]})})),$=s(46352),K=s(63416);let J=e=>{let{image:t,onClick:s,className:l,priority:a=!1}=e;return(0,n.jsx)("div",{className:"relative cursor-pointer overflow-hidden ".concat(l),onClick:s,children:(0,n.jsx)(V.Z,{className:"duration-300 hover:opacity-70",priority:a,src:t,alt:"Camp",fromSupabase:!0,fill:!0,sizes:H.Q7,style:{objectFit:"cover"}})})};var ee=(0,v.Z)(e=>{let{images:t,className:s,...l}
20=e,[a,i]=(0,j.useState)(!1),r=()=>{i(!0)};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(K.Z,{images:t,isOpen:a,onClose:()=>i(!1)}),(0,n.jsxs)("div",{...l,className:"grid grid-flow-col grid-cols-4 grid-rows-2 gap-2 md:grid-cols-3 ".concat(s),children:[(0,n.jsx)(J,{className:"col-span-2 row-span-2 rounded-l-xl",image:t[0],priority:!0,onClick:r}),(0,n.jsx)(J,{image:t[1],onClick:r}),(0,n.jsx)(J,{image:t[2],onClick:r}),(0,n.jsx)(J,{className:"rounded-tr-xl md:hidden",image:t[3],onClick:r}),(0,n.jsx)(J,{className:"rounded-br-xl md:hidden",image:t[4],onClick:r})]})]})},(0,n.jsxs)("div",{className:"grid h-80 w-full grid-flow-col grid-cols-4 grid-rows-2 gap-2 md:h-96 md:w-2/3 md:grid-cols-3",children:[(0,n.jsx)("div",{className:"col-span-2 row-span-2 rounded-xl rounded-l-xl bg-gray-100"}),(0,n.jsx)("div",{className:"rounded-xl bg-gray-100"}),(0,n.jsx)("div",{className:"rounded-xl bg-gray-100"}),(0,n.jsx)("div",{className:"rounded-tr-xl bg-gray-100 md:hidden"}),(0,n.jsx)("div",{className:"rounded-br-xl bg-gray-100 md:hidden"})]}));let et=e=>{let{title:t,subtitle:s,children:l,className:a,...i}=e,{push:r,clear:o}=(0,E.dd)({"important-info":e=>{let{children:t}=e;return(0,n.jsx)("div",{className:"mt-3 flex w-[400px] flex-col gap-2",children:t})}});return(0,n.jsxs)("div",{...i,className:a,children:[(0,n.jsxs)("button",{className:"w-full sm:hidden",children:[(0,n.jsx)(h.Z,{className:"my-6"}),(0,n.jsxs)("div",{className:"flex items-center justify-between",children:[(0,n.jsxs)("div",{className:"flex flex-col items-start text-start",children:[(0,n.jsx)("p",{className:"text-xl font-semibold",children:t}),(0,n.jsx)("p",{className:"mt-2 text-sm text-gray-600",children:s})]}),(0,n.jsx)(N.mzm,{size:23,className:"ml-5 text-gray-500"})]})]}),(0,n.jsxs)("div",{className:"hidden sm:block",children:[(0,n.jsx)("p",{className:"font-semibold",children:t}),(0,n.jsx)("div",{className:"mt-3 flex flex-col gap-2",children:l}),(0,n.jsx)(Y,{className:"mt-4",text:"Show more",onClick:()=>r({id:"important-info",title:t,props:{children:l}})})]})]})},es=e=>{let{icon:t,text:s}=e;return(0,n.jsxs)("div",{className:"flex items-center gap-4",children:[t&&j.createElement(t,{size:20}),(0,n.jsx)("p",{children:s})]})};var el=(0,v.Z)(e=>{let{data:t}=e,{push:s,clear:l}=(0,E.dd)({"location-info":e=>{let{region:t,country:s,description:l}=e;return(0,n.jsxs)("div",{className:"m-4",children:[(0,n.jsxs)("p",{className:"font-semibold",children:[t,", ",s]}),(0,n.jsx)("p",{className:"mt-4",children:l})]})}});return t?(0,n.jsxs)("div",{className:"mt-4 h-32",children:[(0,n.jsxs)("p",{className:"font-semibold",children:[t.region,", ",t.country]}),(0,n.jsx)("p",{className:"mt-4",children:t.description.length>300?t.description.slice(0,300)+"...":t.description}),(0,n.jsx)(Y,{className:"mt-4",text:"Show more",onClick:()=>s({id:"location-info",title:t.campName?"Location of ".concat(t.campName):"Location",props:{region:t.region,country:t.country,description:t.description}})})]}):null},(0,n.jsxs)("div",{className:"mt-4 flex h-44 flex-col gap-4",children:[(0,n.jsx)("div",{className:"h-1/6 w-1/4 rounded-xl bg-gray-100"}),(0,n.jsx)("div",{className:"h-4/6 w-full rounded-xl bg-gray-100"}),(0,n.jsx)("div",{className:"h-1/6 w-full rounded-xl bg-gray-100"})]})),ea=e=>{let{text:t,className:s,...l}=e;return(0,n.jsx)("button",{...l,className:"hover:text-black hover:border-black text-gray-400 border border-gray-400 rounded-xl py-2 px-3 cursor-pointer transition-all ".concat(s),children:(0,n.jsx)("p",{className:"",children:t})})},ei=e=>{let{category:t,rating:s,...l}=e;return(0,n.jsx)("div",{...l,children:(0,n.jsxs)("div",{className:"flex w-full items-center justify-between",children:[(0,n.jsx)("p",{className:"mr-1 w-1/3 truncate text-sm",children:t}),(0,n.jsxs)("div",{className:"flex shrink grow items-center gap-2",children:[(0,n.jsx)("div",{className:"w-full rounded-full bg-gray-200",children:(0,n.jsx)("div",{style:{width:"".concat(s/5*100,"%")},className:"h-2 rounded-full bg-gray-700"})}),(0,n.jsx)("p",{className:"text-xs",children:s})]})]})})},en=e=>{let{userName:t,userImage:s,publishedDate:l,plotId:a,plotNumber:i,text:r,className:o,...c}=e;return(0,n.jsxs)("div",{...c,className:o,children:[(0,n.jsxs)("div",{className:"flex justify-between",children:[(0,n.jsxs)("div",{className:"flex items-center gap-3",children:[(0,n.jsx)(g.Z,{className:"h-8 w-8",image:s,url:"/"}),(0,n.jsxs)("div",{children:[(0,n.jsx)("p",{className:"text-sm font-semibold",children:t}),(0,n.jsx)("p",{className:"text-xs",children:l.toLocaleDateString()})]})]}),(0,n.jsx)("div",{className:"flex items-center rounded-xl bg-gray-100 py-1 px-3",children:(0,n.jsx)("p",{className:"text-xs font-medium",children:"Plot ".concat(i)})})]}),(0,n.jsx)("p",{className:"mt-3 text-base",children:r})]})};let er=e=>{let{campName:t,rating:s,reviews:l,className:a,...i}=e,{push:r,clear:o}=(0,E.dd)({reviews:e=>{let{reviews:t,rating:s}=e;return(0,n.jsx)("div",{className:"flex flex-col gap-10",children:c(t)})}}),c=e=>null==e?void 0:e.map((e,t)=>(0,n.jsx)("div",{className:"w-4/5 shrink-0 snap-start scroll-mx-5 rounded-xl border p-4 sm:w-full sm:border-none sm:p-0",children:(0,n.jsx)(en,{className:"text-lg",userName:e.userName,userImage:e.userImage,publishedDate:e.publishedDate,plotId:e.plotId,plotNumber:e.plotNumber,text:e.comment})},e.id));return(0,n.jsxs)("div",{...i,children:[(0,n.jsxs)("div",{className:"mx-5 flex items-center gap-2 sm:mx-0 sm:mt-5",children:[(0,n.jsxs)("div",{className:"flex items-center",children:[(0,n.jsx)(N.naV,{}),(0,n.jsx)("p",{className:"ml-2 text-lg font-semibold",children:s})]}),(0,n.jsx)("p",{children:"•"}),(0,n.jsx)("p",{className:"text-lg font-semibold",children:"".concat(null==l?void 0:l.length," reviews")})]}),(0,n.jsxs)("div",{className:"flex flex-col-reverse sm:h-[28.5rem] sm:flex-row",children:[(0,n.jsxs)("div",{className:"relative overflow-hidden sm:w-7/12 md:w-2/3",children:[(0,n.jsxs)("div",{className:"no-scrollbar relative flex touch-pan-x snap-x snap-mandatory gap-5 overflow-auto scroll-smooth sm:flex-col sm:gap-10",children:[(0,n.jsx)("div",{className:"shrink-0 snap-start scroll-mx-5"}),(0,n.jsx)("div",{className:"flex flex-col gap-10",children:l&&c(l)}),(0,n.jsx)("div",{className:"shrink-0 snap-start scroll-mx-5"})]}),(0,n.jsx)("div",{className:"invisible absolute top-3/4 right-0 left-0 bottom-0 bg-gradient-to-b from-transparent to-mybgwhite sm:visible"})]}),(0,n.jsx)("div",{className:"relative mt-14 p-5 sm:ml-6 sm:h-full sm:w-1/3 sm:pl-4 sm:pr-2",children:(0,n.jsxs)("div",{className:"sticky top-[30rem] flex flex-col gap-4",children:[(0,n.jsx)(ei,{category:"Location",rating:4.5}
20),(0,n.jsx)(ei,{category:"Hospitality",rating:4.9}),(0,n.jsx)(ei,{category:"Cleanliness",rating:4.8})]})})]}),(0,n.jsx)("div",{className:"p-5 sm:p-0",children:(0,n.jsx)(ea,{className:"w-full sm:w-auto",onClick:()=>r({id:"reviews",title:t?"Reviews of ".concat(t):"Reviews",props:{reviews:l,rating:s}}),text:"Show all reviews (".concat(null==l?void 0:l.length,")")})})]})};var eo=(0,v.Z)(er,(0,n.jsxs)("div",{className:"flex h-[44px] flex-col gap-2",children:[(0,n.jsx)("div",{className:"h-[24px] w-1/4 rounded-xl bg-gray-100"}),(null===(a=er.defaultProps)||void 0===a?void 0:a.reviews)&&(null===(i=er.defaultProps)||void 0===i?void 0:i.reviews.map((e,t)=>(0,n.jsx)("div",{className:"h-[10px] w-1/3 rounded-xl bg-gray-100"},e.id)))]})),ec=s(777);let ed=()=>{let e=(0,j.useContext)(ec.d);if(!e)throw Error("useAmenities must be used within a AmenitiesProvider");return e};var eu=s(5076),em=s(12835),ex=s(88767),eh=s(96754),ep=s(48888);class ef{static toReview(e){var t,s;return{id:e.id,plotId:e.plot.id,rating:e.rating,comment:e.comment,plotNumber:e.plot.number,userName:null!==(t=e.username)&&void 0!==t?t:"Anonymous User",userImage:null!==(s=e.user_profile_image)&&void 0!==s?s:ep.yo,publishedDate:new Date(e.created_at)}}}async function eg(e,t){let{data:s,error:l}=await e.from("view_reviews").select("*, plot:plots(*)").eq("camp_id",t).returns();if(l)throw(0,eh.I)(l);return s.map(ef.toReview)}var ev=s(96656),ej=s(16434),eb=s(94378),ey=e=>{let[t,s]=(0,j.useState)(Array(e.length).fill(!1));return(0,j.useEffect)(()=>{let l=()=>{let l=window.pageYOffset,a=Array(e.length).fill(!1);e.forEach((e,t)=>{let{start:s,end:i}=e;a[t]=l>=(null!=s?s:0)&&l<=(null!=i?i:1/0)}),!function(e,t){if(e.length!==t.length)return!1;let s=e.every(e=>t.includes(e)),l=t.every(t=>e.includes(t));return l&&s}(t,a)&&s(a)};return window.addEventListener("scroll",l),()=>{window.removeEventListener("scroll",l)}},[e]),t},ew=s(77349),eN=s(5152),e_=s.n(eN),ek=s(80471),eC=s(89583);let eS=e_()(()=>Promise.all([s.e(9774),s.e(9269),s.e(4586),s.e(3819)]).then(s.bind(s,10261)),{loadableGenerated:{webpack:()=>[10261]},ssr:!1,loading:()=>(0,n.jsx)("div",{className:"h-full w-full rounded-xl bg-gray-100"})}),eZ=e_()(()=>Promise.all([s.e(9269),s.e(4805),s.e(1171)]).then(s.bind(s,68159)),{loadableGenerated:{webpack:()=>[68159]},ssr:!1,loading:()=>(0,n.jsx)("div",{className:"h-full w-full rounded-xl bg-gray-100"})}),ez=()=>{var e,t,s,l,a,i,r,o,c,d,u,v,b,_,k,C,S,Z,z,I;let L=(0,T.useRouter)(),[E,D]=(0,M.Z)(),{data:O,error:A}=(0,eu.U0)(E.camp_id),{data:G}=(0,em.es)(E.camp_id),{data:Q}=(0,em.kw)(E.camp_id,E.check_in,E.check_out),{amenities:H,refreshAmenities:V}=ed(),{data:B,error:Y}=function(e){let t=["camps",e,"reviews"],s=(0,F.useSupabaseClient)();return(0,ex.useQuery)(t,async()=>eg(s,e),{enabled:!!e})}(E.camp_id),[X,K]=(0,j.useState)(),[J,ea]=(0,j.useState)(),[ei,en]=(0,j.useState)(!1),er=(0,j.useRef)(null),ec=(0,j.useMemo)(()=>{let e=null==G?void 0:G.find(e=>e.id===Number(null==E?void 0:E.plot_id));return e&&window.scrollY>500&&window.scrollTo({top:400,behavior:"smooth"}),e},[G,null==E?void 0:E.plot_id]);(0,j.useEffect)(()=>{if(E.check_in&&E.check_out)K(E.check_in),ea(E.check_out);else{let e=(0,ew.default)(new Date,1),t=(0,ew.default)(e,6);D({check_in:e,check_out:t})}},[E.check_in,E.check_out,L.isReady,D]);let[eh,ep]=ey([{start:800,end:1400},{start:1850}]);return(A&&L.push("/404"),A||Y)?(0,n.jsx)(p.Z,{error:A||Y}):(0,n.jsxs)("div",{className:"flex flex-col gap-y-2",children:[(0,n.jsxs)(m,{shown:ep,children:[(0,n.jsx)(x,{text:"Photos",href:"#photos-section"}),(0,n.jsx)(x,{text:"Camp Map",href:"#map-section"}),(0,n.jsx)(x,{text:"Reviews",href:"#reviews-section"}),(0,n.jsx)(x,{text:"Location",href:"#location-section"})]}),(0,n.jsxs)("section",{children:[(0,n.jsx)("div",{id:"photos-section",className:"absolute -mt-24"}),(0,n.jsx)($.Z,{className:"h-64 sm:hidden",images:null!==(d=null==O?void 0:O.images)&&void 0!==d?d:[]}),(0,n.jsx)(U,{className:"mt-4 px-6 sm:px-0 md:mt-0",isLoading:!O,data:O&&{title:O.name,rating:null!==(u=O.rating)&&void 0!==u?u:0,reviews:null!==(v=null==B?void 0:B.length)&&void 0!==v?v:0,country:null===(e=O.location)||void 0===e?void 0:e.country,region:null===(t=O.location)||void 0===t?void 0:t.regi
20on}}),(0,n.jsxs)("div",{className:"mt-4 flex flex-col items-stretch md:flex-row",children:[(0,n.jsx)(ee,{className:"hidden h-80 w-full sm:grid md:h-96 md:w-2/3",isLoading:!O,images:null!==(b=null==O?void 0:O.images)&&void 0!==b?b:[]}),(0,n.jsx)(W,{className:"mt-4 px-6 sm:mt-6 sm:px-0 md:mt-0 md:w-1/3 md:pl-6",isLoading:!O,data:O&&{hostName:null!==(_=O.owner.username)&&void 0!==_?_:"Host",hostImage:O.owner.image,plots:null!==(k=null==G?void 0:G.length)&&void 0!==k?k:0,sanitaries:2,restaurants:1,description:O.description,amenities:H.filter(e=>{var t;return null===(t=O.amenities)||void 0===t?void 0:t.includes(e.id)})}})]})]}),(0,n.jsx)(h.Z,{className:"mx-5 my-6 sm:mx-0 md:hidden"}),(0,n.jsxs)("div",{className:"relative flex flex-col gap-y-2",children:[(0,n.jsxs)("section",{className:"flex px-6 sm:px-0 md:mt-4",children:[(0,n.jsx)("div",{id:"date-picker-section",className:"absolute -mt-24"}),(0,n.jsxs)("div",{className:"w-full sm:w-7/12 md:w-2/3",children:[X&&J&&(0,n.jsx)(y,{className:"mb-4",isLoading:!O,title:O&&"".concat((0,P.Dx)(X,J)," nights in ").concat(O.name),subtitle:X&&J&&"".concat((0,P.b7)(X)," - ").concat((0,P.b7)(J))}),(0,n.jsx)(q.Z,{isLoading:!O,initialRange:X&&J&&{from:X,to:J},onChange:(e,t)=>
20D({check_in:e,check_out:t})})]}),(0,n.jsx)("div",{className:"absolute bottom-[8.5rem] right-0 top-4 hidden w-5/12 shrink-0 pl-6 sm:block md:w-1/3",children:(0,n.jsx)(R,{selectedPlot:ec,isCollapsed:eh,price:(0,eb.G)(null==O?void 0:null===(s=O.campSettings)||void 0===s?void 0:s.default_adult_price,null==O?void 0:null===(l=O.campSettings)||void 0===l?void 0:l.default_plot_price,null!==(C=E.adults)&&void 0!==C?C:1),rating:null!==(S=null==O?void 0:O.rating)&&void 0!==S?S:0,startDate:X,endDate:J,bookSettings:O&&O.campSettings&&{infantsAgeLimit:null!==(Z=null==O?void 0:null===(a=O.campSettings)||void 0===a?void 0:a.infants_age_limit)&&void 0!==Z?Z:2,childrenAgeLimit:null==O?void 0:null===(i=O.campSettings)||void 0===i?void 0:i.children_age_limit,isInquiryOnly:(null==O?void 0:null===(r=O.campSettings)||void 0===r?void 0:r.listing_type)==="inquiry_required"}})})]}),(0,n.jsxs)("section",{className:"mt-4 sm:mt-8 md:mt-4",children:[(0,n.jsx)("div",{id:"map-section",className:"absolute -mt-2"}),(0,n.jsx)(y,{className:"mb-3 px-6 sm:px-0",title:ec?"Plot ".concat(ec.plotNumber):"Camp Map",subtitle:ec?"Your selected plot is ready to be booked":"Select a plot to book"}),(0,n.jsx)(f.Z,{onFullscreenChange:e=>en(e),ref:er,children:(0,n.jsx)("div",{className:"aspect-video w-full",children:(0,n.jsx)(eS,{className:"sm:rounded-xl",isLoading:!O,scrollWheelZoom:ei,data:E&&O&&G&&{campId:O.id,campMapURL:(0,ev.Z)({src:O.mapImage}),plots:G,availablePlots:null!=Q?Q:[]},selectedPlotId:Number(null==E?void 0:E.plot_id),onPlotSelected:e=>{var t;null===(t=er.current)||void 0===t||t.handleFullscreen(!1),D({plot_id:e})}})})})]}),(0,n.jsxs)("section",{className:"relative w-full pt-4",children:[(0,n.jsx)("div",{id:"reviews-section",className:"absolute -mt-12"}),(0,n.jsx)(eo,{campName:null==O?void 0:O.name,rating:null==O?void 0:O.rating,reviews:B})]})]}),(0,n.jsx)(h.Z,{className:"mx-5 my-6 sm:mx-0"}),(0,n.jsxs)("section",{className:"w-full px-6 sm:px-0",children:[(0,n.jsx)("div",{id:"location-section",className:"absolute -mt-24"}),(0,n.jsx)(y,{isLoading:!O,className:"mb-3",title:O&&"Where is ".concat(O.name," located")}),(0,n.jsx)("div",{className:"h-56 w-full sm:h-[28rem]",children:(0,n.jsx)(eZ,{isLoading:!O,data:(null==O?void 0:O.location)&&{lat:O.location.coordinates.lat,lng:O.location.coordinates.lng,name:O.name}})}),(0,n.jsx)(el,{isLoading:!O,data:(null==O?void 0:O.location)&&{campName:O.name,region:O.location.region,country:O.location.country,description:O.location.description}})]}),(0,n.jsx)(h.Z,{className:"my-6 hidden sm:flex"}),(0,n.jsxs)("section",{id:"info-section",className:"w-full px-6 sm:px-0",children:[(0,n.jsx)(y,{className:"mb-3 hidden sm:flex",title:"Important information"}),(0,n.jsxs)("div",{className:"sm:grid sm:grid-cols-2 sm:gap-8",children:[(0,n.jsxs)(et,{title:"Camp rules",children:[(0,n.jsx)(es,{icon:N.EuD,text:"Check-in: ".concat((0,ej.j5)(null!==(z=null==O?void 0:null===(o=O.campSettings)||void 0===o?void 0:o.checkInTimes)&&void 0!==z?z:[]))}),(0,n.jsx)(es,{icon:N.EuD,text:"Check-out: ".concat((0,ej.j5)(null!==(I=null==O?void 0:null===(c=O.campSettings)||void 0===c?void 0:c.checkOutTimes)&&void 0!==I?I:[]))}),(0,n.jsx)(es,{icon:N.O7s,text:"Open fire cooking is forbidden"}),(0,n.jsx)(es,{icon:N.HUw,text:"Don't disturb with loud music"}),(0,n.jsx)(es,{icon:N.nfT,text:"Be mindful of others"})]}),(0,n.jsxs)(et,{title:"Health & Safety",subtitle:"Your health and safety is our utmost priority. Here are some of the measures we've put in place:",children:[(0,n.jsx)(es,{icon:N.DUg,text:"Defibrillator stations are available inside the camp."}),(0,n.jsx)(es,{icon:eC.Ybg,text:"Fire extinguishers are placed throughout the camp."}),(0,n.jsx)(es,{icon:eC.FZx,text:"First aid kits are readily available in case of emergencies."}),(0,n.jsx)(es,{icon:eC.bri,text:"Safety and evacuation procedures are clearly displayed in all accommodations and common areas."})]})]})]}),(0,n.jsx)(h.Z,{className:"mx-5 my-6 sm:mx-0"}),(0,n.jsx)(w.Z,{data:O,skeleton:(0,n.jsx)("div",{className:"h-[300px] w-full rounded-xl bg-gray-100"}),render:e=>(0,n.jsx)("section",{id:"contact-section",className:"w-full px-6 py-4 sm:px-0",children:(0,n.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-4",children:[(0,n.jsxs)("div",{className:"flex shrink-0 gap-4",children:[(0,n.jsx)(g.Z,{className:"h-14 w-14",image:null==e?void 0:e.owner.image,url:"localhost:3000/camp?id=1"}),(0,n.jsx)(y,{className:"mb-3",title:e.name,subtitle:"Joined in Aug 2023"})]}),(0,n.jsxs)("div",{className:"flex flex-wrap justify-center gap-8",children:[e.website&&(0,n.jsxs)("span",{className:"flex items-center gap-4",children:[(0,n.jsx)(ek.$Wy,{size:25}),(0,n.jsx)("a",{target:"_blank",rel:"noopener noreferrer",href:e.website.startsWith("http://")||e.website.startsWith("https://")?e.website:"http://".concat(e.website),children:e.website})]}),e.phone&&(0,n.jsxs)("span",{className:"flex items-center gap-4",children:[(0,n.jsx)(N.T1V,{size:25}),(0,n.jsx)("a",{href:"tel:".concat(e.phone),children:"".concat(e.phone)})]}),e.email&&(0,n.jsxs)("span",{className:"flex items-center gap-4",children:[(0,n.jsx)(N.WNJ,{size:25}),(0,n.jsx)("a",{href:"mailto:".concat(e.email),children:e.email})]})]}),(0,n.jsxs)("div",{className:"flex items-end gap-4",children:[e.facebook&&(0,n.jsx)("a",{target:"_blank",rel:"noopener noreferrer",href:"https://www.facebook.com/".concat(e.facebook),children:(0,n.jsx)("div",{children:(0,n.jsx)(N.egd,{size:30})})}),e.instagram&&(0,n.jsx)("a",{target:"_blank",rel:"noopener noreferrer",href:"https://www.instagram.com/".concat(e.instagram),children:(0,n.jsx)("div",{children:(0,n.jsx)(N.oVe,{size:30})})})]})]})})})]})};var eI=ez;ez.getLayout=e=>{let t=(0,n.jsx)(c.Z,{className:"hidden sm:block",searchType:"find"}),s=(0,n.jsx)(o.ZP,{});
20return(0,n.jsx)(r.Z,{header:t,footer:s,children:e})}},5152:function(e,t,s){e.exports=s(95677)}},function(e){e.O(0,[1228,2013,5445,4885,3777,4980,1778,955,1664,4010,8695,2773,4386,4441,692,2869,9774,2888,179],function(){return e(e.s=44137)}),_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.