1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1362],{75173:()=>{},81362:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>p,markerIdentity:()=>m});var i=a(95155),s=a(12115),l=a(37206);a(75173);var o=a(73321),r=a(29480),n=a(50754),d=a(14606),c=a(90030),u=a(69856);let m=e=>e?.id??e?.google_id,b=(0,l.default)(()=>a.e(3368).then(a.bind(a,13368)).then(e=>e.default),{loadableGenerated:{webpack:()=>[13368]},ssr:!1}),g=(0,l.default)(()=>a.e(3368).then(a.bind(a,13368)).then(e=>e.Marker),{loadableGenerated:{webpack:()=>[13368]},ssr:!1}),f=["pk.eyJ1IjoibWl0cmFrbXQiLCJhIjoiY2w0aGJhcm53MGxmcDNjcXE0M2tiM2FhYiJ9.Oe_mYtH7_C83gdp3hvQ_LA","pk.eyJ1IjoibWljaGFlbG1pdHJha29zIiwiYSI6ImNsNGptdWM0NDEzdmozbXJ5cDhjamx0aHQifQ.BDaCRULxhnj_wmWTNCWeBg","pk.eyJ1IjoibWljaGFlbGxpdmVseSIsImEiOiJjbDRqbXlrdGIwdGl0M2Jta2o3aTMyOHBrIn0.vseN6txLz0dQsfLUzRDTig","pk.eyJ1IjoiZHJld2JveGJyYW5kaW5nIiwiYSI6ImNsNGpuN2RyMTEzejIzbXJ5bmtnZ25yZ2sifQ.S5QanSxrqyDvCb_D8u_TPg"];function p({coordinates:e,places:t=[]}){let{user:a}=(0,r.A)(),l=(0,o.useRouter)(),[x,h]=(0,s.use
1State)(null),[y]=(0,s.useState)(Math.floor(4*Math.random())+0),[v,k]=(0,s.useState)(!1),[w,j]=(0,s.useState)([]);(0,s.useEffect)(()=>{x&&(w?.find(e=>e.google_id===x.google_id)?k(!0):k(!1))},[x]);let N=(0,s.useCallback)(()=>{h(null)},[h]),C=(0,s.useCallback)(()=>{window.open(`https://www.google.com/maps/place/?q=place_id:${x.google_id}`,"_blank")},[x]),_=(0,s.useCallback)(()=>{a?.premium?(k(!0),j([...w,{google_id:x.google_id,name:x.name,tags:x.tags,note:x.note,city:x.city.id,cityName:x.city.name,countryName:x.city.country_name,latitude:x.latitude,longitude:x.longitude,address:x.address}])):l.push((0,u.et)({plan:"pro",priceType:"monthly",source:"places-map",returnTo:window.location.pathname+window.location.search}))},[a,l,x,w,k,j]),I=(0,s.useCallback)(()=>{j(w.filter(e=>e.google_id!==x.google_id)),k(!1)},[x,w,j,k]),J=f[y];return J?(0,i.jsxs)("div",{className:"w-full h-[600px] rounded-lg overflow-hidden",children:[(0,i.jsx)(b,{initialViewState:{latitude:e[1],longitude:e[0],zoom:12.5},minZoom:8.5,attributionControl:!1,renderWorldCopies:!0,style:{width:"100%",height:"100%"},mapboxAccessToken:J,mapStyle:"mapbox://styles/mapbox/light-v11",children:t?.map(e=>{let t=!!(x&&m(e)===m(x));return(0,i.jsx)(g,{longitude:e.longitude,latitude:e.latitude,offsetLeft:-20,offsetTop:-10,color:t?"#e40226":void 0,style:{cursor:"pointer"},onClick:()=>h(e)},`places_map-${m(e)}-${t?"on":"off"}`)})}),(0,i.jsxs)(n.Dialog,{open:!!x,onClose:N,className:"relative z-10",children:[(0,i.jsx)(n.DialogBackdrop,{transition:!0,className:"fixed inset-0 bg-gray-500/75 transition-opacity duration-500 ease-in-out data-[closed]:opacity-0 dark:bg-gray-900/50"}),(0,i.jsx)("div",{className:"fixed inset-0 overflow-hidden",children:(0,i.jsx)("div",{className:"absolute inset-0 overflow-hidden",children:(0,i.jsx)("div",{className:"pointer-events-none fixed inset-y-0 right-0 flex max-w-full pl-10 sm:pl-16",children:(0,i.jsxs)(n.DialogPanel,{transition:!0,className:"pointer-events-auto relative w-96 transform transition duration-500 ease-in-out data-[closed]:translate-x-full sm:duration-700",children:[(0,i.jsx)(d.TransitionChild,{children:(0,i.jsx)("div",{className:"absolute left-0 top-0 -ml-8 flex pr-2 pt-4 duration-500 ease-in-out data-[closed]:opacity-0 sm:-ml-10 sm:pr-4",children:(0,i.jsxs)("button",{type:"button",onClick:N,className:"relative rounded-md text-gray-300 hover:text-white focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600 dark:text-gray-400 dark:hover:text-white dark:focus-visible:outline-indigo-500",children:[(0,i.jsx)("span",{className:"absolute -inset-2.5"}),(0,i.jsx)("span",{className:"sr-only",children:"Close panel"}),(0,i.jsx)(c.A,{"aria-hidden":"true",className:"h-6 w-6"})]})})}),(0,i.jsx)("div",{className:"relative h-full overflow-y-auto bg-white p-8 dark:bg-gray-800 dark:after:absolute dark:after:inset-y-0 dark:after:left-0 dark:after:w-px dark:after:bg-white/10",children:x&&(0,i.jsxs)("div",{className:"space-y-6 pb-16",children:[(0,i.jsxs)("div",{className:"text-center",children:[(0,i.jsx)("h2",{className:"text-base font-semibold text-gray-900 dark:text-white",children:x.name}),(0,i.jsx)("p",{className:"mt-2 text-sm text-gray-500 dark:text-gray-400",children:x.address||"No address"})]}),x.tags?.length>0&&(0,i.jsx)("div",{className:"flex flex-wrap items-center justify-center",children:x.tags.map(e=>(0,i.jsx)("span",{className:"bg-primary-100 mr-1 mb-1 text-primary-800 text-xs font-medium px-2.5 py-0.5 rounded dark:bg-primary-900 dark:text-primary-300",children:e},`placeCard-tags-${x.id}-${e}`))}),x.note&&(0,i.jsx)("p",{className:"text-sm text-gray-700 dark:text-gray-200",children:x.note}),(0,i.jsxs)("div",{className:"flex flex-col sm:flex-row sm:space-x-3",children:[v?(0,i.jsx)("button",{type:"button",onClick:I,className:"mb-2 sm:mb-0 flex-1 rounded-md border border-gray-300 bg-white px-3 py-2 text-sm font-semibold text-gray-900 shadow-sm hover:bg-gray-50 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600 dark:bg-gray-800 dark:text-white dark:border-gray-600 dark:hover:bg-gray-700 dark:focus-visible:outline-indigo-500",children:"Remove from list"}):(0,i.jsx)("button",{type:"button",onClick:_,className:"mb-2 sm:mb-0 flex-1 rounded-md bg-primary-700 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-primary-800 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-700 dark:bg-primary-600 dark:hover:bg-primary-700 dark:focus-visible:outline-primary-600",children:'Add to "Want to Try"'}),(0,i.jsx)("button",{type:"button",onClick:C,className:"flex-1 rounded-md border border-gray-300 bg-white px-3 py-2 text-sm font-semibold text-gray-900 shadow-sm hover:bg-gray-50 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600 dark:bg-gray-800 dark:text-white dark:border-gray-600 dark:hover:bg-gray-700 dark:focus-visible:outline-indigo-500",children:"View on Google"})]})]})})]})})})})]})]}):(0,i.jsx)("div",{className:"flex h-[600px] w-full items-center justify-center rounded-lg bg-gray-200 text-gray-700",children:"Map unavailable"})}},90030:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});var i=a(12115);let s=i.forwardRef(function({title:e,titleId:t,...a},s){return i.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","data-slot":"icon",ref:s,"aria-labelledby":t},a),e?i.createElement("title",{id:t},e):null,i.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18
118 6M6 6l12 12"}))})}}]);
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.