window.uicoreInitMap=function(){document.querySelectorAll(".uicore-bl-google-maps").forEach(e=>{const a=parseInt(e.dataset.zoom,10);let r=[];const n="true"===e.dataset.hasClusterMarkers;try{r=JSON.parse(e.dataset.markers||"[]")}catch(e){console.error("Invalid markers JSON:",e)}const t=r.length?{lat:parseFloat(r[0].latitude),lng:parseFloat(r[0].longitude)}:{lat:37.7749,lng:-122.4194},o=new google.maps.Map(e,{zoom:a,center:t}),s=[];r.forEach(e=>{if(!e.latitude||!e.longitude)return;const a=e?.markerSize||24,r=new google.maps.Marker({position:{lat:parseFloat(e.latitude),lng:parseFloat(e.longitude)},icon:{url:e?.markerIcon?.url||null,scaledSize:new google.maps.Size(a,a)}});if(e.description){const a=new google.maps.InfoWindow({content:`\n                <div class="marker-info-window">\n                    <span class="marker-title">${e?.title||e.address}</span>\n                    <span class="marker-description">${e.description}</span>\n                    <a class="marker-link" href="https://www.google.com/maps?q=${encodeURIComponent(e?.address)}" target="_blank">\n                        ${e?.viewMapText||"View Larger Map"}\n                    </a>\n                </div>\n            `});r.addListener("click",()=>{a.open(o,r)})}s.push(r)}),s.length>1&&n?new window.markerClusterer.MarkerClusterer({markers:s,map:o}):s.forEach(e=>e.setMap(o))})};