1(()=>{"use strict";window.imx=window.imx||{},window.imx.jsonrequest=window.imx.jsonrequest||{};class e{request(e){return window.imx.jsonrequest[e]||(window.imx.jsonrequest[e]=fetch(e).then((e=>e.json()))),window.imx.jsonrequest[e]}}window.imx=window.imx||{},window.imx.styleloader=window.imx.styleloader||{},window.imx=window.imx||{},window.imx.scriptloader=window.imx.scriptloader||{};class t{constructor(){this.request=new e}load(e){const t=this.request.request(e).then((e=>Promise.all([new Promise((t=>t(e.content))),this.injectCss(e.assets.css),this.injectJavaScript(e.assets.js)]))).then((e=>e[0]));return Promise.all([t]).finally((()=>{!function(e){const t=new CustomEvent("ContentLoader.load",{detail:{}});e.dispatchEvent(t)}(document)})),t}injectCss(e){const t=[];return e.filter((e=>!document.querySelector(`link[href*="${e}"]`))).forEach((e=>{t.push(function(e){return window.imx.styleloader[e]=window.imx.styleloader[e]||new Promise(((t,r)=>{if(document.querySelector(`link[href*="${e}"]`))return void t(e);const i=document.createElement("link");i.href=e,i.rel="stylesheet",i.onload=()=>t(e),i.onerror=()=>r(new Error(`Style load error for ${e}`)),document.head.appendChild(i)})),window.imx.styleloader[e]}(e))})),Promise.all(t)}injectJavaScript(e){const t=[];return e.filter((e=>!document.querySelector(`script[src*="${e}"]`))).forEach((e=>{t.push(function(e){return window.imx.scriptloader[e]=window.imx.scriptloader[e]||new Promise(((t,r)=>{if(document.querySelector(`script[src*="${e}"]`))return void t(e);const i=document.createElement("script");i.setAttribute("src",e),i.onload=()=>t(e),i.onerror=()=>r(new Error(`Script load error for ${e}`)),document.body.appendChild(i)})),window.imx.scriptloader[e]}(e))})),Promise.all(t)}}class r{getBaseUrl(){const e=document.querySelector("#pageHeader__logo")?.getAttribute("href")??"";return(""!==e?e:this._getBaseFromCurrentLocation()).replace(/\/+$/,"")}_getBaseFromCurrentLocation(){const e=window.location.pathname.split("/").filter(Boolean)[0],t=e&&/^[a-z]{2,3}$/.test(e);return new URL(""+(t?`/${e}`:"/"),window.location.origin).toString()}}const i=2*Math.PI,s="map__leg";class o{map;options={circleSpiralSwitchover:9,circleFootSeparation:25,spiralFootSeparation:28,spiralLengthStart:15,spiralLengthFactor:4};previousSpiderLegs=[];constructor(e,t={}){this.map=e,this.options={...this.options,...t},e.on("zoomstart",(()=>{this.unspiderfy()})),e.on("click",(e=>{e.originalEvent.target.closest(s)||this.unspiderfy()}))}spiderfy(e,t){this.unspiderfy();const r=this.generateSpiderLegParams(t.length),i=t.map(((t,i)=>{const s=r[i],o=this.createMarkerElements(s,t);return{data:t,elements:o,marker:new maplibregl.Marker({element:o.container}).setLngLat(e),param:s}}));i.forEach((e=>e.marker.addTo(this.map))),this.previousSpiderLegs=i,this.options.spiderfyCallback&&this.options.spiderfyCallback()}unspiderfy(){this.previousSpiderLegs.forEach((e=>e.marker.remove())),this.previousSpiderLegs=[],this.options.unspiderfyCallback&&this.options.unspiderfyCallback()}generateSpiderLegParams(e){return e>=this.options.circleSpiralSwitchover?this.generateSpiralParams(e):this.generateCircleParams(e)}generateSpiralParams(e){let t=this.options.spiralLengthStart,r=0;const s=[];for(let o=0;o<e;o++)r+=this.options.spiralFootSeparation/t+5e-4*o,s.push({x:t*Math.cos(r),y:t*Math.sin(r),angle:r,legLength:t,index:o}),t+=i*this.options.spiralLengthFactor/r;return s}generateCircleParams(e){const t=this.options.circleFootSeparation*(2+e)/i,r=i/e,s=[];for(let i=0;i<e;i++){const e=i*r;s.push({x:t*Math.cos(e),y:t*Math.sin(e),angle:e,legLength:t,index:i})}return s}createMarkerElements(e,t){const r=document.createElement("div"),i=document.createElement("div"),o=document.createElement("div");return r.classList.add(s),r.style.marginLeft=e.x+"px",r.style.marginTop=e.y+"px",i.classList.add("map__leg__line"),i.style.height=e.legLength+"px",i.style.transform="rotate("+(e.angle-Math.PI/2)+"rad)",o.classList.add("map__leg__pin"),this.options.markerBuilderCallback&&o.appendChild(this.options.markerBuilderCallback(t).getElement()),r.appendChild(i),r.appendChild(o),{container:r,line:i,pin:o}}}const a="imx-clustersource",n="imx-clusterlayer";class l{maptoolkit;util;maplibre;spiderifier;builtMarkers={};shownMarkers={};markerCallback=(e,t)=>t;layerIdent;sourceIdent;visible=!0;constructor(e,t,r){this.maptoolkit=e,this.util=t,this.maplibre=e.gl,this.layerIdent=r?n+"_"+r:n,this.sourceIdent=r?a+"_"+r:a,this.maplibre.addSource(this.sourceIdent,{type:"geojson",cluster:!0,clusterMa
1xZoom:17,data:{type:"FeatureCollection",features:[]}}),this.maplibre.addLayer({id:this.layerIdent,type:"symbol",source:this.sourceIdent}),this.maplibre.on("render",(()=>{if(!this.visible)return;if(!this.maplibre.isSourceLoaded(this.sourceIdent))return;const e=this.maplibre.querySourceFeatures(this.sourceIdent),t={};for(const r of e){const e=r.properties,i=e.cluster_id??e.ident;if(!this.builtMarkers[i])if(e.cluster)this.builtMarkers[i]=this.builtMarkers[i]??this.buildClusterMarker(r);else{const t=JSON.parse(e.marker),r=t.icon?this.util.createIconMarker(t):this.util.createDefaultMarker(t);this.builtMarkers[i]=this.markerCallback(t,r)}t[i]=this.builtMarkers[i],this.shownMarkers[i]||this.builtMarkers[i].addTo(this.maplibre)}for(const e in this.shownMarkers)t[e]||this.shownMarkers[e].remove();this.shownMarkers=t})),this.spiderifier=new o(this.maplibre,{spiralLengthStart:45,circleFootSeparation:75,spiderfyCallback:()=>Object.values(this.builtMarkers).forEach((e=>this.util.backgroundMarker(e))),unspiderfyCallback:()=>Object.values(this.builtMarkers).forEach((e=>this.util.foregroundMarker(e))),markerBuilderCallback:e=>this.markerCallback(e,e.icon?this.util.createIconMarker(e):this.util.createDefaultMarker(e))})}paint(e,t){this.markerCallback=t??((e,t)=>t),Object.keys(this.builtMarkers).forEach((e=>this.builtMarkers[e].remove())),Object.keys(this.shownMarkers).forEach((e=>this.shownMarkers[e].remove())),this.builtMarkers={},this.shownMarkers={};const r={type:"FeatureCollection",features:e.map((e=>({type:"Feature",geometry:{type:"Point",coordinates:e.lngLat},properties:{ident:e.ident,context:e.context,marker:e}})))};this.maplibre.getSource(this.sourceIdent).setData(r)}hide(){this.visible=!1,this.maplibre.getLayer(this.layerIdent)&&this.maplibre.setLayoutProperty(this.layerIdent,"visibility","none"),this.spiderifier.unspiderfy(),Object.keys(this.shownMarkers).forEach((e=>this.shownMarkers[e].remove())),this.shownMarkers={}}show(){this.visible=!0,this.maplibre.getLayer(this.layerIdent)&&this.maplibre.setLayoutProperty(this.layerIdent,"visibility","visible"),this.maplibre.triggerRepaint()}buildClusterMarker(e){const t=this.util.createClusterMarker(e.properties.point_count,e.geometry.coordinates);return t.getElement().addEventListener("click",(()=>{this.maplibre.getZoom()<16?this.zoomToCluster(e):this.spiderify(e)})),t}zoomToCluster(e){this.maplibre.getSource(this.sourceIdent).getClusterExpansionZoom(e.properties.cluster_id,((t,r)=>{t||(r>16&&this.spiderify(e),this.maplibre.easeTo({center:e.geometry.coordinates,zoom:Math.max(r,this.maplibre.getZoom()+2)}))}))}spiderify(e){this.maplibre.getSource(this.sourceIdent).getClusterLeaves(e.properties.cluster_id,100,0,((t,r)=>{if(t)return console.error("error while getting leaves of a cluster",t);this.spiderifier.spiderfy(e.geometry.coordinates,r.map((e=>e.properties.marker)))}))}}class d{loader;baseUrl;moduleNode;constructor(e){this.moduleNode=e,this.loader=new t,this.baseUrl=new r}run(){const e=this.moduleNode.dataset.contentUid,t=this.moduleNode.querySelector('[name="listButton"]'),r=this.moduleNode.querySelector('[name="mapButton"]'),i=t=>{history.replaceState({...history.state??{},listMapViews:{...history.state?.listMapViews??{},[e]:t}},"",window.location.href)};t?.addEventListener("click",(()=>i("list"))),r?.addEventListener("click",(()=>i("map")));const s=this.moduleNode.querySelector(".map-wrap"),o=this.moduleNode.querySelector(".mapInfoboard"),a=o.querySelector(".mapInfoboard__closer"),n=o.querySelector(".mapInfoboard__content"),d=new Map;let c,h,p;const u=window.matchMedia("(max-width: 600px)"),m=u.matches?25:50,g=()=>({top:m,right:m,bottom:m,left:m});document.addEventListener(`map.${s.dataset.id}.ready`,(t=>{const{map:r,util:i}=t.detail,m=history.state?.listMapStates?.[e];m&&r.gl.jumpTo({center:[m.lng,m.lat],zoom:m.zoom}),r.gl.on("moveend",(()=>{const t=r.gl.getCenter(),i={lat:t.lat,lng:t.lng,zoom:r.gl.getZoom()};history.replaceState({...history.state??{},listMapStates:{...history.state?.listMapStates??{},[e]:i}},"",window.location.href)})),new IntersectionObserver((()=>r.gl.resize())).observe(s),u.addEventListener("change",(()=>
1{r.gl.setPadding(g()),p.length>0&&i.fitBounds(p,{padding:g()})})),a.addEventListener("click",(()=>y(i,r)));const w=(e,t,r)=>{n.innerHTML="",o.removeAttribute("hidden"),o.setAttribute("data-loading","1"),c&&(r.lowlightMarker(c),c=void 0),h&&(h.remove(),h=void 0);const i=new URL(`${this.baseUrl.getBaseUrl()}/action/teaser`,window.location.origin);return i.searchParams.set("ident",e),i.searchParams.set("teaserType",s.dataset.teaserType),this.loader.load(i.toString()).then((e=>{o.setAttribute("data-loading","0"),n.innerHTML=e.html,e.polyline&&(h=r.createPolyline(e.polyline).addTo(t),r.fitBounds(e.polyline,{padding:g()}))}))},y=(e,t)=>{o.setAttribute("hidden","hidden"),o.setAttribute("data-loading","0"),c&&(e.lowlightMarker(c),c=void 0),h&&(h.remove(),h=void 0)},k=new URL(`${this.baseUrl.getBaseUrl()}/action/mapMarkers`,window.location.origin);k.searchParams.set("ident","content_"+(e??0)),k.searchParams.set("filters",window.location.search.split("?")[1]||""),this.moduleNode.setAttribute("data-loading","1"),this.loader.load(k.toString()).then((e=>{if(p=e.markers.map((e=>e.lngLat)),e.markers.length>1&&!m){const t=new maplibregl.LngLatBounds;e.markers.forEach((e=>{t.extend(e.lngLat)})),r.gl.fitBounds(t,{padding:g()})}new l(r,i).paint(e.markers,((e,t)=>(d.set(e.ident,t),t.getElement().addEventListener("click",(()=>{w(e.ident,r,i).then((()=>{i.highlightMarker(t),c=t}))})),t)))})).finally((()=>{this.moduleNode.setAttribute("data-loading","0")})),((e,t)=>{const r=s?.querySelector(".map__container");JSON.parse(r?.dataset.polylines||"[]").forEach((r=>{const i=`polyline_${s?.dataset.id}_${r.id}`;t.renderPolylineWithPopup(e,i,r)}))})(r,i)}));const w=history.state?.listMapViews?.[e];"map"===w&&requestAnimationFrame((()=>{r?.click()}))}}document.querySelectorAll('.filterList[data-has-map="true"]').forEach((e=>{new d(e).run()}))})();
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.