PageSourceSearch

https://www.nebelung.de/theme/fc6be77f01289e2dacedb59fa252fa79/js/…-cms-elements.leaflet-maps.plugin.0b2547.js

js nebelung.de collected 2026-10-02 10:57:41 UTC 12,070 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[11296],{156:t=>{var e=function(t){var e;return!!t&&"object"==typeof t&&"[object RegExp]"!==(e=Object.prototype.toString.call(t))&&"[object Date]"!==e&&t.$$typeof!==r},r="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function i(t,e){return!1!==e.clone&&e.isMergeableObject(t)?n(Array.isArray(t)?[]:{},t,e):t}function s(t,e,r){return t.concat(e).map(function(t){return i(t,r)})}function o(t){return Object.keys(t).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter(function(e){return Object.propertyIsEnumerable.call(t,e)}):[])}function a(t,e){try{return e in t}catch(t){return!1}}function n(t,r,p){(p=p||{}).arrayMerge=p.arrayMerge||s,p.isMergeableObject=p.isMergeableObject||e,p.cloneUnlessOtherwiseSpecified=i;var l,c,u=Array.isArray(r);return u!==Array.isArray(t)?i(r,p):u?p.arrayMerge(t,r,p):(c={},(l=p).isMergeableObject(t)&&o(t).forEach(function(e){c[e]=i(t[e],l)}),o(r).forEach(function(e){(!a(t,e)||Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))&&(a(t,e)&&l.isMergeableObject(r[e])?c[e]=(function(t,e){if(!e.customMerge)return n;var r=e.customMerge(t);return"function"==typeof r?r:n})(e,l)(t[e],r[e],l):c[e]=i(r[e],l))}),c)}n.all=function(t,e){if(!Array.isArray(t))throw Error("first argument should be an array");return t.reduce(function(t,r){return n(t,r,e)},{})},t.exports=n},296:(t,e,r)=>{r.r(e),r.d(e,{default:()=>a});var i=r(220),s=r(632);let o={standard:{url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",attribution:'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'},humanitarian:{url:"https://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png",attribution:'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, Tiles style by <a href="https://www.hotosm.org/" target="_blank">Humanitarian OpenStreetMap Team</a> hosted by <a href="https://openstreetmap.fr/" target="_blank">OpenStreetMap France</a>',maxZoom:17},topo:{url:"https://{s}.tile.opentopomap.org/{z}/{x}/{y}.png",attribution:'Map data: &copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, <a href="http://viewfinderpanoramas.org">SRTM</a> | Map style: &copy; <a href="https://opentopomap.org">OpenTopoMap</a> (<a href="https://creativecommons.org/licenses/by-sa/3.0/">CC-BY-SA</a>)',maxZoom:17},light:{url:"https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}{r}.png",attribution:'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors &copy; <a href="https://carto.com/attributions">CARTO</a>',subdomains:"abcd",maxZoom:20},dark:{url:"https://tiles.stadiamaps.com/tiles/alidade_smooth_dark/{z}/{x}/{y}{r}.png",attribution:'&copy; <a href="https://stadiamaps.com/">Stadia Maps</a>, &copy; <a href="https://openmaptiles.org/">OpenMapTiles</a> &copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors',maxZoom:20},voyager:{url:"https://{s}.basemaps.cartocdn.com/rastertiles/voyager/{z}/{x}/{y}{r}.png",attribution:'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors &copy; <a href="https://carto.com/attributions">CARTO</a>',subdomains:"abcd",maxZoom:20},wikimedia:{url:"https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}{r}.png",attribution:'<a href="https://wikimediafoundation.org/wiki/Maps_Terms_of_Use">Wikimedia</a>',minZoom:1,maxZoom:19},satellite:{url:"https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}",attribution:"Tiles &copy; Esri &mdash; Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community"}};class a extends i.A{static #t=this.options={};async init(){this.loadOptionsFromDataAttribute(),await this.preprocessOptions(),this.loadLeaflet()}loadOptionsFromDataAttribute(){try{let t=this.el.getAttribute("data-rhweb-maps-options");this.options=t?JSON.parse(t):{}}catch(t){console.error("Error parsing options from data-rhweb-maps-options:",t)}}async preprocessOptions(){if(this.options.markers?.length>0){let t=this.options.markers[0];this.options.markers=t.street||t.city?await this.convertMarkersToCoordinates(this.options.markers):this.options.markers.map(t=>({...t,lat:Number(t.lat)||0,lng:Number(t.lng)||0}));let{lat:e,lng:r}=this.options.markers[0];this.options.center={lat:e,lng:r}}this.options.zoom&&(this.options.zoom=parseInt(this.options.zoom))}async convertMarkersToCoordinates(t){return(await Promise.all(t.map(async t=>{try{let e=this.buildAddressString(t),r=await this.geocodeAddress(e);if(r)return{lat:r.lat,lng:r.lng,popup:this.buildPopupContent(t,e),title:t.title||e,originalData:t,address:e};console.warn(`Could not geocode address: ${e}`)}catch(e){console.warn("Geocoding failed for marker:",t,e)}return null}
1))).filter(Boolean)}buildAddressString(t){return[t.street&&t.streetNumber?`${t.street} ${t.streetNumber}`:t.street,t.postal&&t.city?`${t.postal} ${t.city}`:t.city,t.country].filter(Boolean).join(", ")}buildPopupContent(t,e){let r=this.formatAddressForPopup(t);return(t.popup||"")+(r||"")+"<br>"+this.createMapButtons(e)}createMapButtons(t){let e=this.isAppleDevice(),r=e?this.buildAppleMapsUrl(t):this.buildGoogleMapsUrl(t),i=e?this.options.appleCardsButtonLabel:this.options.googleMapsButtonLabel;return`<a class="leaflet-map-popup-button" target="_blank" href="${r}">${i}</a>`}isAppleDevice(){return!!s.A.isIOSDevice()||/Mac OS X|Macintosh/i.test(navigator.userAgent)}formatAddressForPopup(t){let e=[t.street,t.streetNumber].filter(Boolean).join(" ").trim(),r=[t.postal,t.city].filter(Boolean).join(" ").trim();return e&&r?`${e},<br>${r}`:e||r||""}buildAppleMapsUrl(t){let e=encodeURIComponent(t);return`https://maps.apple.com/place?address=${e}`}buildGoogleMapsUrl(t){let e=encodeURIComponent(t);return`https://www.google.com/maps/place/${e}`}buildPopupContentForOldStructure(t){return(t.popup||"")+this.createMapButtons(t.address)}async geocodeAddress(t){try{let e=`https://nominatim.openstreetmap.org/search?format=json&q=${encodeURIComponent(t)}&limit=1`,r=await fetch(e),[i]=await r.json();return i?{lat:parseFloat(i.lat),lng:parseFloat(i.lon)}:null}catch(t){return console.error("Geocoding error:",t),null}}getMapStyle(){return o[this.options.style]||o.standard}async loadLeaflet(){await this.loadLeafletCSS(),await this.loadLeafletScript(),this.initMap()}loadLeafletCSS(){return new Promise(t=>{if(document.querySelector('link[href*="leaflet"]'))return t();let e=Object.assign(document.createElement("link"),{rel:"stylesheet",href:"https://unpkg.com/[email protected]/dist/leaflet.css",integrity:"sha256-p4NxAoJBhIIN+hmNHrzRCf9tD/miZyoHS5obTRR9BMY=",crossOrigin:"",onload:t});document.head.appendChild(e)})}loadLeafletScript(){return new Promise((t,e)=>{if(window.L)return t();let r=document.createElement("script");Object.assign(r,{src:"https://unpkg.com/[email protected]/dist/leaflet.js",integrity:"sha256-20nQCchB9co0qIjJZRGuk2/Z9VM+kNiyxNV1lvTlZBo=",crossOrigin:"",async:!0,onload:t,onerror:e}),document.head.appendChild(r)})}initMap(){if(!this.options.center)return console.error("No center coordinates available for map initialization");this.map=L.map(this.el,{center:[this.options.center.lat,this.options.center.lng],zoom:this.options.zoom||13,scrollWheelZoom:!1});let{url:t,attribution:e}=this.getMapStyle();L.tileLayer(t,{attribution:e,maxZoom:19}).addTo(this.map),this.options.markers?.length>0?this.addMarkers():!1!==this.options.showMarker&&this.addSingleMarker()}addMarkers(){this.markers=[];let t=[];this.options.markers.forEach(e=>{let r=L.marker([e.lat,e.lng]).addTo(this.map);e.popup&&r.bindPopup(e.popup),this.markers.push(r),t.push([e.lat,e.lng])}),t.length>1&&this.map.fitBounds(t,{padding:[20,20]})}addSingleMarker(){this.marker=L.marker([this.options.center.lat,this.options.center.lng]).addTo(this.map)}}},632:(t,e,r)=>{r.d(e,{A:()=>i});class i{static isTouchDevice(){return"ontouchstart"in document.documentElement}static isIOSDevice(){return i.isIPhoneDevice()||i.isIPadDevice()}static isNativeWindowsBrowser(){return i.isIEBrowser()||i.isEdgeBrowser()}static isIPhoneDevice(){return!!navigator.userAgent.match(/iPhone/i)}static isIPadDevice(){return!!navigator.userAgent.match(/iPad/i)}static isIEBrowser(){return -1!==navigator.userAgent.toLowerCase().indexOf("msie")||!!navigator.userAgent.match(/Trident.*rv:\d+\./)}static isEdgeBrowser(){return!!navigator.userAgent.match(/Edge\/\d+/i)}static getList(){return{"is-touch":i.isTouchDevice(),"is-ios":i.isIOSDevice(),"is-native-windows":i.isNativeWindowsBrowser(),"is-iphone":i.isIPhoneDevice(),"is-ipad":i.isIPadDevice(),"is-ie":i.isIEBrowser(),"is-edge":i.isEdgeBrowser()}}}},308:(t,e,r)=>{r.d(e,{A:()=>i});class i{constructor(t=document){this._el=t,t.$emitter=this,this._listeners=[]}publish(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=new CustomEvent(t,{detail:e,cancelable:r});return this.el.dispatchEvent(i),i}subscribe(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=this,s=t.split("."),o=r.scope?e.bind(r.scope):e;if(r.once&&!0===r.once){let e=o;o=function(r){i.unsubscribe(t),e(r)}}return this.el.addEventListener(s[0],o),this.listeners.push({splitEventName:s,opts:r,cb:o}),!0}unsubscribe(t){let e=t.split(".");return this.listeners=this.listeners.reduce((t,r)=>([...r.splitEventName].sort().toString()===e.sort().toString()?this.el.removeEventListener(r.splitEventName[0],r.cb):t.push(r),t),[]),!0}
1reset(){return this.listeners.forEach(t=>{this.el.removeEventListener(t.splitEventName[0],t.cb)}),this.listeners=[],!0}get el(){return this._el}set el(t){this._el=t}get listeners(){return this._listeners}set listeners(t){this._listeners=t}}},707:(t,e,r)=>{r.d(e,{A:()=>i});class i{static ucFirst(t){return t.charAt(0).toUpperCase()+t.slice(1)}static lcFirst(t){return t.charAt(0).toLowerCase()+t.slice(1)}static toDashCase(t){return t.replace(/([A-Z])/g,"-$1").replace(/^-/,"").toLowerCase()}static toLowerCamelCase(t,e){let r=i.toUpperCamelCase(t,e);return i.lcFirst(r)}static toUpperCamelCase(t,e){return e?t.split(e).map(t=>i.ucFirst(t.toLowerCase())).join(""):i.ucFirst(t.toLowerCase())}static parsePrimitive(t){try{return/^\d+(.|,)\d+$/.test(t)&&(t=t.replace(",",".")),JSON.parse(t)}catch(e){return t.toString()}}}},220:(t,e,r)=>{r.d(e,{A:()=>n});var i=r(156),s=r.n(i),o=r(707),a=r(308);class n{constructor(t,e={},r=!1){if(!(t instanceof Node)){console.warn(`There is no valid element given while trying to create a plugin instance for "${r}".`);return}this.el=t,this.$emitter=new a.A(this.el),this._pluginName=this._getPluginName(r),this.options=this._mergeOptions(e),this._initialized=!1,this._registerInstance(),this._init()}init(){console.warn(`The "init" method for the plugin "${this._pluginName}" is not defined. The plugin will not be initialized.`)}update(){}_init(){this._initialized||(this.init(),this._initialized=!0)}_update(){this._initialized&&this.update()}_mergeOptions(t){let e=[this.constructor.options,this.options,t];return e.push(this._getConfigFromDataAttribute()),e.push(this._getOptionsFromDataAttribute()),s().all(e.filter(t=>t instanceof Object&&!(t instanceof Array)).map(t=>t||{}))}_getConfigFromDataAttribute(){let t={};if("function"!=typeof this.el.getAttribute)return t;let e=o.A.toDashCase(this._pluginName),r=this.el.getAttribute(`data-${e}-config`);return r?window.PluginConfigManager.get(this._pluginName,r):t}_getOptionsFromDataAttribute(){let t={};if("function"!=typeof this.el.getAttribute)return t;let e=o.A.toDashCase(this._pluginName),r=this.el.getAttribute(`data-${e}-options`);if(r)try{return JSON.parse(r)}catch(t){console.error(`The data attribute "data-${e}-options" could not be parsed to json: ${t.message}`)}return t}_registerInstance(){window.PluginManager.getPluginInstancesFromElement(this.el).set(this._pluginName,this),window.PluginManager.getPlugin(this._pluginName,!1).get("instances").push(this)}_getPluginName(t){return t||(t=this.constructor.name),t}}}}]);

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.