1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5960],{25960:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>c});var i=n(95155),a=n(12115),r=n(85752),l=n.n(r);n(68413),delete l().Icon.Default.prototype._getIconUrl,l().Icon.Default.mergeOptions({iconRetinaUrl:"https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.9.4/images/marker-icon-2x.png",iconUrl:"https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.9.4/images/marker-icon.png",shadowUrl:"https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.9.4/images/marker-shadow.png"});let o=l().divIcon({html:'<div style="width:24px;height:24px;background:#06f;border-radius:50%;border:3px solid white;box-shadow:0 2px 6px rgba(0,0,0,0.3)"></div>',className:"",iconSize:[24,24],iconAnchor:[12,12]}),s=l().divIcon({html:'<div style="width:16px;height:16px;background:#3b82f6;border-radius:50%;border:2px solid white;box-shadow:0 1px 4px rgba(0,0,0,0.2)"></div>',className:"",iconSize:[16,16],iconAnchor:[8,8]});function c(e){let{prestataires:t,activeId:n,onMarkerClick:r,centerOnVille:c}=e,p=(0,a.useRef)(null),d=(0,a.useRef)(new Map),u=(0,a.useRef)(null),f=(0,a.useRef)(r);return f.current=r,(0,a.useEffect)(()=>{if(!u.current)return;console.log("[AnnuaireMap] Init with",t.length,"prestataires",u.current.offsetWidth,"x",u.current.offsetHeight),p.current&&(p.current.remove(),p.current=null),d.current.clear();let e=c?[c.lat,c.lng]:[46.2,2.5],i=1===t.length?15:c?12:6,a=l().map(u.current,{zoomControl:!0}).setView(e,i);if(p.current=a,l().tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'\xa9 <a href="https://openstreetmap.org">OpenStreetMap</a>',maxZoom:19}).addTo(a),t.forEach(e=>{let t=l().marker([e.lat,e.lng],{icon:e.id===n?o:s}).addTo(a).bindPopup('\n <div style="display:flex;gap:12px;min-width:240px;max-width:320px;font-family:system-ui,-apple-system,sans-serif;padding:4px">\n '.concat(e.featuredPhoto?'\n <div style="width:80px;height:80px;flex-shrink:0;border-radius:12px;overflow:hidden;background:#f3f4f6">\n <img src="'.concat(e.featuredPhoto,'" alt="').concat(e.nom,'" style="width:100%;height:100%;object-fit:cover" />\n </div>\n '):'\n <div style="width:80px;height:80px;flex-shrink:0;border-radius:12px;background:linear-gradient(135deg,#cce0ff,#99c2ff);display:flex;align-items:center;justify-content:center">\n <span style="font-size:28px;font-weight:700;color:#0052cc">'.concat(e.nom.charAt(0).toUpperCase(),"</span>\n </div>\n "),'\n <div style="flex:1;min-width:0;display:flex;flex-direction:column;justify-content:center">\n <div style="font-weight:700;font-size:14px;color:#111827;margin-bottom:4px;line-height:1.2">').concat(e.nom,'</div>\n <div style="display:flex;flex-direction:column;gap:2px">\n ').concat(e.adresse?'<div style="font-size:11px;color:#6b7280;display:flex;align-items:flex-start;gap:4px"><span style="flex-shrink:0;margin-top:1px">\uD83D\uDCCD</span><span>'.concat(e.adresse,"</span></div>"):"","\n ").concat(e.ville?'<div style="font-size:11px;color:#6b7280;display:flex;align-items:center;gap:4px"><span style="flex-shrink:0">'.concat(e.adresse?" ":"\uD83D\uDCCD","</span><span>").concat(e.codePostal||""," ").concat(e.ville,"</span></div>"):"","\n ").concat(e.telephone?'<div style="font-size:11px;color:#374151;display:flex;align-items:center;gap:4px;margin-top:2px"><span style="flex-shrink:0">\uD83D\uDCDE</span><span style="font-weight:500">'.concat(e.telephone,"</span></div>"):"","\n ").concat(e.websiteUrl?'<div style="font-size:11px;color:#0052cc;display:flex;align-items:center;gap:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis"><span style="flex-shrink:0">\uD83C\uDF10</span><span>'.concat(e.websiteUrl.replace(/^https?:\/\//,"").replace(/\/$/,""),"</span></div>"):"","\n </div>\n </div>\n </div>"),{maxWidth:340,className:"custom-popup"});t.on("click",()=>f.current(e.id)),d.current.set(e.id,t)}),!c){let e=l().latLngBounds([41.3,-5.3],[51.1,9.6]);a.fitBounds(e,{padding:[10,10]})}return setTimeout(()=>a.invalidateSize(),100),()=>{a.remove(),p.current=null,d.current.clear()}},[null==c?void 0:c.lat,null==c?void 0:c.lng,JSON.stringify(t.map(e=>e.id))]),(0,a.useEffect)(()=>
1{if(d.current.forEach((e,t)=>{e.setIcon(t===n?o:s)}),p.current&&n){let e=d.current.get(n);e&&(p.current.flyTo(e.getLatLng(),Math.max(p.current.getZoom(),13),{animate:!0,duration:.8}),e.openPopup())}else if(p.current&&!n&&!c){p.current.closePopup();let e=l().latLngBounds([41.3,-5.3],[51.1,9.6]);p.current.flyToBounds(e,{padding:[10,10],animate:!0,duration:.8})}},[n,c]),(0,i.jsx)("div",{ref:u,className:"w-full h-full rounded-xl"})}},68413:()=>{}}]);
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.