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,GAOX,OAHAmL,EAAoBF,GAAUG,KAAKnL,EAAOD,QAASC,EAAQA,EAAOD,QAASgL,GAGpE/K,EAAOD,OACf,CCnB0BgL,CAAoB,K","sources":["webpack://MemorialMap/webpack/universalModuleDefinition","webpack://MemorialMap/./src/TypeScript/index.ts","webpack://MemorialMap/./src/TypeScript/map.ts","webpack://MemorialMap/./src/TypeScript/types/MapFeature.ts","webpack://MemorialMap/./src/TypeScript/types/MapIcons.ts","webpack://MemorialMap/external umd {\"commonjs\":\"leaflet\",\"commonjs2\":\"leaflet\",\"root\":\"leaflet\"}","webpack://MemorialMap/external umd {\"commonjs\":\"leaflet-maplibre-gl\",\"commonjs2\":\"leaflet-maplibre-gl\",\"root\":\"leaflet-maplibre-gl\"}","webpack://MemorialMap/external umd {\"commonjs\":\"leaflet.markercluster\",\"commonjs2\":\"leaflet.markercluster\",\"root\":\"leaflet.markercluster\"}","webpack://MemorialMap/webpack/bootstrap","webpack://MemorialMap/webpack/startup"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"leaflet\"), require(\"leaflet-maplibre-gl\"), require(\"leaflet.markercluster\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([, , ], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"MemorialMap\"] = factory(require(\"leaflet\"), require(\"leaflet-maplibre-gl\"), require(\"leaflet.markercluster\"));\n\telse\n\t\troot[\"MemorialMap\"] = factory(root[\"leaflet\"], root[\"leaflet-maplibre-gl\"], root[\"leaflet.markercluster\"]);\n})(window, (__WEBPACK_EXTERNAL_MODULE__109__, __WEBPACK_EXTERNAL_MODULE__698__, __WEBPACK_EXTERNAL_MODULE__207__) => {\nreturn ","/*!\n * This file is part of the TYPO3 CMS-based extension \"memorial\".\n * (c) Earlybird GmbH \n */\nimport Map from './map';\n\ndocument.addEventListener('DOMContentLoaded', () => {\n document.querySelectorAll('[id][data-map-src]').forEach(function(e) {\n new Map(e);\n });\n});\n","//\n// This file is part of the TYPO3 CMS-based extension \"memorial\".\n// (c) Earlybird GmbH \n//\nimport * as L from 'leaflet';\nimport './types/MapIcons';\nimport 'leaflet.markercluster';\nimport '@maplibre/maplibre-gl-leaflet';\nimport { MarkerClusterGroup } from 'leaflet'; // @see https://github.com/Leaflet/Leaflet.markercluster/issues/982#issuecomment-1731288935\nimport { MapFeature } from './types/MapFeature';\nimport { LargeMapIcon, MediumMapIcon } from \"./types/MapIcons\";\n\nexport default class Map {\n container: HTMLElement;\n data: { [key: string]: any } | null = null;\n id: string;\n labels: { [key: string]: { [key: string]: string } } = {\n en: {\n 'resetView.title': 'center view', // Tooltip for center view button\n 'zoomIn.title': 'zoom in', // Tooltip for zoom in button\n 'zoomOut.title': 'zoom out', // Tooltip for zoom out button\n },\n de: {\n 'resetView.title': 'Karte zentrieren',\n 'zoomIn.title': 'Vergrößern',\n 'zoomOut.title': 'Verkleinern',\n },\n };\n language: string = 'de';\n map: L.Map | null = null;\n options: { [key: string]: any } = {\n attribution: '© Stadia Maps, © OpenMapTiles, © OpenStreetMap',\n attributionPrefix: 'Leaflet',\n center: new L.LatLng(47.6964719, 13.3457347),\n controls: true,\n fitBounds: true,\n maxZoom: 19,\n minZoom: 2,\n scrollWheelZoom: false,\n tiles: 'https://tiles-eu.stadiamaps.com/tiles/alidade_smooth/{z}/{x}/{y}{r}.png',\n zoom: 8,\n };\n placeTypes: { [key: number]: string } = {\n 0: 'Sonstiger Ort',\n 9: 'Standort',\n 10: 'Ehemaliger Standort',\n };\n resetViewControl: L.Control | null = null;\n src: string;\n\n constructor(targetElement: HTMLElement | string) {\n let container = (typeof targetElement === 'string') ? document.getElementById(targetElement) : targetElement;\n if (!(container instanceof HTMLElement)) {\n throw new Error('Invalid target element');\n }\n\n if (!container.id || container.id.trim().length === 0) {\n throw new Error('Invalid target element: empty id');\n }\n\n this.id = container.id;\n const dataSource = container.getAttribute('data-map-src');\n if (dataSource === null || dataSource.trim() === '') {\n throw new Error('Empty or missing \\'data-map-src\\' attribute for map \\'' + this.id + '\\'');\n }\n this.src = dataSource;\n this.container = container;\n\n this.initMap().then((map) => { this.map = map; this.toggleResetViewButton() });\n }\n\n private async initMap() {\n let response = await fetch(this.src);\n let data = await response.json();\n\n if (data !== null && data.type === 'FeatureCollection' && Array.isArray(data.features)) {\n this.data = data;\n // Override options\n if (data.options) {\n Object.entries(data.options).forEach(([key, value]) => {\n if (key !== 'center') {\n this.options[key] = value;\n }\n });\n }\n this.options.zoom = this.options.zoom * 1;\n this.options.minZoom = this.between(this.options.minZoom, 0, this.options.zoom) ? this.options.minZoom * 1 : this.options.zoom;\n this.options.maxZoom = this.between(this.options.maxZoom, this.options.minZoom, 19) ? this.options.maxZoom * 1 : this.options.minZoom;\n if (Array.isArray(data.options.center) && data.options.center[0] !== undefined && data.options.center[1] !== undefined) {\n this.options.center = new L.LatLng(data.options.center[0].toFixed(10), data.options.center[1].toFixed(10));\n }\n if (data.options.style) {\n delete data.options.tiles;\n }\n delete data.options;\n this.data = data;\n\n return this.renderMap();\n }\n return null;\n }\n\n private renderMap(): L.Map | null {\n if (!this.data) {\n return null;\n }\n\n const map = L.map(this.id, {minZoom: this.options.minZoom, maxZoom: this.options.maxZoom, scrollWheelZoom: this.options.scrollWheelZoom, zoomControl: false});\n map.attributionControl.setPrefix(this.options.attributionPrefix);\n map.attributionControl.addAttribution(this.options.attribution);\n\n if (this.options.style) {\n // Vector tiles\n L.maplibreGL({style: this.options.style}).addTo(map);\n } else {\n // Raster tiles\n L.tileLayer(this.options.tiles, {detectRetina: false, minZoom: this.options.minZoom, maxZoom: this.options.maxZoom}).addTo(map);\n }\n\n if (this.options.controls) {\n // Custom zoom control\n const zoomControl = L.control.zoom({\n zoomInText: '',\n zoomOutText: '',\n zoomInTitle: this.lll('zoomIn.title'),\n zoomOutTitle: this.lll('zoomOut.title'),\n position: 'topright'\n });\n zoomControl.addTo(map);\n\n // Reset view control\n const resetViewControl = new L.Control({ position: 'topright' });\n resetViewControl.onAdd = () => {\n const container = L.DomUtil.create('div', 'leaflet-control-resetview leaflet-control leaflet-bar');\n\n const button = L.DomUtil.create('a', 'leaflet-control-resetview-reset leaflet-disabled', container);\n let buttonTitle = this.lll('resetView.title');\n button.href = '#';\n button.title = buttonTitle;\n button.setAttribute('role', 'button');\n button.setAttribute('aria-label', buttonTitle);\n button.setAttribute('aria-disabled', 'true');\n\n button.addEventListener('click', (event) => {\n event.preventDefault();\n event.stopPropagation();\n if (this.map && button.getAttribute('aria-disabled') !== 'true') {\n // Note: setView does sometimes 'round' the given LatLng :/\n this.map.setView(this.options.center, this.options.zoom, {animate: true, duration: .15});\n }\n });\n\n return container;\n };\n resetViewControl.addTo(map);\n this.resetViewControl = resetViewControl;\n }\n\n if (this.options.bbox && this.options.bbox.length === 4) {\n const corner1 = L.latLng(this.options.bbox[0], this.options.bbox[1]),\n corner2 = L.latLng(this.options.bbox[2], this.options.bbox[3]),\n mapBounds = L.latLngBounds(corner1, corner2);\n this.options.center = mapBounds.getCenter();\n this.options.zoom = map.getBoundsZoom(mapBounds);\n this.options.fitBounds = false;\n }\n\n if (this.data.features.length === 1) {\n // Single marker (centered by API)\n const feature = new MapFeature(this.data.features[0]);\n const marker = this.getMarker(feature).addTo(map);\n if (feature.properties && feature.properties['open-popup']) {\n marker.openPopup();\n }\n } else {\n // Multiple markers\n const markerCluster = new MarkerClusterGroup({ showCoverageOnHover: false });\n this.data.features.forEach((featureData: object) => {\n const feature = new MapFeature(featureData);\n if (feature.geometry.type && feature.geometry.type === 'Point') {\n const marker = this.getMarker(feature);\n if (marker.getLatLng().lat !== 0 && marker.getLatLng().lng !== 0) {\n markerCluster.addLayer(marker);\n }\n }\n });\n\n // Zoom to map bounds (if bounds were not set by options)\n if (this.options.fitBounds) {\n const markerBounds = markerCluster.getBounds().pad(.05);\n this.options.center = markerBounds.getCenter();\n this.options.zoom = map.getBoundsZoom(markerBounds);\n }\n\n map.addLayer(markerCluster);\n }\n\n // Re-enable reset view button on move\n map.addEventListener('moveend', () => {\n this.toggleResetViewButton();\n });\n\n // Finally set the view (center/zoom)\n map.setView(this.options.center, this.options.zoom, {animate: false});\n return map;\n }\n\n private getMarker(feature: MapFeature): L.Marker {\n const size = (feature.properties['marker-size'] === 'large') ? 'large' : 'medium';\n const params = new URLSearchParams({'marker-size': size});\n ['fill', 'fill-opacity', 'stroke', 'stroke-opacity'].forEach(function(property) {\n if (feature.properties[property]) {\n params.append(property, feature.properties[property]);\n }\n });\n const iconUrl = '/api/map/marker' + '?' + params.toString();\n\n const markerIcon = (size === 'medium') ? new MediumMapIcon({iconUrl: iconUrl}) : new LargeMapIcon({iconUrl: iconUrl});\n let marker = new L.Marker(feature.geometry.coordinates, {icon: markerIcon, title: feature.properties.title});\n\n let tooltipContent = this.renderTooltipContent(feature);\n if (tooltipContent !== '') {\n marker.bindTooltip(tooltipContent,{permanent: true, direction: 'bottom', className: 'leaflet-place-label leaflet-place-label--' + size, offset: [0, -38]}).openTooltip();\n }\n\n const popupContent = this.renderPopupContent(feature);\n if (popupContent !== '') {\n marker.bindPopup(popupContent);\n }\n\n return marker;\n }\n\n private renderPopupContent(feature: MapFeature): string {\n let content = '';\n if (feature.type && feature.type === 'Feature') {\n if (feature.properties.title && feature.properties.title.trim() !== '') {\n content = '' + feature.properties.title + ''\n }\n\n // @todo: Add type specific popup rendering\n // Organization\n if (feature.properties.type && feature.properties.type === 'Organization') {\n if (feature.properties.placeType !== 9 && this.placeTypes[feature.properties.placeType]) {\n content = content + '

