1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[973],{3354:(e,t,r)=>{"use strict";r.r(t),r.d(t,{DestinationMap:()=>c});var n=r(5155),a=r(5379),l=r(2115);r(5603),r(8670),r(6031);let i={light:"https://{s}.basemaps.cartocdn.com/rastertiles/voyager/{z}/{x}/{y}{r}.png",dark:"https://{s}.basemaps.cartocdn.com/rastertiles/dark_all/{z}/{x}/{y}{r}.png"},o={direction:"top",opacity:.95,className:"leaflet-tooltip-subarea",offset:[0,-26]};function c(e){let{lat:t,lng:c,zoom:s=12,subareas:d=[],highlightedSubareaId:u=null,showCenterMarker:p=!0,onSubareaMarkerClick:f}=e,h=(0,l.useRef)(null),m=(0,l.useRef)(null),g=(0,l.useRef)({}),k=(0,l.useRef)(null),b=(0,l.useRef)(f);b.current=f;let[y,w]=(0,l.useState)(null),{resolvedTheme:v}=(0,a.D)(),x="dark"===v;(0,l.useEffect)(()=>{let e=!1;return async function(){try{let t=(await r.e(761).then(r.t.bind(r,5027,23))).default;"undefined"!=typeof globalThis&&(globalThis.L=t);try{await r.e(955).then(r.t.bind(r,6955,23))}catch(e){}e||w(()=>t)}catch(t){e||w(()=>null)}}(),()=>{e=!0}},[]),(0,l.useEffect)(()=>{if(!y||!h.current)return;let e=h.current;m.current&&(m.current.remove(),m.current=null),g.current={},k.current=null;let r=y.icon({iconUrl:"https://unpkg.com/[email protected]/dist/images/marker-icon.png",iconRetinaUrl:"https://unpkg.com/[email protected]/dist/images/marker-icon-2x.png",shadowUrl:"https://unpkg.com/[email protected]/dist/images/marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41]});y.Marker.prototype.options.icon=r;let n=y.divIcon({className:"destination-map-marker-center",html:'<div class="destination-map-marker-center__inner" aria-hidden="true"></div>',iconSize:[36,36],iconAnchor:[18,18]}),a=y.map(e,{scrollWheelZoom:!1}).setView([t,c],s);m.current=a;let l=x?i.dark:i.light;y.tileLayer(l,{attribution:'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> © <a href="https://carto.com/attributions">CARTO</a>',subdomains:"abcd",maxZoom:20}).addTo(a);let u=d.length>0?y.latLngBounds([d[0].lat,d[0].lng],[d[0].lat,d[0].lng]):y.latLngBounds([t,c],[t,c]);p&&(y.marker([t,c],{icon:n,zIndexOffset:500}).addTo(a),u.extend([t,c]));let f=y.MarkerClusterGroup;if(d.length>0&&"function"==typeof f&&f){let e=new f({maxClusterRadius:60,spiderfyOnMaxZoom:!0,showCoverageOnHover:!1,zoomToBoundsOnClick:!0});k.current=e,d.forEach(t=>{let n=y.marker([t.lat,t.lng],{icon:r});g.current[t.id]=n,u.extend([t.lat,t.lng]),n.bindTooltip(t.title,o),n.on("click",()=>{var e;null==(e=b.current)||e.call(b,t.id)}),e.addLayer(n)}),a.addLayer(e),a.fitBounds(u,{padding:[24,24],maxZoom:14})}else d.forEach(e=>{let t=y.marker([e.lat,e.lng],{icon:r}).addTo(a);g.current[e.id]=t,u.extend([e.lat,e.lng]),t.bindTooltip(e.title,o),t.on("click",()=>{var t;null==(t=b.current)||t.call(b,e.id)})}),d.length>0&&a.fitBounds(u,{padding:[24,24],maxZoom:14});return()=>{k.current=null,g.current={},m.current&&(m.current.remove(),m.current=null)}},[y,t,c,s,x,d,p]);let T="destination-marker-highlight";return(0,l.useEffect)(()=>{if(!y)return;let e=g.current,t=k.current;if(Object.entries(e).forEach(e=>{let[,t]=e;t.closeTooltip();let r=t._icon;r&&r.classList.remove(T)}),u&&e[u]){let r=e[u],n=r._icon;if(n&&n.classList.add(T),null==t?void 0:t.getVisibleParent){let e=t.getVisibleParent(r);e&&e!==r&&e.spiderfy&&e.spiderfy()}}},[y,u]),(0,n.jsx)("div",{ref:h,className:"h-80 w-full overflow-hidden rounded-2xl border border-black/10 bg-black/5 dark:border-white/10 dark:bg-white/5 sm:h-96","aria-label":"Carte de la destination"})}},5603:()=>{},6031:()=>{},8670:()=>{}}]);
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.