1const L=(w=[])=>({addresses:w,mapLoaded:!1,async init(){this.renderWhenConsented(),window.addEventListener("CookiebotOnLoad",()=>this.renderWhenConsented(),!1),window.addEventListener("CookiebotOnAccept",()=>this.renderWhenConsented(),!1),window.addEventListener("CookiebotOnConsentChanged",()=>this.renderWhenConsented(),!1)},canLoadMaps(){var e;return window.Cookiebot?!!((e=window.Cookiebot.consent)!=null&&e.preferences):!document.getElementById("Cookiebot")},renderConsentPlaceholder(){var n;const e=this.$el.querySelector("[data-map]");e&&(e.innerHTML=` 2 <div class="flex h-full min-h-[20rem] flex-col items-center justify-center gap-4 bg-accent-mist p-xs text-center"> 3 <p class="lead mb-0">Bitte erlauben Sie externe Inhalte, um die Karte zu laden.</p> 4 <button type="button" class="btn btn-primary" data-map-consent-button> 5 <span>Cookie-Einstellungen</span> 6 <span>Cookie-Einstellungen</span> 7 </button> 8 </div> 9 `,(n=e.querySelector("[data-map-consent-button]"))==null||n.addEventListener("click",()=>{var t;(t=window.Cookiebot)==null||t.renew()}))},renderWhenConsented(){if(this.mapLoaded)return;if(!this.canLoadMaps()){this.renderConsentPlaceholder();return}const e=this.$el.querySelector("[data-map]");e!=null&&e.querySelector("[data-map-consent-button]")&&(e.innerHTML=""),this.mapLoaded=!0,this.initMaps(),this.renderMaps()},initMaps(){(e=>{var n,t,a,o="The Google Maps JavaScript API",s="google",c="importLibrary",i="__ib__",d=document,r=window;r=r[s]||(r[s]={});var l=r.maps||(r.maps={}),h=new Set,p=new URLSearchParams,b=()=>n||(n=new Promise(async(m,u)=>{var g;await(t=d.createElement("script")),p.set("libraries",[...h]+"");for(a in e)p.set(a.replace(/[A-Z]/g,f=>"_"+f[0].toLowerCase()),e[a]);p.set("callback",s+".maps."+i),t.src=`https://maps.${s}apis.com/maps/api/js?`+p,l[i]=m,t.onerror=()=>n=u(Error(o+" could not load.")),t.nonce=((g=d.querySelector("script[nonce]"))==null?void 0:g.nonce)||"",d.head.append(t)}));l[c]?console.warn(o+" only loads once. Ignoring:",e):l[c]=(m,...u)=>h.add(m)&&b().then(()=>l[c](m,...u))})({key:"AIzaSyCEQp6g_p-T_mtcPuhG5U6L6bTcqDfUI5w",v:"weekly"})},async renderMaps(){const e=this.$el.querySelector("[data-map]");if(!e)return;const t={zoom:11,center:{lat:48.1769738,lng:11.5601379},mapId:"621fce8f0a446b45",disableDefaultUI:!0},{Map:a}=await google.maps.importLibrary("maps"),o=new a(e,t);this.renderMarkers(o)},async renderMarkers(e){if(!this.addresses)return;const{AdvancedMarkerElement:n}=await google.maps.importLibrary("marker"),t=new google.maps.InfoWindow({minWidth:200,maxWidth:300}),a=new google.maps.LatLngBounds;this.addresses.forEach(async o=>{try{const s={lat:parseFloat(o.latitude),lng:parseFloat(o.longitude)},c=document.createElement("img");c.src="/dist/icons/marker.svg";const i=new n({position:s,map:e,title:o.title,gmpClickable:!0}),d=` 10 <div class="flex flex-col"> 11 <p class="text-caption font-bold leading-none">${o.title}</p> 12 <address class="not-italic"> 13 <p class="text-caption leading-tight">${o.addressLine1}</p> 14 <p class="text-caption m-0 leading-tight">${o.postalCode} ${o.locality}</p> 15 </address> 16 </div> 17 `;i.addListener("click",({domEvent:r,latLng:l})=>{const{target:h}=r;t.close(),t.setContent(d),t.open(i.map,i)}),t.addListener("closeclick",()=>{e.fitBounds(a),this.setMapZoom(e,11)}),a.extend(s),e.fitBounds(a),this.setMapZoom(e,11)}catch(s){console.warn(s.message)}})},setMapZoom(e,n){e.getZoom()>n&&e.setZoom(n)}});export{L as Maps};
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.