' + this.escape(this.placeTypes[feature.properties.placeType]) + '

';\n }\n if (feature.properties.address) {\n let address = this.escape(feature.properties.address);\n if (feature.properties.country && feature.properties.country !== 'Österreich') {\n address = address + '
' + this.escape(feature.properties.country);\n }\n content = content + '

' + address + '

';\n }\n }\n\n if (feature.properties.count && feature.properties.count > 0) {\n content = content + '

' + feature.properties.count + ' Opfer

';\n }\n if (feature.properties.url) {\n content = content + '

Details

';\n }\n }\n return content;\n }\n\n private renderTooltipContent(feature: MapFeature): string {\n let content = '';\n if (feature.type && feature.type === 'Feature') {\n let count = '';\n let label = '';\n if (feature.properties.count) {\n count = (feature.properties.count > 99) ? '++' : feature.properties.count;\n }\n if (feature.properties.shortTitle) {\n label = feature.properties.shortTitle;\n } else if (feature.properties.title) {\n label = feature.properties.title;\n }\n // @todo: Add type specific tooltip (label) rendering\n // Organization\n if (feature.properties.type && feature.properties.type === 'Organization') {\n if (feature.properties.placeType !== undefined && feature.properties.placeType !== 9) {\n label = '';\n }\n }\n // Place\n if (feature.properties.type && feature.properties.type === 'Place') {\n label = '';\n }\n content = '' + this.escape(count) + '' + this.escape(label) + '';\n }\n return content;\n }\n\n private between(x: any, min: any, max: any): boolean {\n try {\n x = x * 1;\n min = min * 1;\n max = max * 1;\n return x >= min && x <= max;\n } catch (e) {}\n return false;\n }\n private escape(value: any) {\n try {\n value = value.toString();\n return value.replace(/&/g, \"&\").replace(/>/g, \">\").replace(/\n//\nexport class MapFeature\n{\n public type: string = 'Feature';\n public id: string = '';\n public geometry: { [key: string]: any };\n public properties: { [key: string]: any };\n\n constructor (featureData: { [key: string]: any }) {\n this.id = featureData.id;\n delete featureData.id;\n this.geometry = featureData.geometry;\n delete featureData.geometry;\n this.properties = featureData.properties;\n }\n}\n","//\n// This file is part of the TYPO3 CMS-based extension \"memorial\".\n// (c) Earlybird GmbH \n//\nimport { Icon, IconOptions } from 'leaflet';\n\nexport class LargeMapIcon extends Icon {\n // Icons (Markers) should at least of size 48x48 px (Lighthouse; 24px axe/SC 2.5.8)\n // the actual size of the image is defined via CSS using `leaflet-marker-icon--*`.\n\n constructor(options: IconOptions) {\n options.iconSize = [48, 48]; // 36x40\n options.iconAnchor = [24, 38]; // '18, 36' for 36x40\n options.popupAnchor = [0, -28]; // '0, -28' for 36x40\n options.className = 'leaflet-marker-icon--large';\n super(options);\n }\n}\n\nexport class MediumMapIcon extends Icon {\n constructor(options: IconOptions) {\n options.iconSize = [48, 48]; // 28x32\n options.iconAnchor = [24, 35]; // '24, 44' for 28x32\n options.popupAnchor = [0, -19]; // '0, -19' for 28x32\n options.className = 'leaflet-marker-icon--medium';\n super(options);\n }\n}\n","module.exports = __WEBPACK_EXTERNAL_MODULE__109__;","module.exports = __WEBPACK_EXTERNAL_MODULE__698__;","module.exports = __WEBPACK_EXTERNAL_MODULE__207__;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(730);\n"],"names":["root","factory","exports","module","require","define","amd","window","__WEBPACK_EXTERNAL_MODULE__109__","__WEBPACK_EXTERNAL_MODULE__698__","__WEBPACK_EXTERNAL_MODULE__207__","document","addEventListener","querySelectorAll","forEach","e","constructor","targetElement","data","labels","en","de","language","map","options","attribution","attributionPrefix","center","L","LatLng","controls","fitBounds","maxZoom","minZoom","scrollWheelZoom","tiles","zoom","placeTypes","resetViewControl","container","getElementById","HTMLElement","Error","id","trim","length","this","dataSource","getAttribute","src","initMap","then","toggleResetViewButton","response","fetch","json","type","Array","isArray","features","Object","entries","key","value","between","undefined","toFixed","style","renderMap","zoomControl","attributionControl","setPrefix","addAttribution","maplibreGL","addTo","tileLayer","detectRetina","control","zoomInText","zoomOutText","zoomInTitle","lll","zoomOutTitle","position","Control","onAdd","DomUtil","create","button","buttonTitle","href","title","setAttribute","event","preventDefault","stopPropagation","setView","animate","duration","bbox","corner1","latLng","corner2","mapBounds","latLngBounds","getCenter","getBoundsZoom","feature","MapFeature","marker","getMarker","properties","openPopup","markerCluster","MarkerClusterGroup","showCoverageOnHover","featureData","geometry","getLatLng","lat","lng","addLayer","markerBounds","getBounds","pad","size","params","URLSearchParams","property","append","iconUrl","toString","markerIcon","MediumMapIcon","LargeMapIcon","Marker","coordinates","icon","tooltipContent","renderTooltipContent","bindTooltip","permanent","direction","className","offset","openTooltip","popupContent","renderPopupContent","bindPopup","content","placeType","escape","address","country","count","url","encodeURI","label","shortTitle","x","min","max","replace","isCentered","getZoom","precision","getContainer","getElementsByClassName","classList","add","remove","Icon","iconSize","iconAnchor","popupAnchor","super","__webpack_module_cache__","__webpack_exports__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","call"],"sourceRoot":""}