From 1da71ebe15bd0244bd1753707c6bc00d20285949 Mon Sep 17 00:00:00 2001 From: Stefan Froemken Date: Thu, 29 Feb 2024 11:07:12 +0100 Subject: [PATCH 1/8] Add object merge with override for GM and OSM for settings --- .../Private/Build/JavaScript/GoogleMaps2.js | 39 +- .../Build/JavaScript/OpenStreetMap2.js | 39 +- Resources/Private/Build/README.md | 2 +- Resources/Private/Build/package-lock.json | 3793 +++++++++++++++-- Resources/Private/Build/package.json | 1 + .../Public/JavaScript/GoogleMaps2.min.js | 4 +- .../Public/JavaScript/GoogleMaps2.min.js.map | 2 +- .../Public/JavaScript/OpenStreetMap2.min.js | 2 +- .../JavaScript/OpenStreetMap2.min.js.map | 2 +- 9 files changed, 3537 insertions(+), 347 deletions(-) diff --git a/Resources/Private/Build/JavaScript/GoogleMaps2.js b/Resources/Private/Build/JavaScript/GoogleMaps2.js index a7229b03..54ba3610 100644 --- a/Resources/Private/Build/JavaScript/GoogleMaps2.js +++ b/Resources/Private/Build/JavaScript/GoogleMaps2.js @@ -665,9 +665,46 @@ function initMap () { const environment = typeof element.dataset.environment !== 'undefined' ? element.dataset.environment : '{}'; const override = typeof element.dataset.override !== 'undefined' ? element.dataset.override : '{}'; + // Pass in the objects to merge as arguments. + // For a deep extend, set the first argument to `true`. + const extend = () => { + let extended = {}; + let deep = false; + let i = 0; + let length = arguments.length; + + // Check for deep merge + if (Object.prototype.toString.call(arguments[0]) === '[object Boolean]') { + deep = arguments[0]; + i++; + } + + // Merge the object into the extended object + const merge = function (obj) { + for ( var prop in obj ) { + if ( Object.prototype.hasOwnProperty.call( obj, prop ) ) { + // If deep merge and property is an object, merge properties + if ( deep && Object.prototype.toString.call(obj[prop]) === '[object Object]' ) { + extended[prop] = extend( true, extended[prop], obj[prop] ); + } else { + extended[prop] = obj[prop]; + } + } + } + }; + + // Loop through each object and conduct a merge + for ( ; i < length; i++ ) { + var obj = arguments[i]; + merge(obj); + } + + return extended; + }; + maps2GoogleMaps.push(new GoogleMaps2( element, - {...JSON.parse(environment), ...JSON.parse(override)} + extend(JSON.parse(environment), JSON.parse(override)) )); }); diff --git a/Resources/Private/Build/JavaScript/OpenStreetMap2.js b/Resources/Private/Build/JavaScript/OpenStreetMap2.js index 53b7a69e..63b4872d 100644 --- a/Resources/Private/Build/JavaScript/OpenStreetMap2.js +++ b/Resources/Private/Build/JavaScript/OpenStreetMap2.js @@ -549,8 +549,45 @@ document.querySelectorAll(".maps2").forEach((element) => { const environment = typeof element.dataset.environment !== 'undefined' ? element.dataset.environment : '{}'; const override = typeof element.dataset.override !== 'undefined' ? element.dataset.override : '{}'; + // Pass in the objects to merge as arguments. + // For a deep extend, set the first argument to `true`. + const extend = () => { + let extended = {}; + let deep = false; + let i = 0; + let length = arguments.length; + + // Check for deep merge + if (Object.prototype.toString.call(arguments[0]) === '[object Boolean]') { + deep = arguments[0]; + i++; + } + + // Merge the object into the extended object + const merge = function (obj) { + for ( var prop in obj ) { + if ( Object.prototype.hasOwnProperty.call( obj, prop ) ) { + // If deep merge and property is an object, merge properties + if ( deep && Object.prototype.toString.call(obj[prop]) === '[object Object]' ) { + extended[prop] = extend( true, extended[prop], obj[prop] ); + } else { + extended[prop] = obj[prop]; + } + } + } + }; + + // Loop through each object and conduct a merge + for ( ; i < length; i++ ) { + var obj = arguments[i]; + merge(obj); + } + + return extended; + }; + maps2OpenStreetMaps.push(new OpenStreetMap2( element, - {...JSON.parse(environment), ...JSON.parse(override)} + extend(true, JSON.parse(environment), JSON.parse(override)) )); }); diff --git a/Resources/Private/Build/README.md b/Resources/Private/Build/README.md index b788e365..d3322c5b 100644 --- a/Resources/Private/Build/README.md +++ b/Resources/Private/Build/README.md @@ -35,5 +35,5 @@ Follow these steps to build fresh JS files: the `Resources/Public/JavaScript` folder: ``` - gulp + ./node_modules/.bin/gulp ``` diff --git a/Resources/Private/Build/package-lock.json b/Resources/Private/Build/package-lock.json index 92d71724..738a3ff1 100644 --- a/Resources/Private/Build/package-lock.json +++ b/Resources/Private/Build/package-lock.json @@ -12,6 +12,7 @@ "@types/geojson": "^7946.0.13", "@types/leaflet": "^1.9.8", "@types/leaflet-editable": "^1.2.6", + "gulp": "^4.0.2", "gulp-concat": "^2.6.1", "gulp-sourcemaps": "^3.0.0", "gulp-uglify": "^3.0.2", @@ -107,480 +108,612 @@ "node": ">=0.4.0" } }, - "node_modules/array-each": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz", - "integrity": "sha512-zHjL5SZa68hkKHBFBK6DJCTtr9sfTCPCaph/L7tMSLcTFgy+zX7E+6q5UArbtOtMBCtxdICpfTCspRse+ywyXA==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/assign-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", - "integrity": "sha512-Q+JC7Whu8HhmTdBph/Tq59IoRtoy6KAm5zzPv00WdujX82lbAL8K7WVjne7vdCsAmbF4AYaDOPyO3k0kl8qIrw==", + "node_modules/ansi-colors": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-1.1.0.tgz", + "integrity": "sha512-SFKX67auSNoVR38N3L+nvsPjOE0bybKTYbkf5tRvushrAPQ9V75huw0ZxBkKVeRU9kqH3d6HA4xTckbwZ4ixmA==", + "dependencies": { + "ansi-wrap": "^0.1.0" + }, "engines": { "node": ">=0.10.0" } }, - "node_modules/atob": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", - "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", - "bin": { - "atob": "bin/atob.js" + "node_modules/ansi-gray": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ansi-gray/-/ansi-gray-0.1.1.tgz", + "integrity": "sha512-HrgGIZUl8h2EHuZaU9hTR/cU5nhKxpVE1V6kdGsQ8e4zirElJ5fvtfc8N7Q1oq1aatO275i8pUFUCpNWCAnVWw==", + "dependencies": { + "ansi-wrap": "0.1.0" }, "engines": { - "node": ">= 4.5.0" + "node": ">=0.10.0" } }, - "node_modules/clone": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", - "integrity": "sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==", + "node_modules/ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", "engines": { - "node": ">=0.8" + "node": ">=0.10.0" } }, - "node_modules/clone-buffer": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/clone-buffer/-/clone-buffer-1.0.0.tgz", - "integrity": "sha512-KLLTJWrvwIP+OPfMn0x2PheDEP20RPUcGXj/ERegTgdmPEZylALQldygiqrPPu8P45uNuPs7ckmReLY6v/iA5g==", + "node_modules/ansi-wrap": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/ansi-wrap/-/ansi-wrap-0.1.0.tgz", + "integrity": "sha512-ZyznvL8k/FZeQHr2T6LzcJ/+vBApDnMNZvfVFy3At0knswWd6rJ3/0Hhmpu8oqa6C92npmozs890sX9Dl6q+Qw==", "engines": { - "node": ">= 0.10" + "node": ">=0.10.0" } }, - "node_modules/clone-stats": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-1.0.0.tgz", - "integrity": "sha512-au6ydSpg6nsrigcZ4m8Bc9hxjeW+GJ8xh5G3BJCMt4WXe1H10UNaVOamqQTmrx1kjVuxAHIQSNU6hY4Nsn9/ag==" - }, - "node_modules/cloneable-readable": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/cloneable-readable/-/cloneable-readable-1.1.3.tgz", - "integrity": "sha512-2EF8zTQOxYq70Y4XKtorQupqF0m49MBz2/yf5Bj+MHjvpG3Hy7sImifnqD6UA+TKYxeSV+u6qqQPawN5UvnpKQ==", + "node_modules/anymatch": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", + "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", "dependencies": { - "inherits": "^2.0.1", - "process-nextick-args": "^2.0.0", - "readable-stream": "^2.3.5" + "micromatch": "^3.1.4", + "normalize-path": "^2.1.1" } }, - "node_modules/concat-with-sourcemaps": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/concat-with-sourcemaps/-/concat-with-sourcemaps-1.1.0.tgz", - "integrity": "sha512-4gEjHJFT9e+2W/77h/DS5SGUgwDaOwprX8L/gl5+3ixnzkVJJsZWDSelmN3Oilw3LNDZjZV0yqH1hLG3k6nghg==", + "node_modules/anymatch/node_modules/normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha512-3pKJwH184Xo/lnH6oyP1q2pMd7HcypqqmRs91/6/i2CGtWwIKGCkOOMTm/zXbgTEWHw1uNpNi/igc3ePOYHb6w==", "dependencies": { - "source-map": "^0.6.1" + "remove-trailing-separator": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" } }, - "node_modules/concat-with-sourcemaps/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "node_modules/append-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/append-buffer/-/append-buffer-1.0.2.tgz", + "integrity": "sha512-WLbYiXzD3y/ATLZFufV/rZvWdZOs+Z/+5v1rBZ463Jn398pa6kcde27cvozYnBoxXblGZTFfoPpsaEw0orU5BA==", + "dependencies": { + "buffer-equal": "^1.0.0" + }, "engines": { "node": ">=0.10.0" } }, - "node_modules/convert-source-map": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", - "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==" + "node_modules/archy": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", + "integrity": "sha512-Xg+9RwCg/0p32teKdGMPTPnVXKD0w3DfHnFTficozsAgsvq2XenPJq/MYpzzQ/v8zrOyJn6Ds39VA4JIDwFfqw==" }, - "node_modules/core-util-is": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", - "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" + "node_modules/arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha512-YVIQ82gZPGBebQV/a8dar4AitzCQs0jjXwMPZllpXMaGjXPYVUawSxQrRsjhjupyVxEvbHgUmIhKVlND+j02kA==", + "engines": { + "node": ">=0.10.0" + } }, - "node_modules/css": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/css/-/css-3.0.0.tgz", - "integrity": "sha512-DG9pFfwOrzc+hawpmqX/dHYHJG+Bsdb0klhyi1sDneOgGOXy9wQIC8hzyVp1e4NRYDBdxcylvywPkkXCHAzTyQ==", + "node_modules/arr-filter": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/arr-filter/-/arr-filter-1.1.2.tgz", + "integrity": "sha512-A2BETWCqhsecSvCkWAeVBFLH6sXEUGASuzkpjL3GR1SlL/PWL6M3J8EAAld2Uubmh39tvkJTqC9LeLHCUKmFXA==", "dependencies": { - "inherits": "^2.0.4", - "source-map": "^0.6.1", - "source-map-resolve": "^0.6.0" + "make-iterator": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" } }, - "node_modules/css/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "node_modules/arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", "engines": { "node": ">=0.10.0" } }, - "node_modules/css/node_modules/source-map-resolve": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.6.0.tgz", - "integrity": "sha512-KXBr9d/fO/bWo97NXsPIAW1bFSBOuCnjbNTBMO7N59hsv5i9yzRDfcYwwt0l04+VqnKC+EwzvJZIP/qkuMgR/w==", - "deprecated": "See https://github.com/lydell/source-map-resolve#deprecated", + "node_modules/arr-map": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/arr-map/-/arr-map-2.0.2.tgz", + "integrity": "sha512-tVqVTHt+Q5Xb09qRkbu+DidW1yYzz5izWS2Xm2yFm7qJnmUfz4HPzNxbHkdRJbz2lrqI7S+z17xNYdFcBBO8Hw==", "dependencies": { - "atob": "^2.1.2", - "decode-uri-component": "^0.2.0" + "make-iterator": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" } }, - "node_modules/d": { + "node_modules/arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha512-sKpyeERZ02v1FeCZT8lrfJq5u6goHCtpTAzPwJYe7c8SPFOboNjNg1vz2L4VTn9T4PQxEx13TbXLmYUcS6Ug7Q==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/array-each": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", - "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", - "dependencies": { - "es5-ext": "^0.10.50", - "type": "^1.0.1" + "resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz", + "integrity": "sha512-zHjL5SZa68hkKHBFBK6DJCTtr9sfTCPCaph/L7tMSLcTFgy+zX7E+6q5UArbtOtMBCtxdICpfTCspRse+ywyXA==", + "engines": { + "node": ">=0.10.0" } }, - "node_modules/debug-fabulous": { + "node_modules/array-initial": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/debug-fabulous/-/debug-fabulous-1.1.0.tgz", - "integrity": "sha512-GZqvGIgKNlUnHUPQhepnUZFIMoi3dgZKQBzKDeL2g7oJF9SNAji/AAu36dusFUas0O+pae74lNeoIPHqXWDkLg==", + "resolved": "https://registry.npmjs.org/array-initial/-/array-initial-1.1.0.tgz", + "integrity": "sha512-BC4Yl89vneCYfpLrs5JU2aAu9/a+xWbeKhvISg9PT7eWFB9UlRvI+rKEtk6mgxWr3dSkk9gQ8hCrdqt06NXPdw==", "dependencies": { - "debug": "3.X", - "memoizee": "0.4.X", - "object-assign": "4.X" + "array-slice": "^1.0.0", + "is-number": "^4.0.0" + }, + "engines": { + "node": ">=0.10.0" } }, - "node_modules/debug-fabulous/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dependencies": { - "ms": "^2.1.1" + "node_modules/array-initial/node_modules/is-number": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", + "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", + "engines": { + "node": ">=0.10.0" } }, - "node_modules/debug-fabulous/node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + "node_modules/array-last": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/array-last/-/array-last-1.3.0.tgz", + "integrity": "sha512-eOCut5rXlI6aCOS7Z7kCplKRKyiFQ6dHFBem4PwlwKeNFk2/XxTrhRh5T9PyaEWGy/NHTZWbY+nsZlNFJu9rYg==", + "dependencies": { + "is-number": "^4.0.0" + }, + "engines": { + "node": ">=0.10.0" + } }, - "node_modules/decode-uri-component": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz", - "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==", + "node_modules/array-last/node_modules/is-number": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", + "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", "engines": { - "node": ">=0.10" + "node": ">=0.10.0" } }, - "node_modules/detect-newline": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-2.1.0.tgz", - "integrity": "sha512-CwffZFvlJffUg9zZA0uqrjQayUTC8ob94pnr5sFwaVv3IOmkfUHcWH+jXaQK3askE51Cqe8/9Ql/0uXNwqZ8Zg==", + "node_modules/array-slice": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.1.0.tgz", + "integrity": "sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w==", "engines": { "node": ">=0.10.0" } }, - "node_modules/es5-ext": { - "version": "0.10.62", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.62.tgz", - "integrity": "sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA==", - "hasInstallScript": true, + "node_modules/array-sort": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-sort/-/array-sort-1.0.0.tgz", + "integrity": "sha512-ihLeJkonmdiAsD7vpgN3CRcx2J2S0TiYW+IS/5zHBI7mKUq3ySvBdzzBfD236ubDBQFiiyG3SWCPc+msQ9KoYg==", "dependencies": { - "es6-iterator": "^2.0.3", - "es6-symbol": "^3.1.3", - "next-tick": "^1.1.0" + "default-compare": "^1.0.0", + "get-value": "^2.0.6", + "kind-of": "^5.0.2" }, "engines": { - "node": ">=0.10" + "node": ">=0.10.0" } }, - "node_modules/es6-iterator": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", - "integrity": "sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==", - "dependencies": { - "d": "1", - "es5-ext": "^0.10.35", - "es6-symbol": "^3.1.1" + "node_modules/array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha512-SleRWjh9JUud2wH1hPs9rZBZ33H6T9HOiL0uwGnGx9FpE6wKGyfWugmbkEOIs6qWrZhg0LWeLziLrEwQJhs5mQ==", + "engines": { + "node": ">=0.10.0" } }, - "node_modules/es6-symbol": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", - "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", - "dependencies": { - "d": "^1.0.1", - "ext": "^1.1.2" + "node_modules/assign-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha512-Q+JC7Whu8HhmTdBph/Tq59IoRtoy6KAm5zzPv00WdujX82lbAL8K7WVjne7vdCsAmbF4AYaDOPyO3k0kl8qIrw==", + "engines": { + "node": ">=0.10.0" } }, - "node_modules/es6-weak-map": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.3.tgz", - "integrity": "sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==", + "node_modules/async-done": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/async-done/-/async-done-1.3.2.tgz", + "integrity": "sha512-uYkTP8dw2og1tu1nmza1n1CMW0qb8gWWlwqMmLb7MhBVs4BXrFziT6HXUd+/RlRA/i4H9AkofYloUbs1fwMqlw==", "dependencies": { - "d": "1", - "es5-ext": "^0.10.46", - "es6-iterator": "^2.0.3", - "es6-symbol": "^3.1.1" + "end-of-stream": "^1.1.0", + "once": "^1.3.2", + "process-nextick-args": "^2.0.0", + "stream-exhaust": "^1.0.1" + }, + "engines": { + "node": ">= 0.10" } }, - "node_modules/event-emitter": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", - "integrity": "sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA==", + "node_modules/async-each": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.6.tgz", + "integrity": "sha512-c646jH1avxr+aVpndVMeAfYw7wAa6idufrlN3LPA4PmKS0QEGp6PIC9nwz0WQkkvBGAMEki3pFdtxaF39J9vvg==", + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ] + }, + "node_modules/async-settle": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/async-settle/-/async-settle-1.0.0.tgz", + "integrity": "sha512-VPXfB4Vk49z1LHHodrEQ6Xf7W4gg1w0dAPROHngx7qgDjqmIQ+fXmwgGXTW/ITLai0YLSvWepJOP9EVpMnEAcw==", "dependencies": { - "d": "1", - "es5-ext": "~0.10.14" + "async-done": "^1.2.2" + }, + "engines": { + "node": ">= 0.10" } }, - "node_modules/ext": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/ext/-/ext-1.7.0.tgz", - "integrity": "sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==", - "dependencies": { - "type": "^2.7.2" + "node_modules/atob": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", + "bin": { + "atob": "bin/atob.js" + }, + "engines": { + "node": ">= 4.5.0" } }, - "node_modules/ext/node_modules/type": { - "version": "2.7.2", - "resolved": "https://registry.npmjs.org/type/-/type-2.7.2.tgz", - "integrity": "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==" - }, - "node_modules/glogg": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/glogg/-/glogg-1.0.2.tgz", - "integrity": "sha512-5mwUoSuBk44Y4EshyiqcH95ZntbDdTQqA3QYSrxmzj28Ai0vXBGMH1ApSANH14j2sIRtqCEyg6PfsuP7ElOEDA==", + "node_modules/bach": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/bach/-/bach-1.2.0.tgz", + "integrity": "sha512-bZOOfCb3gXBXbTFXq3OZtGR88LwGeJvzu6szttaIzymOTS4ZttBNOWSv7aLZja2EMycKtRYV0Oa8SNKH/zkxvg==", "dependencies": { - "sparkles": "^1.0.0" + "arr-filter": "^1.1.1", + "arr-flatten": "^1.0.1", + "arr-map": "^2.0.0", + "array-each": "^1.0.0", + "array-initial": "^1.0.0", + "array-last": "^1.1.1", + "async-done": "^1.2.2", + "async-settle": "^1.0.0", + "now-and-later": "^2.0.0" }, "engines": { "node": ">= 0.10" } }, - "node_modules/graceful-fs": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, - "node_modules/gulp-concat": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/gulp-concat/-/gulp-concat-2.6.1.tgz", - "integrity": "sha512-a2scActrQrDBpBbR3WUZGyGS1JEPLg5PZJdIa7/Bi3GuKAmPYDK6SFhy/NZq5R8KsKKFvtfR0fakbUCcKGCCjg==", + "node_modules/base": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", "dependencies": { - "concat-with-sourcemaps": "^1.0.0", - "through2": "^2.0.0", - "vinyl": "^2.0.0" + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" }, "engines": { - "node": ">= 0.10" + "node": ">=0.10.0" } }, - "node_modules/gulp-sourcemaps": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/gulp-sourcemaps/-/gulp-sourcemaps-3.0.0.tgz", - "integrity": "sha512-RqvUckJkuYqy4VaIH60RMal4ZtG0IbQ6PXMNkNsshEGJ9cldUPRb/YCgboYae+CLAs1HQNb4ADTKCx65HInquQ==", + "node_modules/base/node_modules/define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA==", "dependencies": { - "@gulp-sourcemaps/identity-map": "^2.0.1", - "@gulp-sourcemaps/map-sources": "^1.0.0", - "acorn": "^6.4.1", - "convert-source-map": "^1.0.0", - "css": "^3.0.0", - "debug-fabulous": "^1.0.0", - "detect-newline": "^2.0.0", - "graceful-fs": "^4.0.0", - "source-map": "^0.6.0", - "strip-bom-string": "^1.0.0", - "through2": "^2.0.0" + "is-descriptor": "^1.0.0" }, "engines": { - "node": ">= 6" + "node": ">=0.10.0" } }, - "node_modules/gulp-sourcemaps/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "node_modules/binary-extensions": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", + "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==", "engines": { "node": ">=0.10.0" } }, - "node_modules/gulp-uglify": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/gulp-uglify/-/gulp-uglify-3.0.2.tgz", - "integrity": "sha512-gk1dhB74AkV2kzqPMQBLA3jPoIAPd/nlNzP2XMDSG8XZrqnlCiDGAqC+rZOumzFvB5zOphlFh6yr3lgcAb/OOg==", + "node_modules/bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "optional": true, "dependencies": { - "array-each": "^1.0.1", - "extend-shallow": "^3.0.2", - "gulplog": "^1.0.0", - "has-gulplog": "^0.1.0", - "isobject": "^3.0.1", - "make-error-cause": "^1.1.1", - "safe-buffer": "^5.1.2", - "through2": "^2.0.0", - "uglify-js": "^3.0.5", - "vinyl-sourcemaps-apply": "^0.2.0" + "file-uri-to-path": "1.0.0" } }, - "node_modules/gulp-uglify/node_modules/extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==", + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dependencies": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dependencies": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" }, "engines": { "node": ">=0.10.0" } }, - "node_modules/gulp-uglify/node_modules/is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "node_modules/braces/node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", "dependencies": { - "is-plain-object": "^2.0.4" + "is-extendable": "^0.1.0" }, "engines": { "node": ">=0.10.0" } }, - "node_modules/gulp-uglify/node_modules/is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dependencies": { - "isobject": "^3.0.1" - }, + "node_modules/braces/node_modules/is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", "engines": { "node": ">=0.10.0" } }, - "node_modules/gulplog": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/gulplog/-/gulplog-1.0.0.tgz", - "integrity": "sha512-hm6N8nrm3Y08jXie48jsC55eCZz9mnb4OirAStEk2deqeyhXU3C1otDVh+ccttMuc1sBi6RX6ZJ720hs9RCvgw==", + "node_modules/buffer-equal": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buffer-equal/-/buffer-equal-1.0.1.tgz", + "integrity": "sha512-QoV3ptgEaQpvVwbXdSO39iqPQTCxSF7A5U99AxbHYqUdCizL/lH2Z0A2y6nbZucxMEOtNyZfG2s6gsVugGpKkg==", + "engines": { + "node": ">=0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==" + }, + "node_modules/cache-base": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", "dependencies": { - "glogg": "^1.0.0" + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" }, "engines": { - "node": ">= 0.10" + "node": ">=0.10.0" } }, - "node_modules/has-gulplog": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/has-gulplog/-/has-gulplog-0.1.0.tgz", - "integrity": "sha512-+F4GzLjwHNNDEAJW2DC1xXfEoPkRDmUdJ7CBYw4MpqtDwOnqdImJl7GWlpqx+Wko6//J8uKTnIe4wZSv7yCqmw==", + "node_modules/call-bind": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", "dependencies": { - "sparkles": "^1.0.0" + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" }, "engines": { - "node": ">= 0.10" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "node_modules/is-promise": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz", - "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==" + "node_modules/camelcase": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", + "integrity": "sha512-4nhGqUkc4BqbBBB4Q6zLuD7lzzrHYrjKGeYaEji/3tFR5VdJu9v+LilhGIVe8wxEJPPOeWo7eg8dwY13TZ1BNg==", + "engines": { + "node": ">=0.10.0" + } }, - "node_modules/isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" + "node_modules/chokidar": { + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz", + "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==", + "deprecated": "Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies", + "dependencies": { + "anymatch": "^2.0.0", + "async-each": "^1.0.1", + "braces": "^2.3.2", + "glob-parent": "^3.1.0", + "inherits": "^2.0.3", + "is-binary-path": "^1.0.0", + "is-glob": "^4.0.0", + "normalize-path": "^3.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.2.1", + "upath": "^1.1.1" + }, + "optionalDependencies": { + "fsevents": "^1.2.7" + } }, - "node_modules/isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", + "node_modules/class-utils": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "dependencies": { + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" + }, "engines": { "node": ">=0.10.0" } }, - "node_modules/leaflet": { - "version": "1.9.4", - "resolved": "https://registry.npmjs.org/leaflet/-/leaflet-1.9.4.tgz", - "integrity": "sha512-nxS1ynzJOmOlHp+iL3FyWqK89GtNL8U8rvlMOsQdTTssxZwCXh8N2NB3GDQOL+YR3XnWyZAxwQixURb+FA74PA==" - }, - "node_modules/leaflet-editable": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/leaflet-editable/-/leaflet-editable-1.2.0.tgz", - "integrity": "sha512-wG11JwpL8zqIbypTop6xCRGagMuWw68ihYu4uqrqc5Ep0wnEJeyob7NB2Rt5t74Oih4rwJ3OfwaGbzdowOGfYQ==" + "node_modules/class-utils/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } }, - "node_modules/leaflet.path.drag": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/leaflet.path.drag/-/leaflet.path.drag-0.0.6.tgz", - "integrity": "sha512-U6jp7sqX4kZss2FCm7bGPltOl8URWd+c4DPcRnEO9mYoZ1hfrteZ3XXVJ6zcEU8zxjnWeu1YywF08EDYbelmFg==" + "node_modules/class-utils/node_modules/is-descriptor": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.7.tgz", + "integrity": "sha512-C3grZTvObeN1xud4cRWl366OMXZTj0+HGyk4hvfpx4ZHt1Pb60ANSXqCK7pdOTeUQpRzECBSTphqvD7U+l22Eg==", + "dependencies": { + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + } }, - "node_modules/lru-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/lru-queue/-/lru-queue-0.1.0.tgz", - "integrity": "sha512-BpdYkt9EvGl8OfWHDQPISVpcl5xZthb+XPsbELj5AQXxIC8IriDZIQYjBJPEm5rS420sjZ0TLEzRcq5KdBhYrQ==", + "node_modules/cliui": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", + "integrity": "sha512-0yayqDxWQbqk3ojkYqUKqaAQ6AfNKeKWRNA8kR0WXzAsdHpP4BIaOmMAG87JGuO6qcobyW4GjxHd9PmhEd+T9w==", "dependencies": { - "es5-ext": "~0.10.2" + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wrap-ansi": "^2.0.0" } }, - "node_modules/make-error": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", - "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==" + "node_modules/clone": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", + "integrity": "sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==", + "engines": { + "node": ">=0.8" + } }, - "node_modules/make-error-cause": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/make-error-cause/-/make-error-cause-1.2.2.tgz", - "integrity": "sha512-4TO2Y3HkBnis4c0dxhAgD/jprySYLACf7nwN6V0HAHDx59g12WlRpUmFy1bRHamjGUEEBrEvCq6SUpsEE2lhUg==", - "dependencies": { - "make-error": "^1.2.0" + "node_modules/clone-buffer": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/clone-buffer/-/clone-buffer-1.0.0.tgz", + "integrity": "sha512-KLLTJWrvwIP+OPfMn0x2PheDEP20RPUcGXj/ERegTgdmPEZylALQldygiqrPPu8P45uNuPs7ckmReLY6v/iA5g==", + "engines": { + "node": ">= 0.10" } }, - "node_modules/memoizee": { - "version": "0.4.15", - "resolved": "https://registry.npmjs.org/memoizee/-/memoizee-0.4.15.tgz", - "integrity": "sha512-UBWmJpLZd5STPm7PMUlOw/TSy972M+z8gcyQ5veOnSDRREz/0bmpyTfKt3/51DhEBqCZQn1udM/5flcSPYhkdQ==", + "node_modules/clone-stats": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-1.0.0.tgz", + "integrity": "sha512-au6ydSpg6nsrigcZ4m8Bc9hxjeW+GJ8xh5G3BJCMt4WXe1H10UNaVOamqQTmrx1kjVuxAHIQSNU6hY4Nsn9/ag==" + }, + "node_modules/cloneable-readable": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/cloneable-readable/-/cloneable-readable-1.1.3.tgz", + "integrity": "sha512-2EF8zTQOxYq70Y4XKtorQupqF0m49MBz2/yf5Bj+MHjvpG3Hy7sImifnqD6UA+TKYxeSV+u6qqQPawN5UvnpKQ==", "dependencies": { - "d": "^1.0.1", - "es5-ext": "^0.10.53", - "es6-weak-map": "^2.0.3", - "event-emitter": "^0.3.5", - "is-promise": "^2.2.2", - "lru-queue": "^0.1.0", - "next-tick": "^1.1.0", - "timers-ext": "^0.1.7" + "inherits": "^2.0.1", + "process-nextick-args": "^2.0.0", + "readable-stream": "^2.3.5" } }, - "node_modules/next-tick": { + "node_modules/code-point-at": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz", - "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==" - }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha512-RpAVKQA5T63xEj6/giIbUEtZwJ4UFIc3ZtvEkiaUERylqe8xb5IvqcgOurZLahv93CLKfxcw5YI+DZcUBRyLXA==", "engines": { "node": ">=0.10.0" } }, - "node_modules/object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "node_modules/collection-map": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collection-map/-/collection-map-1.0.0.tgz", + "integrity": "sha512-5D2XXSpkOnleOI21TG7p3T0bGAsZ/XknZpKBmGYyluO8pw4zA3K8ZlrBIbC4FXg3m6z/RNFiUFfT2sQK01+UHA==", + "dependencies": { + "arr-map": "^2.0.2", + "for-own": "^1.0.0", + "make-iterator": "^1.0.0" + }, "engines": { "node": ">=0.10.0" } }, - "node_modules/picocolors": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz", - "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==" - }, - "node_modules/postcss": { - "version": "7.0.39", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz", - "integrity": "sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==", + "node_modules/collection-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", + "integrity": "sha512-lNkKvzEeMBBjUGHZ+q6z9pSJla0KWAQPvtzhEV9+iGyQYG+pBpl7xKDhxoNSOZH2hhv0v5k0y2yAM4o4SjoSkw==", "dependencies": { - "picocolors": "^0.2.1", - "source-map": "^0.6.1" + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" }, "engines": { - "node": ">=6.0.0" - }, + "node": ">=0.10.0" + } + }, + "node_modules/color-support": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", + "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", + "bin": { + "color-support": "bin.js" + } + }, + "node_modules/component-emitter": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.1.tgz", + "integrity": "sha512-T0+barUSQRTUQASh8bx02dl+DhF54GtIDY13Y3m9oWTklKbb3Wv974meRpeZ3lp1JpLVECWWNHC4vaG2XHXouQ==", "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/postcss/node_modules/source-map": { + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" + }, + "node_modules/concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "engines": [ + "node >= 0.8" + ], + "dependencies": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + } + }, + "node_modules/concat-with-sourcemaps": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/concat-with-sourcemaps/-/concat-with-sourcemaps-1.1.0.tgz", + "integrity": "sha512-4gEjHJFT9e+2W/77h/DS5SGUgwDaOwprX8L/gl5+3ixnzkVJJsZWDSelmN3Oilw3LNDZjZV0yqH1hLG3k6nghg==", + "dependencies": { + "source-map": "^0.6.1" + } + }, + "node_modules/concat-with-sourcemaps/node_modules/source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", @@ -588,30 +721,2192 @@ "node": ">=0.10.0" } }, - "node_modules/process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + "node_modules/convert-source-map": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", + "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==" }, - "node_modules/readable-stream": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", - "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" + "node_modules/copy-descriptor": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha512-XgZ0pFcakEUlbwQEVNg3+QAis1FyTL3Qel9FYy8pSkQqoG3PNoT0bOCQtOXcOkur21r2Eq2kI+IE+gsmAEVlYw==", + "engines": { + "node": ">=0.10.0" } }, - "node_modules/remove-trailing-separator": { + "node_modules/copy-props": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/copy-props/-/copy-props-2.0.5.tgz", + "integrity": "sha512-XBlx8HSqrT0ObQwmSzM7WE5k8FxTV75h1DX1Z3n6NhQ/UYYAvInWYmG06vFt7hQZArE2fuO62aihiWIVQwh1sw==", + "dependencies": { + "each-props": "^1.3.2", + "is-plain-object": "^5.0.0" + } + }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" + }, + "node_modules/css": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/css/-/css-3.0.0.tgz", + "integrity": "sha512-DG9pFfwOrzc+hawpmqX/dHYHJG+Bsdb0klhyi1sDneOgGOXy9wQIC8hzyVp1e4NRYDBdxcylvywPkkXCHAzTyQ==", + "dependencies": { + "inherits": "^2.0.4", + "source-map": "^0.6.1", + "source-map-resolve": "^0.6.0" + } + }, + "node_modules/css/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/css/node_modules/source-map-resolve": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.6.0.tgz", + "integrity": "sha512-KXBr9d/fO/bWo97NXsPIAW1bFSBOuCnjbNTBMO7N59hsv5i9yzRDfcYwwt0l04+VqnKC+EwzvJZIP/qkuMgR/w==", + "deprecated": "See https://github.com/lydell/source-map-resolve#deprecated", + "dependencies": { + "atob": "^2.1.2", + "decode-uri-component": "^0.2.0" + } + }, + "node_modules/d": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", + "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", + "dependencies": { + "es5-ext": "^0.10.50", + "type": "^1.0.1" + } + }, + "node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/debug-fabulous": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/debug-fabulous/-/debug-fabulous-1.1.0.tgz", + "integrity": "sha512-GZqvGIgKNlUnHUPQhepnUZFIMoi3dgZKQBzKDeL2g7oJF9SNAji/AAu36dusFUas0O+pae74lNeoIPHqXWDkLg==", + "dependencies": { + "debug": "3.X", + "memoizee": "0.4.X", + "object-assign": "4.X" + } + }, + "node_modules/debug-fabulous/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/debug-fabulous/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, + "node_modules/decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/decode-uri-component": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz", + "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==", + "engines": { + "node": ">=0.10" + } + }, + "node_modules/default-compare": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/default-compare/-/default-compare-1.0.0.tgz", + "integrity": "sha512-QWfXlM0EkAbqOCbD/6HjdwT19j7WCkMyiRhWilc4H9/5h/RzTF9gv5LYh1+CmDV5d1rki6KAWLtQale0xt20eQ==", + "dependencies": { + "kind-of": "^5.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/default-resolution": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/default-resolution/-/default-resolution-2.0.0.tgz", + "integrity": "sha512-2xaP6GiwVwOEbXCGoJ4ufgC76m8cj805jrghScewJC2ZDsb9U0b4BIrba+xt/Uytyd0HvQ6+WymSRTfnYj59GQ==", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/define-properties": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", + "dependencies": { + "define-data-property": "^1.0.1", + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "dependencies": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/detect-file": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz", + "integrity": "sha512-DtCOLG98P007x7wiiOmfI0fi3eIKyWiLTGJ2MDnVi/E04lWGbf+JzrRHMm0rgIIZJGtHpKpbVgLWHrv8xXpc3Q==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/detect-newline": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-2.1.0.tgz", + "integrity": "sha512-CwffZFvlJffUg9zZA0uqrjQayUTC8ob94pnr5sFwaVv3IOmkfUHcWH+jXaQK3askE51Cqe8/9Ql/0uXNwqZ8Zg==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/duplexify": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", + "integrity": "sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==", + "dependencies": { + "end-of-stream": "^1.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.0.0", + "stream-shift": "^1.0.0" + } + }, + "node_modules/each-props": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/each-props/-/each-props-1.3.2.tgz", + "integrity": "sha512-vV0Hem3zAGkJAyU7JSjixeU66rwdynTAa1vofCrSA5fEln+m67Az9CcnkVD776/fsN/UjIWmBDoNRS6t6G9RfA==", + "dependencies": { + "is-plain-object": "^2.0.1", + "object.defaults": "^1.1.0" + } + }, + "node_modules/each-props/node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dependencies": { + "once": "^1.4.0" + } + }, + "node_modules/error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "node_modules/es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "dependencies": { + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es5-ext": { + "version": "0.10.62", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.62.tgz", + "integrity": "sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA==", + "hasInstallScript": true, + "dependencies": { + "es6-iterator": "^2.0.3", + "es6-symbol": "^3.1.3", + "next-tick": "^1.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/es6-iterator": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==", + "dependencies": { + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" + } + }, + "node_modules/es6-symbol": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", + "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", + "dependencies": { + "d": "^1.0.1", + "ext": "^1.1.2" + } + }, + "node_modules/es6-weak-map": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.3.tgz", + "integrity": "sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==", + "dependencies": { + "d": "1", + "es5-ext": "^0.10.46", + "es6-iterator": "^2.0.3", + "es6-symbol": "^3.1.1" + } + }, + "node_modules/event-emitter": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", + "integrity": "sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA==", + "dependencies": { + "d": "1", + "es5-ext": "~0.10.14" + } + }, + "node_modules/expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha512-w/ozOKR9Obk3qoWeY/WDi6MFta9AoMR+zud60mdnbniMcBxRuFJyDt2LdX/14A1UABeqk+Uk+LDfUpvoGKppZA==", + "dependencies": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-brackets/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-brackets/node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-brackets/node_modules/is-descriptor": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.7.tgz", + "integrity": "sha512-C3grZTvObeN1xud4cRWl366OMXZTj0+HGyk4hvfpx4ZHt1Pb60ANSXqCK7pdOTeUQpRzECBSTphqvD7U+l22Eg==", + "dependencies": { + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/expand-brackets/node_modules/is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-tilde": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", + "integrity": "sha512-A5EmesHW6rfnZ9ysHQjPdJRni0SRar0tjtG5MNtm9n5TUvsYU8oozprtRD4AqHxcZWWlVuAmQo2nWKfN9oyjTw==", + "dependencies": { + "homedir-polyfill": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ext": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/ext/-/ext-1.7.0.tgz", + "integrity": "sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==", + "dependencies": { + "type": "^2.7.2" + } + }, + "node_modules/ext/node_modules/type": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/type/-/type-2.7.2.tgz", + "integrity": "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==" + }, + "node_modules/extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + }, + "node_modules/extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==", + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "dependencies": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/extglob/node_modules/define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA==", + "dependencies": { + "is-descriptor": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/extglob/node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/extglob/node_modules/is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fancy-log": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/fancy-log/-/fancy-log-1.3.3.tgz", + "integrity": "sha512-k9oEhlyc0FrVh25qYuSELjr8oxsCoc4/LEZfg2iJJrfEk/tZL9bCoJE47gqAvI2m/AUjluCS4+3I0eTx8n3AEw==", + "dependencies": { + "ansi-gray": "^0.1.1", + "color-support": "^1.1.3", + "parse-node-version": "^1.0.0", + "time-stamp": "^1.0.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/fast-levenshtein": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-1.1.4.tgz", + "integrity": "sha512-Ia0sQNrMPXXkqVFt6w6M1n1oKo3NfKs+mvaV811Jwir7vAk9a6PVV9VPYf6X3BU97QiLEmuW3uXH9u87zDFfdw==" + }, + "node_modules/file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", + "optional": true + }, + "node_modules/fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha512-VcpLTWqWDiTerugjj8e3+esbg+skS3M9e54UuR3iCeIDMXCLTsAH8hTSzDQU/X6/6t3eYkOKoZSef2PlU6U1XQ==", + "dependencies": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fill-range/node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fill-range/node_modules/is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha512-jvElSjyuo4EMQGoTwo1uJU5pQMwTW5lS1x05zzfJuTIyLR3zwO27LYrxNg+dlvKpGOuGy/MzBdXh80g0ve5+HA==", + "dependencies": { + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/findup-sync": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-3.0.0.tgz", + "integrity": "sha512-YbffarhcicEhOrm4CtrwdKBdCuz576RLdhJDsIfvNtxUuhdRet1qZcsMjqbePtAseKdAnDyM/IyXbu7PRPRLYg==", + "dependencies": { + "detect-file": "^1.0.0", + "is-glob": "^4.0.0", + "micromatch": "^3.0.4", + "resolve-dir": "^1.0.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/fined": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/fined/-/fined-1.2.0.tgz", + "integrity": "sha512-ZYDqPLGxDkDhDZBjZBb+oD1+j0rA4E0pXY50eplAAOPg2N/gUBSSk5IM1/QhPfyVo19lJ+CvXpqfvk+b2p/8Ng==", + "dependencies": { + "expand-tilde": "^2.0.2", + "is-plain-object": "^2.0.3", + "object.defaults": "^1.1.0", + "object.pick": "^1.2.0", + "parse-filepath": "^1.0.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/fined/node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/flagged-respawn": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-1.0.1.tgz", + "integrity": "sha512-lNaHNVymajmk0OJMBn8fVUAU1BtDeKIqKoVhk4xAALB57aALg6b4W0MfJ/cUE0g9YBXy5XhSlPIpYIJ7HaY/3Q==", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/flush-write-stream": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.1.1.tgz", + "integrity": "sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w==", + "dependencies": { + "inherits": "^2.0.3", + "readable-stream": "^2.3.6" + } + }, + "node_modules/for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/for-own": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", + "integrity": "sha512-0OABksIGrxKK8K4kynWkQ7y1zounQxP+CWnyclVwj81KW3vlLlGUx57DKGcP/LH216GzqnstnPocF16Nxs0Ycg==", + "dependencies": { + "for-in": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fragment-cache": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha512-GMBAbW9antB8iZRHLoGw0b3HANt57diZYFO/HL1JGIC1MjKrdmhxvrJbupnVvpys0zsz7yBApXdQyfepKly2kA==", + "dependencies": { + "map-cache": "^0.2.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fs-mkdirp-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-mkdirp-stream/-/fs-mkdirp-stream-1.0.0.tgz", + "integrity": "sha512-+vSd9frUnapVC2RZYfL3FCB2p3g4TBhaUmrsWlSudsGdnxIuUvBB2QM1VZeBtc49QFwrp+wQLrDs3+xxDgI5gQ==", + "dependencies": { + "graceful-fs": "^4.1.11", + "through2": "^2.0.3" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" + }, + "node_modules/fsevents": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz", + "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==", + "deprecated": "The v1 package contains DANGEROUS / INSECURE binaries. Upgrade to safe fsevents v2", + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "dependencies": { + "bindings": "^1.5.0", + "nan": "^2.12.1" + }, + "engines": { + "node": ">= 4.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-caller-file": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", + "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==" + }, + "node_modules/get-intrinsic": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-value": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha512-Ln0UQDlxH1BapMu3GPtf7CuYNwRZf2gwCuPqbyG6pB8WfmFpzqcy4xtAaAMUhnNqjMKTiCPZG2oMT3YSx8U2NA==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha512-E8Ak/2+dZY6fnzlR7+ueWvhsH1SjHr4jjss4YS/h4py44jY9MhK/VFdaZJAWDz6BbL21KeteKxFSFpq8OS5gVA==", + "dependencies": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + } + }, + "node_modules/glob-parent/node_modules/is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha512-UFpDDrPgM6qpnFNI+rh/p3bUaq9hKLZN8bMUWzxmcnZVS3omf4IPK+BrewlnWjO1WmUsMYuSjKh4UJuV4+Lqmw==", + "dependencies": { + "is-extglob": "^2.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/glob-stream": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-6.1.0.tgz", + "integrity": "sha512-uMbLGAP3S2aDOHUDfdoYcdIePUCfysbAd0IAoWVZbeGU/oNQ8asHVSshLDJUPWxfzj8zsCG7/XeHPHTtow0nsw==", + "dependencies": { + "extend": "^3.0.0", + "glob": "^7.1.1", + "glob-parent": "^3.1.0", + "is-negated-glob": "^1.0.0", + "ordered-read-streams": "^1.0.0", + "pumpify": "^1.3.5", + "readable-stream": "^2.1.5", + "remove-trailing-separator": "^1.0.1", + "to-absolute-glob": "^2.0.0", + "unique-stream": "^2.0.2" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/glob-watcher": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/glob-watcher/-/glob-watcher-5.0.5.tgz", + "integrity": "sha512-zOZgGGEHPklZNjZQaZ9f41i7F2YwE+tS5ZHrDhbBCk3stwahn5vQxnFmBJZHoYdusR6R1bLSXeGUy/BhctwKzw==", + "dependencies": { + "anymatch": "^2.0.0", + "async-done": "^1.2.0", + "chokidar": "^2.0.0", + "is-negated-glob": "^1.0.0", + "just-debounce": "^1.0.0", + "normalize-path": "^3.0.0", + "object.defaults": "^1.1.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/global-modules": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", + "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", + "dependencies": { + "global-prefix": "^1.0.1", + "is-windows": "^1.0.1", + "resolve-dir": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/global-prefix": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", + "integrity": "sha512-5lsx1NUDHtSjfg0eHlmYvZKv8/nVqX4ckFbM+FrGcQ+04KWcWFo9P5MxPZYSzUvyzmdTbI7Eix8Q4IbELDqzKg==", + "dependencies": { + "expand-tilde": "^2.0.2", + "homedir-polyfill": "^1.0.1", + "ini": "^1.3.4", + "is-windows": "^1.0.1", + "which": "^1.2.14" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/glogg": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/glogg/-/glogg-1.0.2.tgz", + "integrity": "sha512-5mwUoSuBk44Y4EshyiqcH95ZntbDdTQqA3QYSrxmzj28Ai0vXBGMH1ApSANH14j2sIRtqCEyg6PfsuP7ElOEDA==", + "dependencies": { + "sparkles": "^1.0.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" + }, + "node_modules/gulp": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/gulp/-/gulp-4.0.2.tgz", + "integrity": "sha512-dvEs27SCZt2ibF29xYgmnwwCYZxdxhQ/+LFWlbAW8y7jt68L/65402Lz3+CKy0Ov4rOs+NERmDq7YlZaDqUIfA==", + "dependencies": { + "glob-watcher": "^5.0.3", + "gulp-cli": "^2.2.0", + "undertaker": "^1.2.1", + "vinyl-fs": "^3.0.0" + }, + "bin": { + "gulp": "bin/gulp.js" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/gulp-cli": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/gulp-cli/-/gulp-cli-2.3.0.tgz", + "integrity": "sha512-zzGBl5fHo0EKSXsHzjspp3y5CONegCm8ErO5Qh0UzFzk2y4tMvzLWhoDokADbarfZRL2pGpRp7yt6gfJX4ph7A==", + "dependencies": { + "ansi-colors": "^1.0.1", + "archy": "^1.0.0", + "array-sort": "^1.0.0", + "color-support": "^1.1.3", + "concat-stream": "^1.6.0", + "copy-props": "^2.0.1", + "fancy-log": "^1.3.2", + "gulplog": "^1.0.0", + "interpret": "^1.4.0", + "isobject": "^3.0.1", + "liftoff": "^3.1.0", + "matchdep": "^2.0.0", + "mute-stdout": "^1.0.0", + "pretty-hrtime": "^1.0.0", + "replace-homedir": "^1.0.0", + "semver-greatest-satisfied-range": "^1.1.0", + "v8flags": "^3.2.0", + "yargs": "^7.1.0" + }, + "bin": { + "gulp": "bin/gulp.js" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/gulp-concat": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/gulp-concat/-/gulp-concat-2.6.1.tgz", + "integrity": "sha512-a2scActrQrDBpBbR3WUZGyGS1JEPLg5PZJdIa7/Bi3GuKAmPYDK6SFhy/NZq5R8KsKKFvtfR0fakbUCcKGCCjg==", + "dependencies": { + "concat-with-sourcemaps": "^1.0.0", + "through2": "^2.0.0", + "vinyl": "^2.0.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/gulp-sourcemaps": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/gulp-sourcemaps/-/gulp-sourcemaps-3.0.0.tgz", + "integrity": "sha512-RqvUckJkuYqy4VaIH60RMal4ZtG0IbQ6PXMNkNsshEGJ9cldUPRb/YCgboYae+CLAs1HQNb4ADTKCx65HInquQ==", + "dependencies": { + "@gulp-sourcemaps/identity-map": "^2.0.1", + "@gulp-sourcemaps/map-sources": "^1.0.0", + "acorn": "^6.4.1", + "convert-source-map": "^1.0.0", + "css": "^3.0.0", + "debug-fabulous": "^1.0.0", + "detect-newline": "^2.0.0", + "graceful-fs": "^4.0.0", + "source-map": "^0.6.0", + "strip-bom-string": "^1.0.0", + "through2": "^2.0.0" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/gulp-sourcemaps/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/gulp-uglify": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/gulp-uglify/-/gulp-uglify-3.0.2.tgz", + "integrity": "sha512-gk1dhB74AkV2kzqPMQBLA3jPoIAPd/nlNzP2XMDSG8XZrqnlCiDGAqC+rZOumzFvB5zOphlFh6yr3lgcAb/OOg==", + "dependencies": { + "array-each": "^1.0.1", + "extend-shallow": "^3.0.2", + "gulplog": "^1.0.0", + "has-gulplog": "^0.1.0", + "isobject": "^3.0.1", + "make-error-cause": "^1.1.1", + "safe-buffer": "^5.1.2", + "through2": "^2.0.0", + "uglify-js": "^3.0.5", + "vinyl-sourcemaps-apply": "^0.2.0" + } + }, + "node_modules/gulplog": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/gulplog/-/gulplog-1.0.0.tgz", + "integrity": "sha512-hm6N8nrm3Y08jXie48jsC55eCZz9mnb4OirAStEk2deqeyhXU3C1otDVh+ccttMuc1sBi6RX6ZJ720hs9RCvgw==", + "dependencies": { + "glogg": "^1.0.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/has-gulplog": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/has-gulplog/-/has-gulplog-0.1.0.tgz", + "integrity": "sha512-+F4GzLjwHNNDEAJW2DC1xXfEoPkRDmUdJ7CBYw4MpqtDwOnqdImJl7GWlpqx+Wko6//J8uKTnIe4wZSv7yCqmw==", + "dependencies": { + "sparkles": "^1.0.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-proto": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha512-IBXk4GTsLYdQ7Rvt+GRBrFSVEkmuOUy4re0Xjd9kJSUQpnTrWR4/y9RpfexN9vkAPMFuQoeWKwqzPozRTlasGw==", + "dependencies": { + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-values": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha512-ODYZC64uqzmtfGMEAX/FvZiRyWLpAC3vYnNunURUnkGVTS+mI0smVsWaPydRBsE3g+ok7h960jChO8mFcWlHaQ==", + "dependencies": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-values/node_modules/kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha512-24XsCxmEbRwEDbz/qz3stgin8TTzZ1ESR56OMCN0ujYg+vRutNSiOj9bHH9u85DKgXguraugV5sFuvbD4FW/hw==", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/hasown": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.1.tgz", + "integrity": "sha512-1/th4MHjnwncwXsIW6QMzlvYL9kG5e/CpVvLRZe4XPa8TOUNbCELqmvhDmnkNsAjwaG4+I8gJJL0JBvTTLO9qA==", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/homedir-polyfill": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", + "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", + "dependencies": { + "parse-passwd": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==" + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" + }, + "node_modules/interpret": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", + "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/invert-kv": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", + "integrity": "sha512-xgs2NH9AE66ucSq4cNG1nhSFghr5l6tdL15Pk+jl46bmmBapgoaY/AacXyaDznAqmGL99TiLSQgO/XazFSKYeQ==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-absolute": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz", + "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==", + "dependencies": { + "is-relative": "^1.0.0", + "is-windows": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-accessor-descriptor": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.1.tgz", + "integrity": "sha512-YBUanLI8Yoihw923YeFUS5fs0fF2f5TSFTNiYAAzhhDscDa3lEqYuz1pDOEP5KvX94I9ey3vsqjJcLVFVU+3QA==", + "dependencies": { + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==" + }, + "node_modules/is-binary-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha512-9fRVlXc0uCxEDj1nQzaWONSpbTfx0FmJfzHF7pwlI8DkWGoHBBea4Pg5Ky0ojwwxQmnSifgbKkI06Qv0Ljgj+Q==", + "dependencies": { + "binary-extensions": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "node_modules/is-core-module": { + "version": "2.13.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", + "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", + "dependencies": { + "hasown": "^2.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-data-descriptor": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.1.tgz", + "integrity": "sha512-bc4NlCDiCr28U4aEsQ3Qs2491gVq4V8G7MQyws968ImqjKuYtTJXrl7Vq7jsN7Ly/C3xj5KWFrY7sHNeDkAzXw==", + "dependencies": { + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/is-descriptor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.3.tgz", + "integrity": "sha512-JCNNGbwWZEVaSPtS45mdtrneRWJFp07LLmykxeFV5F6oBvNF8vHSfJuJgoT472pSfk+Mf8VnlrspaFBHWM8JAw==", + "dependencies": { + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-extendable/node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha512-1pqUqRjkhPJ9miNq9SwMfdvi6lBJcd6eFxvfaivQhaH3SgisfiuudvFntdKOmxuee/77l+FPjKrQjWvmPjWrRw==", + "dependencies": { + "number-is-nan": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-negated-glob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-negated-glob/-/is-negated-glob-1.0.0.tgz", + "integrity": "sha512-czXVVn/QEmgvej1f50BZ648vUI+em0xqMq2Sn+QncCLN4zj1UAxlT+kw/6ggQTOaZPd1HqKQGEqbpQVtJucWug==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha512-4cboCqIpliH+mAvFNegjZQ4kgKc3ZUhQVr3HvWbSh5q3WH2v82ct+T2Y1hdU5Gdtorx/cLifQjqCbL7bpznLTg==", + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-plain-object": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", + "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-promise": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz", + "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==" + }, + "node_modules/is-relative": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz", + "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==", + "dependencies": { + "is-unc-path": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-unc-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz", + "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==", + "dependencies": { + "unc-path-regex": "^0.1.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-utf8": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha512-rMYPYvCzsXywIsldgLaSoPlw5PfoB/ssr7hY4pLfcodrA5M/eArza1a9VmTiNIBNMjOGr1Ow9mTyU2o69U6U9Q==" + }, + "node_modules/is-valid-glob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-valid-glob/-/is-valid-glob-1.0.0.tgz", + "integrity": "sha512-AhiROmoEFDSsjx8hW+5sGwgKVIORcXnrlAx/R0ZSeaPw70Vw0CqkGBBhHGL58Uox2eXnU1AnvXJl1XlyedO5bA==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" + }, + "node_modules/isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==" + }, + "node_modules/just-debounce": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/just-debounce/-/just-debounce-1.1.0.tgz", + "integrity": "sha512-qpcRocdkUmf+UTNBYx5w6dexX5J31AKK1OmPwH630a83DdVVUIngk55RSAiIGpQyoH0dlr872VHfPjnQnK1qDQ==" + }, + "node_modules/kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/last-run": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/last-run/-/last-run-1.1.1.tgz", + "integrity": "sha512-U/VxvpX4N/rFvPzr3qG5EtLKEnNI0emvIQB3/ecEwv+8GHaUKbIB8vxv1Oai5FAF0d0r7LXHhLLe5K/yChm5GQ==", + "dependencies": { + "default-resolution": "^2.0.0", + "es6-weak-map": "^2.0.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/lazystream": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.1.tgz", + "integrity": "sha512-b94GiNHQNy6JNTrt5w6zNyffMrNkXZb3KTkCZJb2V1xaEGCk093vkZ2jk3tpaeP33/OiXC+WvK9AxUebnf5nbw==", + "dependencies": { + "readable-stream": "^2.0.5" + }, + "engines": { + "node": ">= 0.6.3" + } + }, + "node_modules/lcid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha512-YiGkH6EnGrDGqLMITnGjXtGmNtjoXw9SVUzcaos8RBi7Ps0VBylkq+vOcY9QE5poLasPCR849ucFUkl0UzUyOw==", + "dependencies": { + "invert-kv": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/lead": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lead/-/lead-1.0.0.tgz", + "integrity": "sha512-IpSVCk9AYvLHo5ctcIXxOBpMWUe+4TKN3VPWAKUbJikkmsGp0VrSM8IttVc32D6J4WUsiPE6aEFRNmIoF/gdow==", + "dependencies": { + "flush-write-stream": "^1.0.2" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/leaflet": { + "version": "1.9.4", + "resolved": "https://registry.npmjs.org/leaflet/-/leaflet-1.9.4.tgz", + "integrity": "sha512-nxS1ynzJOmOlHp+iL3FyWqK89GtNL8U8rvlMOsQdTTssxZwCXh8N2NB3GDQOL+YR3XnWyZAxwQixURb+FA74PA==" + }, + "node_modules/leaflet-editable": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/leaflet-editable/-/leaflet-editable-1.2.0.tgz", + "integrity": "sha512-wG11JwpL8zqIbypTop6xCRGagMuWw68ihYu4uqrqc5Ep0wnEJeyob7NB2Rt5t74Oih4rwJ3OfwaGbzdowOGfYQ==" + }, + "node_modules/leaflet.path.drag": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/leaflet.path.drag/-/leaflet.path.drag-0.0.6.tgz", + "integrity": "sha512-U6jp7sqX4kZss2FCm7bGPltOl8URWd+c4DPcRnEO9mYoZ1hfrteZ3XXVJ6zcEU8zxjnWeu1YywF08EDYbelmFg==" + }, + "node_modules/liftoff": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/liftoff/-/liftoff-3.1.0.tgz", + "integrity": "sha512-DlIPlJUkCV0Ips2zf2pJP0unEoT1kwYhiiPUGF3s/jtxTCjziNLoiVVh+jqWOWeFi6mmwQ5fNxvAUyPad4Dfog==", + "dependencies": { + "extend": "^3.0.0", + "findup-sync": "^3.0.0", + "fined": "^1.0.1", + "flagged-respawn": "^1.0.0", + "is-plain-object": "^2.0.4", + "object.map": "^1.0.0", + "rechoir": "^0.6.2", + "resolve": "^1.1.7" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/liftoff/node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/load-json-file": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha512-cy7ZdNRXdablkXYNI049pthVeXFurRyb9+hA/dZzerZ0pGTx42z+y+ssxBaVV2l70t1muq5IdKhn4UtcoGUY9A==", + "dependencies": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/lru-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/lru-queue/-/lru-queue-0.1.0.tgz", + "integrity": "sha512-BpdYkt9EvGl8OfWHDQPISVpcl5xZthb+XPsbELj5AQXxIC8IriDZIQYjBJPEm5rS420sjZ0TLEzRcq5KdBhYrQ==", + "dependencies": { + "es5-ext": "~0.10.2" + } + }, + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==" + }, + "node_modules/make-error-cause": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/make-error-cause/-/make-error-cause-1.2.2.tgz", + "integrity": "sha512-4TO2Y3HkBnis4c0dxhAgD/jprySYLACf7nwN6V0HAHDx59g12WlRpUmFy1bRHamjGUEEBrEvCq6SUpsEE2lhUg==", + "dependencies": { + "make-error": "^1.2.0" + } + }, + "node_modules/make-iterator": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/make-iterator/-/make-iterator-1.0.1.tgz", + "integrity": "sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw==", + "dependencies": { + "kind-of": "^6.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/make-iterator/node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha512-8y/eV9QQZCiyn1SprXSrCmqJN0yNRATe+PO8ztwqrvrbdRLA3eYJF0yaR0YayLWkMbsQSKWS9N2gPcGEc4UsZg==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/map-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha512-4y7uGv8bd2WdM9vpQsiQNo41Ln1NvhvDRuVt0k2JZQ+ezN2uaQes7lZeZ+QQUHOLQAtDaBJ+7wCbi+ab/KFs+w==", + "dependencies": { + "object-visit": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/matchdep": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/matchdep/-/matchdep-2.0.0.tgz", + "integrity": "sha512-LFgVbaHIHMqCRuCZyfCtUOq9/Lnzhi7Z0KFUE2fhD54+JN2jLh3hC02RLkqauJ3U4soU6H1J3tfj/Byk7GoEjA==", + "dependencies": { + "findup-sync": "^2.0.0", + "micromatch": "^3.0.4", + "resolve": "^1.4.0", + "stack-trace": "0.0.10" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/matchdep/node_modules/findup-sync": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-2.0.0.tgz", + "integrity": "sha512-vs+3unmJT45eczmcAZ6zMJtxN3l/QXeccaXQx5cu/MeJMhewVfoWZqibRkOxPnmoR59+Zy5hjabfQc6JLSah4g==", + "dependencies": { + "detect-file": "^1.0.0", + "is-glob": "^3.1.0", + "micromatch": "^3.0.4", + "resolve-dir": "^1.0.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/matchdep/node_modules/is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha512-UFpDDrPgM6qpnFNI+rh/p3bUaq9hKLZN8bMUWzxmcnZVS3omf4IPK+BrewlnWjO1WmUsMYuSjKh4UJuV4+Lqmw==", + "dependencies": { + "is-extglob": "^2.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/memoizee": { + "version": "0.4.15", + "resolved": "https://registry.npmjs.org/memoizee/-/memoizee-0.4.15.tgz", + "integrity": "sha512-UBWmJpLZd5STPm7PMUlOw/TSy972M+z8gcyQ5veOnSDRREz/0bmpyTfKt3/51DhEBqCZQn1udM/5flcSPYhkdQ==", + "dependencies": { + "d": "^1.0.1", + "es5-ext": "^0.10.53", + "es6-weak-map": "^2.0.3", + "event-emitter": "^0.3.5", + "is-promise": "^2.2.2", + "lru-queue": "^0.1.0", + "next-tick": "^1.1.0", + "timers-ext": "^0.1.7" + } + }, + "node_modules/micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dependencies": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/micromatch/node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/mixin-deep": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", + "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", + "dependencies": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "node_modules/mute-stdout": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mute-stdout/-/mute-stdout-1.0.1.tgz", + "integrity": "sha512-kDcwXR4PS7caBpuRYYBUz9iVixUk3anO3f5OYFiIPwK/20vCzKCHyKoulbiDY1S53zD2bxUpxN/IJ+TnXjfvxg==", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/nan": { + "version": "2.18.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.18.0.tgz", + "integrity": "sha512-W7tfG7vMOGtD30sHoZSSc/JVYiyDPEyQVso/Zz+/uQd0B0L46gtC+pHha5FFMRpil6fm/AoEcRWyOVi4+E/f8w==", + "optional": true + }, + "node_modules/nanomatch": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", + "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", + "dependencies": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/nanomatch/node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/next-tick": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz", + "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==" + }, + "node_modules/normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dependencies": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/now-and-later": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/now-and-later/-/now-and-later-2.0.1.tgz", + "integrity": "sha512-KGvQ0cB70AQfg107Xvs/Fbu+dGmZoTRJp2TaPwcwQm3/7PteUyN2BCgk8KBMPGBUXZdVwyWS8fDCGFygBm19UQ==", + "dependencies": { + "once": "^1.3.2" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha512-4jbtZXNAsfZbAHiiqjLPBiCl16dES1zI4Hpzzxw61Tk+loF+sBDBKx1ICKKKwIqQ7M0mFn1TmkN7euSncWgHiQ==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-copy": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha512-79LYn6VAb63zgtmAteVOWo9Vdj71ZVBy3Pbse+VqxDpEP83XuujMrGqHIwAXJ5I/aM0zU7dIyIAhifVTPrNItQ==", + "dependencies": { + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-copy/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-copy/node_modules/is-descriptor": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.7.tgz", + "integrity": "sha512-C3grZTvObeN1xud4cRWl366OMXZTj0+HGyk4hvfpx4ZHt1Pb60ANSXqCK7pdOTeUQpRzECBSTphqvD7U+l22Eg==", + "dependencies": { + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object-copy/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object-visit": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha512-GBaMwwAVK9qbQN3Scdo0OyvgPW7l3lnaVMj84uTOZlswkX0KpF6fyDBJhtTthf7pymztoN36/KEr1DyhF96zEA==", + "dependencies": { + "isobject": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object.assign": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", + "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", + "dependencies": { + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "has-symbols": "^1.0.3", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.defaults": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/object.defaults/-/object.defaults-1.1.0.tgz", + "integrity": "sha512-c/K0mw/F11k4dEUBMW8naXUuBuhxRCfG7W+yFy8EcijU/rSmazOUd1XAEEe6bC0OuXY4HUKjTJv7xbxIMqdxrA==", + "dependencies": { + "array-each": "^1.0.1", + "array-slice": "^1.0.0", + "for-own": "^1.0.0", + "isobject": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object.map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object.map/-/object.map-1.0.1.tgz", + "integrity": "sha512-3+mAJu2PLfnSVGHwIWubpOFLscJANBKuB/6A4CxBstc4aqwQY0FWcsppuy4jU5GSB95yES5JHSI+33AWuS4k6w==", + "dependencies": { + "for-own": "^1.0.0", + "make-iterator": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha512-tqa/UMy/CCoYmj+H5qc07qvSL9dqcs/WZENZ1JbtWBlATP+iVOe778gE6MSijnyCnORzDuX6hU+LA4SZ09YjFQ==", + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object.reduce": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object.reduce/-/object.reduce-1.0.1.tgz", + "integrity": "sha512-naLhxxpUESbNkRqc35oQ2scZSJueHGQNUfMW/0U37IgN6tE2dgDWg3whf+NEliy3F/QysrO48XKUz/nGPe+AQw==", + "dependencies": { + "for-own": "^1.0.0", + "make-iterator": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/ordered-read-streams": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-1.0.1.tgz", + "integrity": "sha512-Z87aSjx3r5c0ZB7bcJqIgIRX5bxR7A4aSzvIbaxd0oTkWBCOoKfuGHiKj60CHVUgg1Phm5yMZzBdt8XqRs73Mw==", + "dependencies": { + "readable-stream": "^2.0.1" + } + }, + "node_modules/os-locale": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", + "integrity": "sha512-PRT7ZORmwu2MEFt4/fv3Q+mEfN4zetKxufQrkShY2oGvUms9r8otu5HfdyIFHkYXjO7laNsoVGmM2MANfuTA8g==", + "dependencies": { + "lcid": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/parse-filepath": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.2.tgz", + "integrity": "sha512-FwdRXKCohSVeXqwtYonZTXtbGJKrn+HNyWDYVcp5yuJlesTwNH4rsmRZ+GrKAPJ5bLpRxESMeS+Rl0VCHRvB2Q==", + "dependencies": { + "is-absolute": "^1.0.0", + "map-cache": "^0.2.0", + "path-root": "^0.1.1" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha512-QR/GGaKCkhwk1ePQNYDRKYZ3mwU9ypsKhB0XyFnLQdomyEqk3e8wpW3V5Jp88zbxK4n5ST1nqo+g9juTpownhQ==", + "dependencies": { + "error-ex": "^1.2.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/parse-node-version": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parse-node-version/-/parse-node-version-1.0.1.tgz", + "integrity": "sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA==", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/parse-passwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", + "integrity": "sha512-1Y1A//QUXEZK7YKz+rD9WydcE1+EuPr6ZBgKecAB8tmoW6UFv0NREVJe1p+jRxtThkcbbKkfwIbWJe/IeE6m2Q==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pascalcase": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha512-XHXfu/yOQRy9vYOtUDVMN60OEJjW013GoObG1o+xwQTpB9eYJX/BjXMsdW13ZDPruFhYYn0AG22w0xgQMwl3Nw==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-dirname": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", + "integrity": "sha512-ALzNPpyNq9AqXMBjeymIjFDAkAFH06mHJH/cSBHAgU0s4vfpBn6b2nf8tiRLvagKD8RbTpq2FKTBg7cl9l3c7Q==" + }, + "node_modules/path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha512-yTltuKuhtNeFJKa1PiRzfLAU5182q1y4Eb4XCJ3PBqyzEDkAZRzBrKKBct682ls9reBVHf9udYLN5Nd+K1B9BQ==", + "dependencies": { + "pinkie-promise": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" + }, + "node_modules/path-root": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/path-root/-/path-root-0.1.1.tgz", + "integrity": "sha512-QLcPegTHF11axjfojBIoDygmS2E3Lf+8+jI6wOVmNVenrKSo3mFdSGiIgdSHenczw3wPtlVMQaFVwGmM7BJdtg==", + "dependencies": { + "path-root-regex": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-root-regex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/path-root-regex/-/path-root-regex-0.1.2.tgz", + "integrity": "sha512-4GlJ6rZDhQZFE0DPVKh0e9jmZ5egZfxTkp7bcRDuPlJXbAwhxcl2dINPUAsjLdejqaLsCeg8axcLjIbvBjN4pQ==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-type": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha512-S4eENJz1pkiQn9Znv33Q+deTOKmbl+jj1Fl+qiP/vYezj+S8x+J3Uo0ISrx/QoEvIlOaDWJhPaRd1flJ9HXZqg==", + "dependencies": { + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/picocolors": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz", + "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==" + }, + "node_modules/pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha512-0Gni6D4UcLTbv9c57DfxDGdr41XfgUjqWZu492f0cIGr16zDU06BWP/RAEvOuo7CQ0CNjHaLlM59YJJFm3NWlw==", + "dependencies": { + "pinkie": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/posix-character-classes": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha512-xTgYBc3fuo7Yt7JbiuFxSYGToMoz8fLoE6TC9Wx1P/u+LfeThMOAqmuyECnlBaaJb+u1m9hHiXUEtwW4OzfUJg==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/postcss": { + "version": "7.0.39", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz", + "integrity": "sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==", + "dependencies": { + "picocolors": "^0.2.1", + "source-map": "^0.6.1" + }, + "engines": { + "node": ">=6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + } + }, + "node_modules/postcss/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pretty-hrtime": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz", + "integrity": "sha512-66hKPCr+72mlfiSjlEB1+45IjXSqvVAIy6mocupoww4tBFE9R9IhwwUGoI4G++Tc9Aq+2rxOt0RFU6gPcrte0A==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + }, + "node_modules/pump": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", + "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "node_modules/pumpify": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz", + "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==", + "dependencies": { + "duplexify": "^3.6.0", + "inherits": "^2.0.3", + "pump": "^2.0.0" + } + }, + "node_modules/read-pkg": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha512-7BGwRHqt4s/uVbuyoeejRn4YmFnYZiFl4AuaeXHlgZf3sONF0SOGlxs2Pw8g6hCKupo08RafIO5YXFNOKTfwsQ==", + "dependencies": { + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/read-pkg-up": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "integrity": "sha512-WD9MTlNtI55IwYUS27iHh9tK3YoIVhxis8yKhLpTqWtml739uXc9NWTpxoHkfZf3+DkCCsXox94/VWZniuZm6A==", + "dependencies": { + "find-up": "^1.0.0", + "read-pkg": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/readdirp": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", + "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", + "dependencies": { + "graceful-fs": "^4.1.11", + "micromatch": "^3.1.10", + "readable-stream": "^2.0.2" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==", + "dependencies": { + "resolve": "^1.1.6" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/regex-not": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "dependencies": { + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/remove-bom-buffer": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/remove-bom-buffer/-/remove-bom-buffer-3.0.0.tgz", + "integrity": "sha512-8v2rWhaakv18qcvNeli2mZ/TMTL2nEyAKRvzo1WtnZBl15SHyEhrCu2/xKlJyUFKHiHgfXIyuY6g2dObJJycXQ==", + "dependencies": { + "is-buffer": "^1.1.5", + "is-utf8": "^0.2.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/remove-bom-stream": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/remove-bom-stream/-/remove-bom-stream-1.2.0.tgz", + "integrity": "sha512-wigO8/O08XHb8YPzpDDT+QmRANfW6vLqxfaXm1YXhnFf3AkSLyjfG3GEFg4McZkmgL7KvCj5u2KczkvSP6NfHA==", + "dependencies": { + "remove-bom-buffer": "^3.0.0", + "safe-buffer": "^5.1.0", + "through2": "^2.0.3" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/remove-trailing-separator": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", "integrity": "sha512-/hS+Y0u3aOfIETiaiirUFwDBDzmXPvO+jAfKTitUngIPzdKc6Z0LoFjM/CK5PL4C+eKwHohlHAb6H0VFfmmUsw==" }, + "node_modules/repeat-element": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.4.tgz", + "integrity": "sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==", + "engines": { + "node": ">=0.10" + } + }, "node_modules/replace-ext": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.1.tgz", @@ -620,11 +2915,288 @@ "node": ">= 0.10" } }, + "node_modules/replace-homedir": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/replace-homedir/-/replace-homedir-1.0.0.tgz", + "integrity": "sha512-CHPV/GAglbIB1tnQgaiysb8H2yCy8WQ7lcEwQ/eT+kLj0QHV8LnJW0zpqpE7RSkrMSRoa+EBoag86clf7WAgSg==", + "dependencies": { + "homedir-polyfill": "^1.0.1", + "is-absolute": "^1.0.0", + "remove-trailing-separator": "^1.1.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/require-main-filename": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", + "integrity": "sha512-IqSUtOVP4ksd1C/ej5zeEh/BIP2ajqpn8c5x+q99gvcIG/Qf0cud5raVnE/Dwd0ua9TXYDoDc0RE5hBSdz22Ug==" + }, + "node_modules/resolve": { + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", + "dependencies": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-dir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz", + "integrity": "sha512-R7uiTjECzvOsWSfdM0QKFNBVFcK27aHOUwdvK53BcW8zqnGdYp0Fbj82cy54+2A4P2tFM22J5kRfe1R+lM/1yg==", + "dependencies": { + "expand-tilde": "^2.0.0", + "global-modules": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/resolve-options": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/resolve-options/-/resolve-options-1.1.0.tgz", + "integrity": "sha512-NYDgziiroVeDC29xq7bp/CacZERYsA9bXYd1ZmcJlF3BcrZv5pTb4NG7SjdyKDnXZ84aC4vo2u6sNKIA1LCu/A==", + "dependencies": { + "value-or-function": "^3.0.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha512-ZuF55hVUQaaczgOIwqWzkEcEidmlD/xl44x1UZnhOXcYuFN2S6+rcxpG+C1N3So0wvNI3DmJICUFfu2SxhBmvg==", + "deprecated": "https://github.com/lydell/resolve-url#deprecated" + }, + "node_modules/ret": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", + "engines": { + "node": ">=0.12" + } + }, "node_modules/safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" }, + "node_modules/safe-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha512-aJXcif4xnaNUzvUuC5gcb46oTS7zvg4jpMTnuqtrEPlR3vFr4pxtdTwaF1Qs3Enjn9HK+ZlwQui+a7z0SywIzg==", + "dependencies": { + "ret": "~0.1.10" + } + }, + "node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/semver-greatest-satisfied-range": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/semver-greatest-satisfied-range/-/semver-greatest-satisfied-range-1.1.0.tgz", + "integrity": "sha512-Ny/iyOzSSa8M5ML46IAx3iXc6tfOsYU2R4AXi2UpHk60Zrgyq6eqPj/xiOfS0rRl/iiQ/rdJkVjw/5cdUyCntQ==", + "dependencies": { + "sver-compat": "^1.5.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==" + }, + "node_modules/set-function-length": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.1.tgz", + "integrity": "sha512-j4t6ccc+VsKwYHso+kElc5neZpjtq9EnRICFZtWyBsLojhmeF/ZBd/elqm22WJh/BziDe/SBiOeAt0m2mfLD0g==", + "dependencies": { + "define-data-property": "^1.1.2", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.3", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/set-value": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", + "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", + "dependencies": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/set-value/node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/set-value/node_modules/is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/set-value/node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "dependencies": { + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-node": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "dependencies": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-node/node_modules/define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA==", + "dependencies": { + "is-descriptor": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-util": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "dependencies": { + "kind-of": "^3.2.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-util/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/is-descriptor": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.7.tgz", + "integrity": "sha512-C3grZTvObeN1xud4cRWl366OMXZTj0+HGyk4hvfpx4ZHt1Pb60ANSXqCK7pdOTeUQpRzECBSTphqvD7U+l22Eg==", + "dependencies": { + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/snapdragon/node_modules/is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/source-map": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", @@ -633,6 +3205,25 @@ "node": ">=0.10.0" } }, + "node_modules/source-map-resolve": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", + "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", + "deprecated": "See https://github.com/lydell/source-map-resolve#deprecated", + "dependencies": { + "atob": "^2.1.2", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, + "node_modules/source-map-url": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.1.tgz", + "integrity": "sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==", + "deprecated": "See https://github.com/lydell/source-map-url#deprecated" + }, "node_modules/sparkles": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/sparkles/-/sparkles-1.0.1.tgz", @@ -641,6 +3232,98 @@ "node": ">= 0.10" } }, + "node_modules/spdx-correct": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", + "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", + "dependencies": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-exceptions": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz", + "integrity": "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==" + }, + "node_modules/spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-license-ids": { + "version": "3.0.17", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.17.tgz", + "integrity": "sha512-sh8PWc/ftMqAAdFiBu6Fy6JUOYjqDJBJvIhpfDMyHrr0Rbp5liZqd4TjtQ/RgfLjKFZb+LMx5hpml5qOWy0qvg==" + }, + "node_modules/split-string": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "dependencies": { + "extend-shallow": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/stack-trace": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", + "integrity": "sha512-KGzahc7puUKkzyMt+IqAep+TVNbKP+k2Lmwhub39m1AsTSkaDutx56aDCo+HLDzf/D26BIHTJWNiTG1KAJiQCg==", + "engines": { + "node": "*" + } + }, + "node_modules/static-extend": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha512-72E9+uLc27Mt718pMHt9VMNiAL4LMsmDbBva8mxWUCkT07fSzEGMYUCk0XWY6lp0j6RBAG4cJ3mWuZv2OE3s0g==", + "dependencies": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/static-extend/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/static-extend/node_modules/is-descriptor": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.7.tgz", + "integrity": "sha512-C3grZTvObeN1xud4cRWl366OMXZTj0+HGyk4hvfpx4ZHt1Pb60ANSXqCK7pdOTeUQpRzECBSTphqvD7U+l22Eg==", + "dependencies": { + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/stream-exhaust": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/stream-exhaust/-/stream-exhaust-1.0.2.tgz", + "integrity": "sha512-b/qaq/GlBK5xaq1yrK9/zFcyRSTNxmcZwFLGSTG0mXgZl/4Z6GgiyYOXOvY7N3eEvFRAG1bkDRz5EPGSvPYQlw==" + }, + "node_modules/stream-shift": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.3.tgz", + "integrity": "sha512-76ORR0DO1o1hlKwTbi/DM3EXWGf3ZJYO8cXX5RJwnul2DEg2oyoZyjLNoQM8WsvZiFKCRfC1O0J7iCvie3RZmQ==" + }, "node_modules/string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", @@ -649,6 +3332,41 @@ "safe-buffer": "~5.1.0" } }, + "node_modules/string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha512-0XsVpQLnVCXHJfyEs8tC0zpTVIr5PKKsQtkT29IwupnPTjtPmQ3xT/4yCREF9hYkV/3M3kzcUTSAZT6a6h81tw==", + "dependencies": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha512-kwrX1y7czp1E69n2ajbG65mIo9dqvJ+8aBQXOGVxqwvNbsXdFM6Lq37dLAY3mknUwru8CfcCbfOLL/gMo+fi3g==", + "dependencies": { + "is-utf8": "^0.2.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/strip-bom-string": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/strip-bom-string/-/strip-bom-string-1.0.0.tgz", @@ -657,6 +3375,26 @@ "node": ">=0.10.0" } }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/sver-compat": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/sver-compat/-/sver-compat-1.5.0.tgz", + "integrity": "sha512-aFTHfmjwizMNlNE6dsGmoAM4lHjL0CyiobWaFiXWSlD7cIxshW422Nb8KbXCmR6z+0ZEPY+daXJrDyh/vuwTyg==", + "dependencies": { + "es6-iterator": "^2.0.1", + "es6-symbol": "^3.1.1" + } + }, "node_modules/through2": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", @@ -666,6 +3404,23 @@ "xtend": "~4.0.1" } }, + "node_modules/through2-filter": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/through2-filter/-/through2-filter-3.0.0.tgz", + "integrity": "sha512-jaRjI2WxN3W1V8/FMZ9HKIBXixtiqs3SQSX4/YGIiP3gL6djW48VoZq9tDqeCWs3MT8YY5wb/zli8VW8snY1CA==", + "dependencies": { + "through2": "~2.0.0", + "xtend": "~4.0.0" + } + }, + "node_modules/time-stamp": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/time-stamp/-/time-stamp-1.1.0.tgz", + "integrity": "sha512-gLCeArryy2yNTRzTGKbZbloctj64jkZ57hj5zdraXue6aFgd6PmvVtEyiUU+hvU0v7q08oVv8r8ev0tRo6bvgw==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/timers-ext": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/timers-ext/-/timers-ext-0.1.7.tgz", @@ -675,11 +3430,87 @@ "next-tick": "1" } }, + "node_modules/to-absolute-glob": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/to-absolute-glob/-/to-absolute-glob-2.0.2.tgz", + "integrity": "sha512-rtwLUQEwT8ZeKQbyFJyomBRYXyE16U5VKuy0ftxLMK/PZb2fkOsg5r9kHdauuVDbsNdIBoC/HCthpidamQFXYA==", + "dependencies": { + "is-absolute": "^1.0.0", + "is-negated-glob": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-object-path": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha512-9mWHdnGRuh3onocaHzukyvCZhzvr6tiflAy/JRFXcJX0TjgfWA9pk9t8CMbzmBE4Jfw58pXbkngtBtqYxzNEyg==", + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-object-path/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-regex": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "dependencies": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha512-ZZWNfCjUokXXDGXFpZehJIkZqq91BcULFq/Pi7M5i4JnxXdhMKAK682z8bCW3o8Hj1wuuzoKcW3DfVzaP6VuNg==", + "dependencies": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-through": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-through/-/to-through-2.0.0.tgz", + "integrity": "sha512-+QIz37Ly7acM4EMdw2PRN389OneM5+d844tirkGp4dPKzI5OE72V9OsbFp+CIYJDahZ41ZV05hNtcPAQUAm9/Q==", + "dependencies": { + "through2": "^2.0.3" + }, + "engines": { + "node": ">= 0.10" + } + }, "node_modules/type": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==" }, + "node_modules/typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==" + }, "node_modules/uglify-js": { "version": "3.17.4", "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.4.tgz", @@ -691,11 +3522,173 @@ "node": ">=0.8.0" } }, + "node_modules/unc-path-regex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz", + "integrity": "sha512-eXL4nmJT7oCpkZsHZUOJo8hcX3GbsiDOa0Qu9F646fi8dT3XuSVopVqAcEiVzSKKH7UoDti23wNX3qGFxcW5Qg==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/undertaker": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/undertaker/-/undertaker-1.3.0.tgz", + "integrity": "sha512-/RXwi5m/Mu3H6IHQGww3GNt1PNXlbeCuclF2QYR14L/2CHPz3DFZkvB5hZ0N/QUkiXWCACML2jXViIQEQc2MLg==", + "dependencies": { + "arr-flatten": "^1.0.1", + "arr-map": "^2.0.0", + "bach": "^1.0.0", + "collection-map": "^1.0.0", + "es6-weak-map": "^2.0.1", + "fast-levenshtein": "^1.0.0", + "last-run": "^1.1.0", + "object.defaults": "^1.0.0", + "object.reduce": "^1.0.0", + "undertaker-registry": "^1.0.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/undertaker-registry": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/undertaker-registry/-/undertaker-registry-1.0.1.tgz", + "integrity": "sha512-UR1khWeAjugW3548EfQmL9Z7pGMlBgXteQpr1IZeZBtnkCJQJIJ1Scj0mb9wQaPvUZ9Q17XqW6TIaPchJkyfqw==", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/union-value": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", + "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", + "dependencies": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^2.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/union-value/node_modules/is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unique-stream": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/unique-stream/-/unique-stream-2.3.1.tgz", + "integrity": "sha512-2nY4TnBE70yoxHkDli7DMazpWiP7xMdCYqU2nBRO0UB+ZpEkGsSija7MvmvnZFUeC+mrgiUfcHSr3LmRFIg4+A==", + "dependencies": { + "json-stable-stringify-without-jsonify": "^1.0.1", + "through2-filter": "^3.0.0" + } + }, + "node_modules/unset-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", + "integrity": "sha512-PcA2tsuGSF9cnySLHTLSh2qrQiJ70mn+r+Glzxv2TWZblxsxCC52BDlZoPCsz7STd9pN7EZetkWZBAvk4cgZdQ==", + "dependencies": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unset-value/node_modules/has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha512-gpG936j8/MzaeID5Yif+577c17TxaDmhuyVgSwtnL/q8UUTySg8Mecb+8Cf1otgLoD7DDH75axp86ER7LFsf3Q==", + "dependencies": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unset-value/node_modules/has-value/node_modules/isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha512-+OUdGJlgjOBZDfxnDjYYG6zp487z0JGNQq3cYQYg5f5hKR+syHMsaztzGeml/4kGG55CSpKSpWTY+jYGgsHLgA==", + "dependencies": { + "isarray": "1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unset-value/node_modules/has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha512-J8S0cEdWuQbqD9//tlZxiMuMNmxB8PlEwvYwuxsTmR1G5RXUePEX/SJn7aD0GMLieuZYSwNH0cQuJGwnYunXRQ==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/upath": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz", + "integrity": "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==", + "engines": { + "node": ">=4", + "yarn": "*" + } + }, + "node_modules/urix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha512-Am1ousAhSLBeB9cG/7k7r2R0zj50uDRlZHPGbazid5s9rlF1F/QKYObEKSIunSjIOkJZqwRRLpvewjEkM7pSqg==", + "deprecated": "Please see https://github.com/lydell/urix#deprecated" + }, + "node_modules/use": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", + "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" }, + "node_modules/v8flags": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.2.0.tgz", + "integrity": "sha512-mH8etigqMfiGWdeXpaaqGfs6BndypxusHHcv2qSHyZkGEznCd/qAXCWWRzeowtL54147cktFOC4P5y+kl8d8Jg==", + "dependencies": { + "homedir-polyfill": "^1.0.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dependencies": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "node_modules/value-or-function": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/value-or-function/-/value-or-function-3.0.0.tgz", + "integrity": "sha512-jdBB2FrWvQC/pnPtIqcLsMaQgjhdb6B7tk1MMyTKapox+tQZbdRP4uLxu/JY0t7fbfDCUMnuelzEYv5GsxHhdg==", + "engines": { + "node": ">= 0.10" + } + }, "node_modules/vinyl": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.2.1.tgz", @@ -712,6 +3705,61 @@ "node": ">= 0.10" } }, + "node_modules/vinyl-fs": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-3.0.3.tgz", + "integrity": "sha512-vIu34EkyNyJxmP0jscNzWBSygh7VWhqun6RmqVfXePrOwi9lhvRs//dOaGOTRUQr4tx7/zd26Tk5WeSVZitgng==", + "dependencies": { + "fs-mkdirp-stream": "^1.0.0", + "glob-stream": "^6.1.0", + "graceful-fs": "^4.0.0", + "is-valid-glob": "^1.0.0", + "lazystream": "^1.0.0", + "lead": "^1.0.0", + "object.assign": "^4.0.4", + "pumpify": "^1.3.5", + "readable-stream": "^2.3.3", + "remove-bom-buffer": "^3.0.0", + "remove-bom-stream": "^1.2.0", + "resolve-options": "^1.1.0", + "through2": "^2.0.0", + "to-through": "^2.0.0", + "value-or-function": "^3.0.0", + "vinyl": "^2.0.0", + "vinyl-sourcemap": "^1.1.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/vinyl-sourcemap": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/vinyl-sourcemap/-/vinyl-sourcemap-1.1.0.tgz", + "integrity": "sha512-NiibMgt6VJGJmyw7vtzhctDcfKch4e4n9TBeoWlirb7FMg9/1Ov9k+A5ZRAtywBpRPiyECvQRQllYM8dECegVA==", + "dependencies": { + "append-buffer": "^1.0.2", + "convert-source-map": "^1.5.0", + "graceful-fs": "^4.1.6", + "normalize-path": "^2.1.1", + "now-and-later": "^2.0.0", + "remove-bom-buffer": "^3.0.0", + "vinyl": "^2.0.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/vinyl-sourcemap/node_modules/normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha512-3pKJwH184Xo/lnH6oyP1q2pMd7HcypqqmRs91/6/i2CGtWwIKGCkOOMTm/zXbgTEWHw1uNpNi/igc3ePOYHb6w==", + "dependencies": { + "remove-trailing-separator": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/vinyl-sourcemaps-apply": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/vinyl-sourcemaps-apply/-/vinyl-sourcemaps-apply-0.2.1.tgz", @@ -720,6 +3768,39 @@ "source-map": "^0.5.1" } }, + "node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, + "node_modules/which-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", + "integrity": "sha512-F6+WgncZi/mJDrammbTuHe1q0R5hOXv/mBaiNA2TCNT/LTHusX0V+CJnj9XT8ki5ln2UZyyddDgHfCzyrOH7MQ==" + }, + "node_modules/wrap-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha512-vAaEaDM946gbNpH5pLVNR+vX2ht6n0Bt3GXwVB1AuAqZosOvHNF3P7wDnh8KLkSqgUh0uh77le7Owgoz+Z9XBw==", + "dependencies": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" + }, "node_modules/xtend": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", @@ -727,6 +3808,40 @@ "engines": { "node": ">=0.4" } + }, + "node_modules/y18n": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.2.tgz", + "integrity": "sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ==" + }, + "node_modules/yargs": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-7.1.2.tgz", + "integrity": "sha512-ZEjj/dQYQy0Zx0lgLMLR8QuaqTihnxirir7EwUHp1Axq4e3+k8jXU5K0VLbNvedv1f4EWtBonDIZm0NUr+jCcA==", + "dependencies": { + "camelcase": "^3.0.0", + "cliui": "^3.2.0", + "decamelize": "^1.1.1", + "get-caller-file": "^1.0.1", + "os-locale": "^1.4.0", + "read-pkg-up": "^1.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^1.0.2", + "which-module": "^1.0.0", + "y18n": "^3.2.1", + "yargs-parser": "^5.0.1" + } + }, + "node_modules/yargs-parser": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-5.0.1.tgz", + "integrity": "sha512-wpav5XYiddjXxirPoCTUPbqM0PXvJ9hiBMvuJgInvo4/lAOTZzUprArw17q2O1P2+GHhbBr18/iQwjL5Z9BqfA==", + "dependencies": { + "camelcase": "^3.0.0", + "object.assign": "^4.1.0" + } } } } diff --git a/Resources/Private/Build/package.json b/Resources/Private/Build/package.json index 669ea531..c4e27aad 100644 --- a/Resources/Private/Build/package.json +++ b/Resources/Private/Build/package.json @@ -3,6 +3,7 @@ "@types/geojson": "^7946.0.13", "@types/leaflet": "^1.9.8", "@types/leaflet-editable": "^1.2.6", + "gulp": "^4.0.2", "gulp-concat": "^2.6.1", "gulp-sourcemaps": "^3.0.0", "gulp-uglify": "^3.0.2", diff --git a/Resources/Public/JavaScript/GoogleMaps2.min.js b/Resources/Public/JavaScript/GoogleMaps2.min.js index 14aef7a3..4f4d82d4 100644 --- a/Resources/Public/JavaScript/GoogleMaps2.min.js +++ b/Resources/Public/JavaScript/GoogleMaps2.min.js @@ -1,7 +1,7 @@ -class GoogleMaps2{allMarkers=[];categorizedMarkers={};pointMarkers=[];bounds={};infoWindow={};poiCollections={};editable={};map={};constructor(e,t){var o,s;this.allMarkers=[],this.categorizedMarkers={},this.pointMarkers=[],this.bounds=new google.maps.LatLngBounds,this.infoWindow=new google.maps.InfoWindow,this.poiCollections=JSON.parse(e.dataset.pois||"null"),this.editable=e.classList.contains("editMarker"),this.setMapDimensions(e,t.settings),this.createMap(e,t),void 0===this.poiCollections||null===this.poiCollections?(o=Number(e.dataset.latitude),s=Number(e.dataset.longitude),o&&s?(this.createMarkerByLatLng(o,s),this.map.setCenter(new google.maps.LatLng(o,s))):this.map.setCenter(new google.maps.LatLng(t.extConf.defaultLatitude,t.extConf.defaultLongitude))):(this.createPointByCollectionType(e,t),void 0!==t.settings.markerClusterer&&1===t.settings.markerClusterer.enable&&new MarkerClusterer(this.map,this.pointMarkers,{imagePath:t.settings.markerClusterer.imagePath}),1{let mapOptions={mapTypeId:"",zoom:parseInt(settings.zoom),zoomControl:0!==parseInt(settings.zoomControl),mapTypeControl:0!==parseInt(settings.mapTypeControl),scaleControl:0!==parseInt(settings.scaleControl),streetViewControl:0!==parseInt(settings.streetViewControl),fullscreenControl:0!==parseInt(settings.fullScreenControl),scrollwheel:settings.activateScrollWheel,styles:""};switch(settings.styles&&(mapOptions.styles=eval(settings.styles)),settings.mapTypeId){case"google.maps.MapTypeId.HYBRID":case"hybrid":mapOptions.mapTypeId=google.maps.MapTypeId.HYBRID;break;case"google.maps.MapTypeId.ROADMAP":case"roadmap":mapOptions.mapTypeId=google.maps.MapTypeId.ROADMAP;break;case"google.maps.MapTypeId.SATELLITE":case"satellite":mapOptions.mapTypeId=google.maps.MapTypeId.SATELLITE;break;case"google.maps.MapTypeId.TERRAIN":case"terrain":mapOptions.mapTypeId=google.maps.MapTypeId.TERRAIN}return mapOptions};getCircleOptions(e,t,o){return{map:e,center:t,radius:o.radius,strokeColor:o.strokeColor,strokeOpacity:o.strokeOpacity,strokeWeight:o.strokeWeight,fillColor:o.fillColor,fillOpacity:o.fillOpacity}}getPolygonOptions(e,t){return{paths:e,strokeColor:t.strokeColor,strokeOpacity:t.strokeOpacity,strokeWeight:t.strokeWeight,fillColor:t.fillColor,fillOpacity:t.fillOpacity}}getPolylineOptions(e,t){return{path:e,strokeColor:t.strokeColor,strokeOpacity:t.strokeOpacity,strokeWeight:t.strokeWeight}}createMap(e,t){this.map=new google.maps.Map(e,this.getMapOptions(t.settings))}canBeInterpretedAsNumber(e){return"number"==typeof e||!isNaN(Number(e))}normalizeDimension(e){let t=String(e);return this.canBeInterpretedAsNumber(t)&&(t+="px"),t}shouldFitBounds(e){return!0!==e.forceZoom&&null!==this.poiCollections&&(1{var s,i={};for(let t=0;t{let o=[];return(t?e.querySelectorAll("input:checked"):e.querySelectorAll("input:not(input:checked)")).forEach(e=>{o.push(parseInt(e.value))}),o};getMarkersToChangeVisibilityFor=(e,t,s)=>{var i=[];if(0!==this.allMarkers.length){var a,r,n=this.getCategoriesOfCheckboxesWithStatus(t,s);for(let e=0;e{var o=this.groupCategories(t);let s=document.createElement("form");for(var i in s.classList.add("txMaps2Form"),s.setAttribute("id","txMaps2Form-"+t.contentRecord.uid),o)o.hasOwnProperty(i)&&(s.appendChild(this.getCheckbox(o[i])),s.querySelector("#checkCategory_"+i)?.insertAdjacentHTML("afterend",`${o[i].title}`));s.querySelectorAll("input").forEach(o=>{o.addEventListener("click",()=>{let t=o.checked;var e=o.value;this.getMarkersToChangeVisibilityFor(e,s,t).forEach(e=>{e.setVisible(t)})})}),e.insertAdjacentElement("afterend",s)};getCheckbox(e){var t=document.createElement("div");return t.classList.add("form-group"),t.innerHTML=` +class GoogleMaps2{allMarkers=[];categorizedMarkers={};pointMarkers=[];bounds={};infoWindow={};poiCollections={};editable={};map={};constructor(e,t){var o,i;this.allMarkers=[],this.categorizedMarkers={},this.pointMarkers=[],this.bounds=new google.maps.LatLngBounds,this.infoWindow=new google.maps.InfoWindow,this.poiCollections=JSON.parse(e.dataset.pois||"null"),this.editable=e.classList.contains("editMarker"),this.setMapDimensions(e,t.settings),this.createMap(e,t),void 0===this.poiCollections||null===this.poiCollections?(o=Number(e.dataset.latitude),i=Number(e.dataset.longitude),o&&i?(this.createMarkerByLatLng(o,i),this.map.setCenter(new google.maps.LatLng(o,i))):this.map.setCenter(new google.maps.LatLng(t.extConf.defaultLatitude,t.extConf.defaultLongitude))):(this.createPointByCollectionType(e,t),void 0!==t.settings.markerClusterer&&1===t.settings.markerClusterer.enable&&new MarkerClusterer(this.map,this.pointMarkers,{imagePath:t.settings.markerClusterer.imagePath}),1{let mapOptions={mapTypeId:"",zoom:parseInt(settings.zoom),zoomControl:0!==parseInt(settings.zoomControl),mapTypeControl:0!==parseInt(settings.mapTypeControl),scaleControl:0!==parseInt(settings.scaleControl),streetViewControl:0!==parseInt(settings.streetViewControl),fullscreenControl:0!==parseInt(settings.fullScreenControl),scrollwheel:settings.activateScrollWheel,styles:""};switch(settings.styles&&(mapOptions.styles=eval(settings.styles)),settings.mapTypeId){case"google.maps.MapTypeId.HYBRID":case"hybrid":mapOptions.mapTypeId=google.maps.MapTypeId.HYBRID;break;case"google.maps.MapTypeId.ROADMAP":case"roadmap":mapOptions.mapTypeId=google.maps.MapTypeId.ROADMAP;break;case"google.maps.MapTypeId.SATELLITE":case"satellite":mapOptions.mapTypeId=google.maps.MapTypeId.SATELLITE;break;case"google.maps.MapTypeId.TERRAIN":case"terrain":mapOptions.mapTypeId=google.maps.MapTypeId.TERRAIN}return mapOptions};getCircleOptions(e,t,o){return{map:e,center:t,radius:o.radius,strokeColor:o.strokeColor,strokeOpacity:o.strokeOpacity,strokeWeight:o.strokeWeight,fillColor:o.fillColor,fillOpacity:o.fillOpacity}}getPolygonOptions(e,t){return{paths:e,strokeColor:t.strokeColor,strokeOpacity:t.strokeOpacity,strokeWeight:t.strokeWeight,fillColor:t.fillColor,fillOpacity:t.fillOpacity}}getPolylineOptions(e,t){return{path:e,strokeColor:t.strokeColor,strokeOpacity:t.strokeOpacity,strokeWeight:t.strokeWeight}}createMap(e,t){this.map=new google.maps.Map(e,this.getMapOptions(t.settings))}canBeInterpretedAsNumber(e){return"number"==typeof e||!isNaN(Number(e))}normalizeDimension(e){let t=String(e);return this.canBeInterpretedAsNumber(t)&&(t+="px"),t}shouldFitBounds(e){return!0!==e.forceZoom&&null!==this.poiCollections&&(1{var i,s={};for(let t=0;t{let o=[];return(t?e.querySelectorAll("input:checked"):e.querySelectorAll("input:not(input:checked)")).forEach(e=>{o.push(parseInt(e.value))}),o};getMarkersToChangeVisibilityFor=(e,t,i)=>{var s=[];if(0!==this.allMarkers.length){var r,a,n=this.getCategoriesOfCheckboxesWithStatus(t,i);for(let e=0;e{var o=this.groupCategories(t);let i=document.createElement("form");for(var s in i.classList.add("txMaps2Form"),i.setAttribute("id","txMaps2Form-"+t.contentRecord.uid),o)o.hasOwnProperty(s)&&(i.appendChild(this.getCheckbox(o[s])),i.querySelector("#checkCategory_"+s)?.insertAdjacentHTML("afterend",`${o[s].title}`));i.querySelectorAll("input").forEach(o=>{o.addEventListener("click",()=>{let t=o.checked;var e=o.value;this.getMarkersToChangeVisibilityFor(e,i,t).forEach(e=>{e.setVisible(t)})})}),e.insertAdjacentElement("afterend",i)};getCheckbox(e){var t=document.createElement("div");return t.classList.add("form-group"),t.innerHTML=`
-
`,t}countObjectProperties=e=>{let t=0;for(var o in e)e.hasOwnProperty(o)&&t++;return t};createPointByCollectionType=(e,o)=>{let s,i=0;null!==this.poiCollections&&this.poiCollections.length&&this.poiCollections.forEach(t=>{switch(""===t.strokeColor&&(t.strokeColor=o.extConf.strokeColor),""===t.strokeOpacity&&(t.strokeOpacity=o.extConf.strokeOpacity),""===t.strokeWeight&&(t.strokeWeight=o.extConf.strokeWeight),""===t.fillColor&&(t.fillColor=o.extConf.fillColor),""===t.fillOpacity&&(t.fillOpacity=o.extConf.fillOpacity),s=null,t.collectionType){case"Point":s=this.createMarker(t,e,o);break;case"Area":s=this.createArea(t,o);break;case"Route":s=this.createRoute(t,o);break;case"Radius":s=this.createRadius(t,o)}if(null!==s){this.allMarkers.push({marker:s,poiCollection:t});for(let e=i=0;e{var s,i=new google.maps.Marker({position:new google.maps.LatLng(e.latitude,e.longitude),map:this.map});return i.setDraggable(this.editable),e.hasOwnProperty("markerIcon")&&""!==e.markerIcon&&(s={url:e.markerIcon,scaledSize:new google.maps.Size(e.markerIconWidth,e.markerIconHeight),anchor:new google.maps.Point(e.markerIconAnchorPosX,e.markerIconAnchorPosY)},i.setIcon(s)),this.pointMarkers.push(i),this.bounds.extend(i.position),this.editable?this.addEditListeners(t,i,e,o):this.addInfoWindow(i,e,o),i};createArea=(t,e)=>{var o,s=[];for(let e=0;e{var o,s=[];for(let e=0;e{var o=new google.maps.Circle(this.getCircleOptions(this.map,new google.maps.LatLng(e.latitude,e.longitude),e));return this.bounds.union(o.getBounds()),this.addInfoWindow(o,e,t),o};addInfoWindow=(t,o,s)=>{let i=this.infoWindow,a=this.map;google.maps.event.addListener(t,"click",e=>{fetch(s.ajaxUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({poiCollection:o.uid})}).then(e=>e.json()).then(e=>{i.close(),i.setContent(e.content),"Point"===o.collectionType?(i.setPosition(null),i.open(a,t)):(i.setPosition(new google.maps.LatLng(o.latitude,o.longitude)),i.open(a))}).catch(e=>console.error("Error:",e))})};inList=(e,t)=>{return(","+e+",").search(t=","+t+",")};createMarkerByLatLng=(e,t)=>{e=new google.maps.Marker({position:new google.maps.LatLng(e,t),map:this.map});this.bounds.extend(e.position)};addEditListeners=(o,s,e,i)=>{google.maps.event.addListener(s,"dragend",()=>{var e=s.getPosition().lat().toFixed(6),t=s.getPosition().lng().toFixed(6);o.prevAll("input.latitude-"+i.contentRecord.uid).val(e),o.prevAll("input.longitude-"+i.contentRecord.uid).val(t)}),google.maps.event.addListener(this.map,"click",e=>{s.setPosition(e.latLng),o.prevAll("input.latitude-"+i.contentRecord.uid).val(e.latLng.lat().toFixed(6)),o.prevAll("input.longitude-"+i.contentRecord.uid).val(e.latLng.lng().toFixed(6))})}}let maps2GoogleMaps=[];function initMap(){document.querySelectorAll(".maps2").forEach(e=>{var t=void 0!==e.dataset.environment?e.dataset.environment:"{}",o=void 0!==e.dataset.override?e.dataset.override:"{}";maps2GoogleMaps.push(new GoogleMaps2(e,{...JSON.parse(t),...JSON.parse(o)}))});var e=document.querySelector("#maps2Address"),t=document.querySelector("#maps2Radius");null!==e&&null!==t&&(new google.maps.places.Autocomplete(e,{fields:["place_id"]}),e.addEventListener("keydown",e=>{if(13===e.keyCode)return!1}))} + `,t}countObjectProperties=e=>{let t=0;for(var o in e)e.hasOwnProperty(o)&&t++;return t};createPointByCollectionType=(e,o)=>{let i,s=0;null!==this.poiCollections&&this.poiCollections.length&&this.poiCollections.forEach(t=>{switch(""===t.strokeColor&&(t.strokeColor=o.extConf.strokeColor),""===t.strokeOpacity&&(t.strokeOpacity=o.extConf.strokeOpacity),""===t.strokeWeight&&(t.strokeWeight=o.extConf.strokeWeight),""===t.fillColor&&(t.fillColor=o.extConf.fillColor),""===t.fillOpacity&&(t.fillOpacity=o.extConf.fillOpacity),i=null,t.collectionType){case"Point":i=this.createMarker(t,e,o);break;case"Area":i=this.createArea(t,o);break;case"Route":i=this.createRoute(t,o);break;case"Radius":i=this.createRadius(t,o)}if(null!==i){this.allMarkers.push({marker:i,poiCollection:t});for(let e=s=0;e{var i,s=new google.maps.Marker({position:new google.maps.LatLng(e.latitude,e.longitude),map:this.map});return s.setDraggable(this.editable),e.hasOwnProperty("markerIcon")&&""!==e.markerIcon&&(i={url:e.markerIcon,scaledSize:new google.maps.Size(e.markerIconWidth,e.markerIconHeight),anchor:new google.maps.Point(e.markerIconAnchorPosX,e.markerIconAnchorPosY)},s.setIcon(i)),this.pointMarkers.push(s),this.bounds.extend(s.position),this.editable?this.addEditListeners(t,s,e,o):this.addInfoWindow(s,e,o),s};createArea=(t,e)=>{var o,i=[];for(let e=0;e{var o,i=[];for(let e=0;e{var o=new google.maps.Circle(this.getCircleOptions(this.map,new google.maps.LatLng(e.latitude,e.longitude),e));return this.bounds.union(o.getBounds()),this.addInfoWindow(o,e,t),o};addInfoWindow=(t,o,i)=>{let s=this.infoWindow,r=this.map;google.maps.event.addListener(t,"click",e=>{fetch(i.ajaxUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({poiCollection:o.uid})}).then(e=>e.json()).then(e=>{s.close(),s.setContent(e.content),"Point"===o.collectionType?(s.setPosition(null),s.open(r,t)):(s.setPosition(new google.maps.LatLng(o.latitude,o.longitude)),s.open(r))}).catch(e=>console.error("Error:",e))})};inList=(e,t)=>{return(","+e+",").search(t=","+t+",")};createMarkerByLatLng=(e,t)=>{e=new google.maps.Marker({position:new google.maps.LatLng(e,t),map:this.map});this.bounds.extend(e.position)};addEditListeners=(o,i,e,s)=>{google.maps.event.addListener(i,"dragend",()=>{var e=i.getPosition().lat().toFixed(6),t=i.getPosition().lng().toFixed(6);o.prevAll("input.latitude-"+s.contentRecord.uid).val(e),o.prevAll("input.longitude-"+s.contentRecord.uid).val(t)}),google.maps.event.addListener(this.map,"click",e=>{i.setPosition(e.latLng),o.prevAll("input.latitude-"+s.contentRecord.uid).val(e.latLng.lat().toFixed(6)),o.prevAll("input.longitude-"+s.contentRecord.uid).val(e.latLng.lng().toFixed(6))})}}let maps2GoogleMaps=[];function initMap(){document.querySelectorAll(".maps2").forEach(e=>{var t=void 0!==e.dataset.environment?e.dataset.environment:"{}",o=void 0!==e.dataset.override?e.dataset.override:"{}";const n=()=>{let e={},t=!1,o=0;var i=arguments.length;for("[object Boolean]"===Object.prototype.toString.call(arguments[0])&&(t=arguments[0],o++);o{if(13===e.keyCode)return!1}))} //# sourceMappingURL=GoogleMaps2.min.js.map diff --git a/Resources/Public/JavaScript/GoogleMaps2.min.js.map b/Resources/Public/JavaScript/GoogleMaps2.min.js.map index 1087aec3..59a6dfe0 100644 --- a/Resources/Public/JavaScript/GoogleMaps2.min.js.map +++ b/Resources/Public/JavaScript/GoogleMaps2.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["GoogleMaps2.js"],"names":["GoogleMaps2","allMarkers","categorizedMarkers","pointMarkers","bounds","infoWindow","poiCollections","editable","map","constructor","element","environment","lat","lng","this","google","maps","LatLngBounds","InfoWindow","JSON","parse","dataset","pois","classList","contains","setMapDimensions","settings","createMap","Number","latitude","longitude","createMarkerByLatLng","setCenter","LatLng","extConf","defaultLatitude","defaultLongitude","createPointByCollectionType","markerClusterer","enable","MarkerClusterer","imagePath","countObjectProperties","showSwitchableCategories","shouldFitBounds","fitBounds","getMapOptions","let","mapOptions","mapTypeId","zoom","parseInt","zoomControl","mapTypeControl","scaleControl","streetViewControl","fullscreenControl","fullScreenControl","scrollwheel","activateScrollWheel","styles","eval","MapTypeId","HYBRID","ROADMAP","SATELLITE","TERRAIN","getCircleOptions","centerPosition","poiCollection","center","radius","strokeColor","strokeOpacity","strokeWeight","fillColor","fillOpacity","getPolygonOptions","paths","getPolylineOptions","path","Map","canBeInterpretedAsNumber","value","isNaN","normalizeDimension","dimension","normalizedDimension","String","forceZoom","length","collectionType","style","height","mapHeight","width","mapWidth","groupCategories","categoryUid","groupedCategories","x","y","categories","uid","inList","hasOwnProperty","getCategoriesOfCheckboxesWithStatus","form","isChecked","querySelectorAll","forEach","checkbox","push","getMarkersToChangeVisibilityFor","markers","marker","allCategoriesOfMarker","categoriesOfCheckboxesWithStatus","i","markerCategoryHasCheckboxWithStatus","j","k","document","createElement","add","setAttribute","contentRecord","appendChild","getCheckbox","querySelector","insertAdjacentHTML","title","addEventListener","checked","setVisible","insertAdjacentElement","category","div","innerHTML","obj","count","key","createMarker","createArea","createRoute","createRadius","c","relatedCategories","icon","Marker","position","setDraggable","markerIcon","url","scaledSize","Size","markerIconWidth","markerIconHeight","anchor","Point","markerIconAnchorPosX","markerIconAnchorPosY","setIcon","extend","addEditListeners","addInfoWindow","latLng","mapPosition","area","Polygon","setMap","route","Polyline","circle","Circle","union","getBounds","event","addListener","fetch","ajaxUrl","method","headers","Content-Type","body","stringify","then","response","json","data","close","setContent","content","setPosition","open","catch","error","console","list","item","search","mapContainer","getPosition","toFixed","prevAll","val","maps2GoogleMaps","initMap","override","address","places","Autocomplete","fields","keyCode"],"mappings":"MAAAA,YACAC,WAAA,GACAC,mBAAA,GACAC,aAAA,GACAC,OAAA,GACAC,WAAA,GACAC,eAAA,GACAC,SAAA,GACAC,IAAA,GAOAC,YAAAC,EAAAC,GAaA,IAEAC,EACAC,EAfAC,KAAAb,WAAA,GACAa,KAAAZ,mBAAA,GACAY,KAAAX,aAAA,GACAW,KAAAV,OAAA,IAAAW,OAAAC,KAAAC,aACAH,KAAAT,WAAA,IAAAU,OAAAC,KAAAE,WACAJ,KAAAR,eAAAa,KAAAC,MAAAV,EAAAW,QAAAC,MAAA,MAAA,EACAR,KAAAP,SAAAG,EAAAa,UAAAC,SAAA,YAAA,EAEAV,KAAAW,iBAAAf,EAAAC,EAAAe,QAAA,EAEAZ,KAAAa,UAAAjB,EAAAC,CAAA,EAEA,KAAA,IAAAG,KAAAR,gBAAA,OAAAQ,KAAAR,gBAEAM,EAAAgB,OAAAlB,EAAAW,QAAAQ,QAAA,EACAhB,EAAAe,OAAAlB,EAAAW,QAAAS,SAAA,EACAlB,GAAAC,GACAC,KAAAiB,qBAAAnB,EAAAC,CAAA,EACAC,KAAAN,IAAAwB,UAAA,IAAAjB,OAAAC,KAAAiB,OAAArB,EAAAC,CAAA,CAAA,GAGAC,KAAAN,IAAAwB,UAAA,IAAAjB,OAAAC,KAAAiB,OAAAtB,EAAAuB,QAAAC,gBAAAxB,EAAAuB,QAAAE,gBAAA,C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AAA,IAAAD,EAAAW,QAAAV,YAAAD,EAAAW,QAAAV,YAAA,KACAqM,EAAA,KAAA,IAAAtM,EAAAW,QAAA2L,SAAAtM,EAAAW,QAAA2L,SAAA,KAEAF,gBAAA9F,KAAA,IAAAhH,YACAU,EACA,CAAA,GAAAS,KAAAC,MAAAT,CAAA,EAAA,GAAAQ,KAAAC,MAAA4L,CAAA,CAAA,CACA,CAAA,CACA,CAAA,EAGAjK,IAAAkK,EAAAvF,SAAAO,cAAA,eAAA,EACA1D,EAAAmD,SAAAO,cAAA,cAAA,EACA,OAAAgF,GAAA,OAAA1I,IACA,IAAAxD,OAAAC,KAAAkM,OAAAC,aAAAF,EAAA,CACAG,OAAA,CACA,WAEA,CAAA,EAEAH,EAAA7E,iBAAA,UAAA6C,IACA,GAAA,KAAAA,EAAAoC,QAAA,MAAA,CAAA,CACA,CAAA,EAEA","file":"GoogleMaps2.min.js","sourcesContent":["class GoogleMaps2 {\n allMarkers = [];\n categorizedMarkers = {};\n pointMarkers = [];\n bounds = {};\n infoWindow = {};\n poiCollections = {};\n editable = {};\n map = {};\n\n /**\n * @param {HTMLElement} element\n * @param {Environment} environment\n * @constructor\n */\n constructor (element, environment) {\n this.allMarkers = [];\n this.categorizedMarkers = {};\n this.pointMarkers = [];\n this.bounds = new google.maps.LatLngBounds();\n this.infoWindow = new google.maps.InfoWindow();\n this.poiCollections = JSON.parse(element.dataset.pois || \"null\");\n this.editable = element.classList.contains('editMarker');\n\n this.setMapDimensions(element, environment.settings);\n\n this.createMap(element, environment);\n\n if (typeof this.poiCollections === 'undefined' || this.poiCollections === null) {\n // Plugin: CityMap\n let lat = Number(element.dataset.latitude);\n let lng = Number(element.dataset.longitude);\n if (lat && lng) {\n this.createMarkerByLatLng(lat, lng);\n this.map.setCenter(new google.maps.LatLng(lat, lng));\n } else {\n // Fallback\n this.map.setCenter(new google.maps.LatLng(environment.extConf.defaultLatitude, environment.extConf.defaultLongitude));\n }\n } else {\n // normal case\n this.createPointByCollectionType(element, environment);\n if (\n typeof environment.settings.markerClusterer !== 'undefined'\n && environment.settings.markerClusterer.enable === 1\n ) {\n new MarkerClusterer(\n this.map,\n this.pointMarkers,\n { imagePath: environment.settings.markerClusterer.imagePath }\n );\n }\n\n if (this.countObjectProperties(this.categorizedMarkers) > 1) {\n this.showSwitchableCategories(element, environment);\n }\n\n if (this.shouldFitBounds(environment.settings)) {\n this.map.fitBounds(this.bounds);\n } else {\n this.map.setCenter(new google.maps.LatLng(this.poiCollections[0].latitude, this.poiCollections[0].longitude));\n }\n }\n }\n\n /**\n * Return a MapOptions object which can be assigned to the Map object of Google\n *\n * @param {Settings} settings\n * @return {object}\n */\n getMapOptions = settings => {\n let mapOptions = {\n mapTypeId: '',\n zoom: parseInt(settings.zoom),\n zoomControl: (parseInt(settings.zoomControl) !== 0),\n mapTypeControl: (parseInt(settings.mapTypeControl) !== 0),\n scaleControl: (parseInt(settings.scaleControl) !== 0),\n streetViewControl: (parseInt(settings.streetViewControl) !== 0),\n fullscreenControl: (parseInt(settings.fullScreenControl) !== 0),\n scrollwheel: settings.activateScrollWheel,\n styles: ''\n };\n\n if (settings.styles) {\n mapOptions.styles = eval(settings.styles);\n }\n\n switch (settings.mapTypeId) {\n case 'google.maps.MapTypeId.HYBRID':\n case 'hybrid':\n mapOptions.mapTypeId = google.maps.MapTypeId.HYBRID;\n break;\n case 'google.maps.MapTypeId.ROADMAP':\n case 'roadmap':\n mapOptions.mapTypeId = google.maps.MapTypeId.ROADMAP;\n break;\n case 'google.maps.MapTypeId.SATELLITE':\n case 'satellite':\n mapOptions.mapTypeId = google.maps.MapTypeId.SATELLITE;\n break;\n case 'google.maps.MapTypeId.TERRAIN':\n case 'terrain':\n mapOptions.mapTypeId = google.maps.MapTypeId.TERRAIN;\n break;\n }\n\n return mapOptions;\n }\n\n /**\n * Returns CircleOptions which can be assigned to the Circle object of Google\n *\n * @param {L.Map} map\n * @param {object} centerPosition\n * @param {PoiCollection} poiCollection\n * @return {object}\n */\n getCircleOptions (map, centerPosition, poiCollection) {\n return {\n map: map,\n center: centerPosition,\n radius: poiCollection.radius,\n strokeColor: poiCollection.strokeColor,\n strokeOpacity: poiCollection.strokeOpacity,\n strokeWeight: poiCollection.strokeWeight,\n fillColor: poiCollection.fillColor,\n fillOpacity: poiCollection.fillOpacity\n };\n }\n\n /**\n * Returns PolygonOptions which can be assigned to the Polygon object of Google\n *\n * @param {object} paths\n * @param {PoiCollection} poiCollection\n * @return {object}\n */\n getPolygonOptions (paths, poiCollection) {\n return {\n paths: paths,\n strokeColor: poiCollection.strokeColor,\n strokeOpacity: poiCollection.strokeOpacity,\n strokeWeight: poiCollection.strokeWeight,\n fillColor: poiCollection.fillColor,\n fillOpacity: poiCollection.fillOpacity\n };\n }\n\n /**\n * Return PolylineOptions which can be assigned to the Polyline object of Google\n *\n * @param {object} paths\n * @param {PoiCollection} poiCollection\n * @return {object}\n */\n getPolylineOptions (paths, poiCollection) {\n return {\n path: paths,\n strokeColor: poiCollection.strokeColor,\n strokeOpacity: poiCollection.strokeOpacity,\n strokeWeight: poiCollection.strokeWeight,\n };\n }\n\n /**\n * Create Map\n *\n * @param {HTMLElement} element\n * @param {Environment} environment\n */\n createMap (element, environment) {\n this.map = new google.maps.Map(\n element,\n this.getMapOptions(environment.settings)\n );\n }\n\n /**\n * @param {string | number} value\n * @return {boolean}\n */\n canBeInterpretedAsNumber(value) {\n return typeof value === 'number' || !isNaN(Number(value));\n }\n\n /**\n * @param {string | number} dimension\n * @returns {string}\n */\n normalizeDimension(dimension) {\n let normalizedDimension = String(dimension);\n\n if (this.canBeInterpretedAsNumber(normalizedDimension)) {\n normalizedDimension += 'px';\n }\n\n return normalizedDimension;\n }\n\n /**\n * @param {Settings} settings\n * @returns {boolean}\n */\n shouldFitBounds(settings) {\n if (settings.forceZoom === true) {\n return false;\n }\n\n if (this.poiCollections === null) {\n return false;\n }\n\n if (this.poiCollections.length > 1) {\n return true;\n }\n\n if (\n this.poiCollections.length === 1\n && (\n this.poiCollections[0].collectionType === \"Area\"\n || this.poiCollections[0].collectionType === \"Route\"\n )\n ) {\n return true;\n }\n\n return false;\n }\n\n /**\n * @param {HTMLElement} element\n * @param {Settings} settings\n */\n setMapDimensions(element, settings) {\n element.style.height = this.normalizeDimension(settings.mapHeight);\n element.style.width = this.normalizeDimension(settings.mapWidth);\n }\n\n /**\n * Group Categories\n *\n * @param {Environment} environment\n */\n groupCategories = environment => {\n let groupedCategories = {};\n let categoryUid = \"0\";\n for (let x = 0; x < this.poiCollections.length; x++) {\n for (let y = 0; y < this.poiCollections[x].categories.length; y++) {\n categoryUid = String(this.poiCollections[x].categories[y].uid);\n if (this.inList(environment.settings.categories, categoryUid) > -1 && !groupedCategories.hasOwnProperty(categoryUid)) {\n groupedCategories[categoryUid] = this.poiCollections[x].categories[y];\n }\n }\n }\n\n return groupedCategories;\n };\n\n /**\n * Get categories of all checkboxes with a given status\n *\n * @param {HTMLElement} form The HTML form element containing the checkboxes\n * @param {boolean} isChecked Get checkboxes of this status only\n */\n getCategoriesOfCheckboxesWithStatus = (form, isChecked) => {\n let categories = [];\n let checkboxes = isChecked ? form.querySelectorAll(\"input:checked\") : form.querySelectorAll(\"input:not(input:checked)\");\n\n checkboxes.forEach(checkbox => {\n categories.push(parseInt(checkbox.value));\n });\n\n return categories;\n }\n\n getMarkersToChangeVisibilityFor = (categoryUid, form, isChecked) => {\n let markers = [];\n if (this.allMarkers.length === 0) {\n return markers;\n }\n\n let marker = null;\n let allCategoriesOfMarker = null;\n let categoriesOfCheckboxesWithStatus = this.getCategoriesOfCheckboxesWithStatus(form, isChecked);\n for (let i = 0; i < this.allMarkers.length; i++) {\n marker = this.allMarkers[i];\n allCategoriesOfMarker = marker.poiCollection.categories;\n if (allCategoriesOfMarker.length === 0) {\n continue;\n }\n\n let markerCategoryHasCheckboxWithStatus;\n for (let j = 0; j < allCategoriesOfMarker.length; j++) {\n markerCategoryHasCheckboxWithStatus = false;\n for (let k = 0; k < categoriesOfCheckboxesWithStatus.length; k++) {\n if (allCategoriesOfMarker[j].uid === categoriesOfCheckboxesWithStatus[k]) {\n markerCategoryHasCheckboxWithStatus = true;\n }\n }\n if (markerCategoryHasCheckboxWithStatus === isChecked) {\n break;\n }\n }\n\n if (markerCategoryHasCheckboxWithStatus) {\n markers.push(marker.marker);\n }\n }\n\n return markers;\n }\n\n /**\n * Show switchable categories\n *\n * @param {HTMLElement} element\n * @param {Environment} environment\n */\n showSwitchableCategories = (element, environment) => {\n let categories = this.groupCategories(environment);\n let form = document.createElement(\"form\");\n let span = {};\n\n form.classList.add(\"txMaps2Form\");\n form.setAttribute(\"id\", \"txMaps2Form-\" + environment.contentRecord.uid);\n\n // Add checkbox for category\n for (let categoryUid in categories) {\n if (categories.hasOwnProperty(categoryUid)) {\n form.appendChild(this.getCheckbox(categories[categoryUid]));\n form.querySelector(\"#checkCategory_\" + categoryUid)?.insertAdjacentHTML(\n \"afterend\",\n `${categories[categoryUid].title}`\n );\n }\n }\n\n // Add listener for checkboxes\n form.querySelectorAll(\"input\").forEach((checkbox) => {\n checkbox.addEventListener(\"click\", () => {\n let isChecked = (checkbox).checked;\n let categoryUid = (checkbox).value;\n let markers = this.getMarkersToChangeVisibilityFor(categoryUid, form, isChecked);\n\n markers.forEach((marker) => {\n marker.setVisible(isChecked);\n });\n });\n });\n\n element.insertAdjacentElement(\"afterend\", form);\n }\n\n /**\n * Get Checkbox for Category\n *\n * @param category\n */\n getCheckbox(category) {\n let div = document.createElement(\"div\");\n div.classList.add(\"form-group\");\n div.innerHTML = `\n
\n \n
`;\n\n return div;\n }\n\n /**\n * Count Object properties\n *\n * @param obj\n */\n countObjectProperties = obj => {\n let count = 0;\n for (let key in obj) {\n if (obj.hasOwnProperty(key)) {\n count++;\n }\n }\n return count;\n }\n\n /**\n * Create Point by CollectionType\n *\n * @param {HTMLElement} element\n * @param {Environment} environment\n */\n createPointByCollectionType = (element, environment) => {\n let marker;\n let categoryUid = 0;\n\n if (this.poiCollections !== null && this.poiCollections.length) {\n this.poiCollections.forEach(poiCollection => {\n if (poiCollection.strokeColor === \"\") {\n poiCollection.strokeColor = environment.extConf.strokeColor;\n }\n if (poiCollection.strokeOpacity === \"\") {\n poiCollection.strokeOpacity = environment.extConf.strokeOpacity;\n }\n if (poiCollection.strokeWeight === \"\") {\n poiCollection.strokeWeight = environment.extConf.strokeWeight;\n }\n if (poiCollection.fillColor === \"\") {\n poiCollection.fillColor = environment.extConf.fillColor;\n }\n if (poiCollection.fillOpacity === \"\") {\n poiCollection.fillOpacity = environment.extConf.fillOpacity;\n }\n\n marker = null;\n switch (poiCollection.collectionType) {\n case \"Point\":\n marker = this.createMarker(poiCollection, element, environment);\n break;\n case \"Area\":\n marker = this.createArea(poiCollection, environment);\n break;\n case \"Route\":\n marker = this.createRoute(poiCollection, environment);\n break;\n case \"Radius\":\n marker = this.createRadius(poiCollection, environment);\n break;\n }\n\n if (marker !== null) {\n this.allMarkers.push({\n marker: marker,\n poiCollection: poiCollection\n });\n\n categoryUid = 0;\n for (let c = 0; c < poiCollection.categories.length; c++) {\n categoryUid = poiCollection.categories[c].uid;\n if (!this.categorizedMarkers.hasOwnProperty(categoryUid)) {\n this.categorizedMarkers[categoryUid] = [];\n }\n this.categorizedMarkers[categoryUid].push({\n marker: marker,\n relatedCategories: poiCollection.categories\n });\n }\n }\n });\n }\n }\n\n /**\n * Create Marker with InfoWindow\n *\n * @param {PoiCollection} poiCollection\n * @param {HTMLElement} element\n * @param {Environment} environment\n */\n createMarker = (poiCollection, element, environment) => {\n let categoryUid = \"0\";\n let marker = new google.maps.Marker({\n position: new google.maps.LatLng(poiCollection.latitude, poiCollection.longitude),\n map: this.map\n });\n marker.setDraggable(this.editable);\n\n // assign first found marker icon, if available\n if (poiCollection.hasOwnProperty(\"markerIcon\") && poiCollection.markerIcon !== \"\") {\n let icon = {\n url: poiCollection.markerIcon,\n scaledSize: new google.maps.Size(poiCollection.markerIconWidth, poiCollection.markerIconHeight),\n anchor: new google.maps.Point(poiCollection.markerIconAnchorPosX, poiCollection.markerIconAnchorPosY)\n };\n marker.setIcon(icon);\n }\n\n this.pointMarkers.push(marker);\n this.bounds.extend(marker.position);\n\n if (this.editable) {\n this.addEditListeners(element, marker, poiCollection, environment);\n } else {\n this.addInfoWindow(marker, poiCollection, environment);\n }\n\n return marker;\n }\n\n /**\n * Create Area\n *\n * @param poiCollection\n * @param environment\n */\n createArea = (poiCollection, environment) => {\n let latLng;\n let paths = [];\n for (let i = 0; i < poiCollection.pois.length; i++) {\n latLng = new google.maps.LatLng(poiCollection.pois[i].latitude, poiCollection.pois[i].longitude);\n this.bounds.extend(latLng);\n paths.push(latLng);\n }\n\n if (paths.length === 0) {\n paths.push(this.mapPosition);\n }\n\n let area = new google.maps.Polygon(this.getPolygonOptions(paths, poiCollection));\n area.setMap(this.map);\n this.addInfoWindow(area, poiCollection, environment);\n\n return area;\n }\n\n /**\n * Create Route\n *\n * @param poiCollection\n * @param environment\n */\n createRoute = (poiCollection, environment) => {\n let latLng;\n let paths = [];\n for (let i = 0; i < poiCollection.pois.length; i++) {\n latLng = new google.maps.LatLng(poiCollection.pois[i].latitude, poiCollection.pois[i].longitude);\n this.bounds.extend(latLng);\n paths.push(latLng);\n }\n\n if (paths.length === 0) {\n paths.push(this.mapPosition);\n }\n\n let route = new google.maps.Polyline(this.getPolylineOptions(paths, poiCollection));\n route.setMap(this.map);\n this.addInfoWindow(route, poiCollection, environment);\n\n return route;\n }\n\n /**\n * Create Radius\n *\n * @param poiCollection\n * @param environment\n */\n createRadius = (poiCollection, environment) => {\n let circle = new google.maps.Circle(\n this.getCircleOptions(\n this.map,\n new google.maps.LatLng(poiCollection.latitude, poiCollection.longitude),\n poiCollection\n )\n );\n\n this.bounds.union(circle.getBounds());\n this.addInfoWindow(circle, poiCollection, environment);\n\n return circle;\n }\n\n /**\n * Add Info Window to element\n *\n * @param element\n * @param poiCollection\n * @param environment\n */\n addInfoWindow = (element, poiCollection, environment) => {\n // we need these both vars to be set global. So that we can access them in Listener\n let infoWindow = this.infoWindow;\n let map = this.map;\n google.maps.event.addListener(element, \"click\", event => {\n fetch(environment.ajaxUrl, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify({\n poiCollection: poiCollection.uid\n })\n })\n .then(response => response.json())\n .then(data => {\n infoWindow.close();\n infoWindow.setContent(data.content);\n\n // Do not set pointer of InfoWindow to the same pointer of the POI icon.\n // In case of Point the pointer of InfoWindow should be at mouse position.\n if (poiCollection.collectionType === \"Point\") {\n infoWindow.setPosition(null);\n infoWindow.open(map, element);\n } else {\n infoWindow.setPosition(new google.maps.LatLng(poiCollection.latitude, poiCollection.longitude));\n infoWindow.open(map);\n }\n })\n .catch(error => console.error('Error:', error));\n });\n }\n\n /**\n * Check for item in list\n * Check if an item exists in a comma-separated list of items.\n *\n * @param list\n * @param item\n */\n inList = (list, item) => {\n let catSearch = ',' + list + ',';\n item = ',' + item + ',';\n return catSearch.search(item);\n };\n\n /**\n * Create Marker with InfoWindow\n *\n * @param latitude\n * @param longitude\n */\n createMarkerByLatLng = (latitude, longitude) => {\n let marker = new google.maps.Marker({\n position: new google.maps.LatLng(latitude, longitude),\n map: this.map\n });\n this.bounds.extend(marker.position);\n };\n\n /**\n * Add Edit Listeners\n * This will only work for Markers (Point)\n *\n * @param mapContainer\n * @param marker\n * @param poiCollection\n * @param environment\n */\n addEditListeners = (mapContainer, marker, poiCollection, environment) => {\n // update fields and marker while dragging\n google.maps.event.addListener(marker, 'dragend', () => {\n let lat = marker.getPosition().lat().toFixed(6);\n let lng = marker.getPosition().lng().toFixed(6);\n mapContainer.prevAll(\"input.latitude-\" + environment.contentRecord.uid).val(lat);\n mapContainer.prevAll(\"input.longitude-\" + environment.contentRecord.uid).val(lng);\n });\n\n // update fields and marker when clicking on the map\n google.maps.event.addListener(this.map, 'click', event => {\n marker.setPosition(event.latLng);\n mapContainer.prevAll(\"input.latitude-\" + environment.contentRecord.uid).val(event.latLng.lat().toFixed(6));\n mapContainer.prevAll(\"input.longitude-\" + environment.contentRecord.uid).val(event.latLng.lng().toFixed(6));\n });\n };\n}\n\nlet maps2GoogleMaps = [];\n\n/**\n * This function will be called by the &callback argument of the Google Maps API library\n */\nfunction initMap () {\n document.querySelectorAll(\".maps2\").forEach(element => {\n const environment = typeof element.dataset.environment !== 'undefined' ? element.dataset.environment : '{}';\n const override = typeof element.dataset.override !== 'undefined' ? element.dataset.override : '{}';\n\n maps2GoogleMaps.push(new GoogleMaps2(\n element,\n {...JSON.parse(environment), ...JSON.parse(override)}\n ));\n });\n\n // Initialize radius search\n let address = document.querySelector('#maps2Address');\n let radius = document.querySelector('#maps2Radius');\n if (address !== null && radius !== null) {\n let autocomplete = new google.maps.places.Autocomplete(address, {\n fields: [\n \"place_id\"\n ]\n });\n\n address.addEventListener(\"keydown\", event => {\n if (event.keyCode === 13) return false;\n });\n }\n}\n"]} \ No newline at end of file +{"version":3,"sources":["GoogleMaps2.js"],"names":["GoogleMaps2","allMarkers","categorizedMarkers","pointMarkers","bounds","infoWindow","poiCollections","editable","map","constructor","element","environment","lat","lng","this","google","maps","LatLngBounds","InfoWindow","JSON","parse","dataset","pois","classList","contains","setMapDimensions","settings","createMap","Number","latitude","longitude","createMarkerByLatLng","setCenter","LatLng","extConf","defaultLatitude","defaultLongitude","createPointByCollectionType","markerClusterer","enable","MarkerClusterer","imagePath","countObjectProperties","showSwitchableCategories","shouldFitBounds","fitBounds","getMapOptions","let","mapOptions","mapTypeId","zoom","parseInt","zoomControl","mapTypeControl","scaleControl","streetViewControl","fullscreenControl","fullScreenControl","scrollwheel","activateScrollWheel","styles","eval","MapTypeId","HYBRID","ROADMAP","SATELLITE","TERRAIN","getCircleOptions","centerPosition","poiCollection","center","radius","strokeColor","strokeOpacity","strokeWeight","fillColor","fillOpacity","getPolygonOptions","paths","getPolylineOptions","path","Map","canBeInterpretedAsNumber","value","isNaN","normalizeDimension","dimension","normalizedDimension","String","forceZoom","length","collectionType","style","height","mapHeight","width","mapWidth","groupCategories","categoryUid","groupedCategories","x","y","categories","uid","inList","hasOwnProperty","getCategoriesOfCheckboxesWithStatus","form","isChecked","querySelectorAll","forEach","checkbox","push","getMarkersToChangeVisibilityFor","markers","marker","allCategoriesOfMarker","categoriesOfCheckboxesWithStatus","i","markerCategoryHasCheckboxWithStatus","j","k","document","createElement","add","setAttribute","contentRecord","appendChild","getCheckbox","querySelector","insertAdjacentHTML","title","addEventListener","checked","setVisible","insertAdjacentElement","category","div","innerHTML","obj","count","key","createMarker","createArea","createRoute","createRadius","c","relatedCategories","icon","Marker","position","setDraggable","markerIcon","url","scaledSize","Size","markerIconWidth","markerIconHeight","anchor","Point","markerIconAnchorPosX","markerIconAnchorPosY","setIcon","extend","addEditListeners","addInfoWindow","latLng","mapPosition","area","Polygon","setMap","route","Polyline","circle","Circle","union","getBounds","event","addListener","fetch","ajaxUrl","method","headers","Content-Type","body","stringify","then","response","json","data","close","setContent","content","setPosition","open","catch","error","console","list","item","search","mapContainer","getPosition","toFixed","prevAll","val","maps2GoogleMaps","initMap","override","extended","deep","arguments","Object","prototype","toString","call","prop","address","places","Autocomplete","fields","keyCode"],"mappings":"MAAAA,YACAC,WAAA,GACAC,mBAAA,GACAC,aAAA,GACAC,OAAA,GACAC,WAAA,GACAC,eAAA,GACAC,SAAA,GACAC,IAAA,GAOAC,YAAAC,EAAAC,GAaA,IAEAC,EACAC,EAfAC,KAAAb,WAAA,GACAa,KAAAZ,mBAAA,GACAY,KAAAX,aAAA,GACAW,KAAAV,OAAA,IAAAW,OAAAC,KAAAC,aACAH,KAAAT,WAAA,IAAAU,OAAAC,KAAAE,WACAJ,KAAAR,eAAAa,KAAAC,MAAAV,EAAAW,QAAAC,MAAA,MAAA,EACAR,KAAAP,SAAAG,EAAAa,UAAAC,SAAA,YAAA,EAEAV,KAAAW,iBAAAf,EAAAC,EAAAe,QAAA,EAEAZ,KAAAa,UAAAjB,EAAAC,CAAA,EAEA,KAAA,IAAAG,KAAAR,gBAAA,OAAAQ,KAAA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EAAAmD,SAAAO,cAAA,cAAA,EACA,OAAAwF,GAAA,OAAAlJ,IACA,IAAAxD,OAAAC,KAAA0M,OAAAC,aAAAF,EAAA,CACAG,OAAA,CACA,WAEA,CAAA,EAEAH,EAAArF,iBAAA,UAAA6C,IACA,GAAA,KAAAA,EAAA4C,QAAA,MAAA,CAAA,CACA,CAAA,EAEA","file":"GoogleMaps2.min.js","sourcesContent":["class GoogleMaps2 {\n allMarkers = [];\n categorizedMarkers = {};\n pointMarkers = [];\n bounds = {};\n infoWindow = {};\n poiCollections = {};\n editable = {};\n map = {};\n\n /**\n * @param {HTMLElement} element\n * @param {Environment} environment\n * @constructor\n */\n constructor (element, environment) {\n this.allMarkers = [];\n this.categorizedMarkers = {};\n this.pointMarkers = [];\n this.bounds = new google.maps.LatLngBounds();\n this.infoWindow = new google.maps.InfoWindow();\n this.poiCollections = JSON.parse(element.dataset.pois || \"null\");\n this.editable = element.classList.contains('editMarker');\n\n this.setMapDimensions(element, environment.settings);\n\n this.createMap(element, environment);\n\n if (typeof this.poiCollections === 'undefined' || this.poiCollections === null) {\n // Plugin: CityMap\n let lat = Number(element.dataset.latitude);\n let lng = Number(element.dataset.longitude);\n if (lat && lng) {\n this.createMarkerByLatLng(lat, lng);\n this.map.setCenter(new google.maps.LatLng(lat, lng));\n } else {\n // Fallback\n this.map.setCenter(new google.maps.LatLng(environment.extConf.defaultLatitude, environment.extConf.defaultLongitude));\n }\n } else {\n // normal case\n this.createPointByCollectionType(element, environment);\n if (\n typeof environment.settings.markerClusterer !== 'undefined'\n && environment.settings.markerClusterer.enable === 1\n ) {\n new MarkerClusterer(\n this.map,\n this.pointMarkers,\n { imagePath: environment.settings.markerClusterer.imagePath }\n );\n }\n\n if (this.countObjectProperties(this.categorizedMarkers) > 1) {\n this.showSwitchableCategories(element, environment);\n }\n\n if (this.shouldFitBounds(environment.settings)) {\n this.map.fitBounds(this.bounds);\n } else {\n this.map.setCenter(new google.maps.LatLng(this.poiCollections[0].latitude, this.poiCollections[0].longitude));\n }\n }\n }\n\n /**\n * Return a MapOptions object which can be assigned to the Map object of Google\n *\n * @param {Settings} settings\n * @return {object}\n */\n getMapOptions = settings => {\n let mapOptions = {\n mapTypeId: '',\n zoom: parseInt(settings.zoom),\n zoomControl: (parseInt(settings.zoomControl) !== 0),\n mapTypeControl: (parseInt(settings.mapTypeControl) !== 0),\n scaleControl: (parseInt(settings.scaleControl) !== 0),\n streetViewControl: (parseInt(settings.streetViewControl) !== 0),\n fullscreenControl: (parseInt(settings.fullScreenControl) !== 0),\n scrollwheel: settings.activateScrollWheel,\n styles: ''\n };\n\n if (settings.styles) {\n mapOptions.styles = eval(settings.styles);\n }\n\n switch (settings.mapTypeId) {\n case 'google.maps.MapTypeId.HYBRID':\n case 'hybrid':\n mapOptions.mapTypeId = google.maps.MapTypeId.HYBRID;\n break;\n case 'google.maps.MapTypeId.ROADMAP':\n case 'roadmap':\n mapOptions.mapTypeId = google.maps.MapTypeId.ROADMAP;\n break;\n case 'google.maps.MapTypeId.SATELLITE':\n case 'satellite':\n mapOptions.mapTypeId = google.maps.MapTypeId.SATELLITE;\n break;\n case 'google.maps.MapTypeId.TERRAIN':\n case 'terrain':\n mapOptions.mapTypeId = google.maps.MapTypeId.TERRAIN;\n break;\n }\n\n return mapOptions;\n }\n\n /**\n * Returns CircleOptions which can be assigned to the Circle object of Google\n *\n * @param {L.Map} map\n * @param {object} centerPosition\n * @param {PoiCollection} poiCollection\n * @return {object}\n */\n getCircleOptions (map, centerPosition, poiCollection) {\n return {\n map: map,\n center: centerPosition,\n radius: poiCollection.radius,\n strokeColor: poiCollection.strokeColor,\n strokeOpacity: poiCollection.strokeOpacity,\n strokeWeight: poiCollection.strokeWeight,\n fillColor: poiCollection.fillColor,\n fillOpacity: poiCollection.fillOpacity\n };\n }\n\n /**\n * Returns PolygonOptions which can be assigned to the Polygon object of Google\n *\n * @param {object} paths\n * @param {PoiCollection} poiCollection\n * @return {object}\n */\n getPolygonOptions (paths, poiCollection) {\n return {\n paths: paths,\n strokeColor: poiCollection.strokeColor,\n strokeOpacity: poiCollection.strokeOpacity,\n strokeWeight: poiCollection.strokeWeight,\n fillColor: poiCollection.fillColor,\n fillOpacity: poiCollection.fillOpacity\n };\n }\n\n /**\n * Return PolylineOptions which can be assigned to the Polyline object of Google\n *\n * @param {object} paths\n * @param {PoiCollection} poiCollection\n * @return {object}\n */\n getPolylineOptions (paths, poiCollection) {\n return {\n path: paths,\n strokeColor: poiCollection.strokeColor,\n strokeOpacity: poiCollection.strokeOpacity,\n strokeWeight: poiCollection.strokeWeight,\n };\n }\n\n /**\n * Create Map\n *\n * @param {HTMLElement} element\n * @param {Environment} environment\n */\n createMap (element, environment) {\n this.map = new google.maps.Map(\n element,\n this.getMapOptions(environment.settings)\n );\n }\n\n /**\n * @param {string | number} value\n * @return {boolean}\n */\n canBeInterpretedAsNumber(value) {\n return typeof value === 'number' || !isNaN(Number(value));\n }\n\n /**\n * @param {string | number} dimension\n * @returns {string}\n */\n normalizeDimension(dimension) {\n let normalizedDimension = String(dimension);\n\n if (this.canBeInterpretedAsNumber(normalizedDimension)) {\n normalizedDimension += 'px';\n }\n\n return normalizedDimension;\n }\n\n /**\n * @param {Settings} settings\n * @returns {boolean}\n */\n shouldFitBounds(settings) {\n if (settings.forceZoom === true) {\n return false;\n }\n\n if (this.poiCollections === null) {\n return false;\n }\n\n if (this.poiCollections.length > 1) {\n return true;\n }\n\n if (\n this.poiCollections.length === 1\n && (\n this.poiCollections[0].collectionType === \"Area\"\n || this.poiCollections[0].collectionType === \"Route\"\n )\n ) {\n return true;\n }\n\n return false;\n }\n\n /**\n * @param {HTMLElement} element\n * @param {Settings} settings\n */\n setMapDimensions(element, settings) {\n element.style.height = this.normalizeDimension(settings.mapHeight);\n element.style.width = this.normalizeDimension(settings.mapWidth);\n }\n\n /**\n * Group Categories\n *\n * @param {Environment} environment\n */\n groupCategories = environment => {\n let groupedCategories = {};\n let categoryUid = \"0\";\n for (let x = 0; x < this.poiCollections.length; x++) {\n for (let y = 0; y < this.poiCollections[x].categories.length; y++) {\n categoryUid = String(this.poiCollections[x].categories[y].uid);\n if (this.inList(environment.settings.categories, categoryUid) > -1 && !groupedCategories.hasOwnProperty(categoryUid)) {\n groupedCategories[categoryUid] = this.poiCollections[x].categories[y];\n }\n }\n }\n\n return groupedCategories;\n };\n\n /**\n * Get categories of all checkboxes with a given status\n *\n * @param {HTMLElement} form The HTML form element containing the checkboxes\n * @param {boolean} isChecked Get checkboxes of this status only\n */\n getCategoriesOfCheckboxesWithStatus = (form, isChecked) => {\n let categories = [];\n let checkboxes = isChecked ? form.querySelectorAll(\"input:checked\") : form.querySelectorAll(\"input:not(input:checked)\");\n\n checkboxes.forEach(checkbox => {\n categories.push(parseInt(checkbox.value));\n });\n\n return categories;\n }\n\n getMarkersToChangeVisibilityFor = (categoryUid, form, isChecked) => {\n let markers = [];\n if (this.allMarkers.length === 0) {\n return markers;\n }\n\n let marker = null;\n let allCategoriesOfMarker = null;\n let categoriesOfCheckboxesWithStatus = this.getCategoriesOfCheckboxesWithStatus(form, isChecked);\n for (let i = 0; i < this.allMarkers.length; i++) {\n marker = this.allMarkers[i];\n allCategoriesOfMarker = marker.poiCollection.categories;\n if (allCategoriesOfMarker.length === 0) {\n continue;\n }\n\n let markerCategoryHasCheckboxWithStatus;\n for (let j = 0; j < allCategoriesOfMarker.length; j++) {\n markerCategoryHasCheckboxWithStatus = false;\n for (let k = 0; k < categoriesOfCheckboxesWithStatus.length; k++) {\n if (allCategoriesOfMarker[j].uid === categoriesOfCheckboxesWithStatus[k]) {\n markerCategoryHasCheckboxWithStatus = true;\n }\n }\n if (markerCategoryHasCheckboxWithStatus === isChecked) {\n break;\n }\n }\n\n if (markerCategoryHasCheckboxWithStatus) {\n markers.push(marker.marker);\n }\n }\n\n return markers;\n }\n\n /**\n * Show switchable categories\n *\n * @param {HTMLElement} element\n * @param {Environment} environment\n */\n showSwitchableCategories = (element, environment) => {\n let categories = this.groupCategories(environment);\n let form = document.createElement(\"form\");\n let span = {};\n\n form.classList.add(\"txMaps2Form\");\n form.setAttribute(\"id\", \"txMaps2Form-\" + environment.contentRecord.uid);\n\n // Add checkbox for category\n for (let categoryUid in categories) {\n if (categories.hasOwnProperty(categoryUid)) {\n form.appendChild(this.getCheckbox(categories[categoryUid]));\n form.querySelector(\"#checkCategory_\" + categoryUid)?.insertAdjacentHTML(\n \"afterend\",\n `${categories[categoryUid].title}`\n );\n }\n }\n\n // Add listener for checkboxes\n form.querySelectorAll(\"input\").forEach((checkbox) => {\n checkbox.addEventListener(\"click\", () => {\n let isChecked = (checkbox).checked;\n let categoryUid = (checkbox).value;\n let markers = this.getMarkersToChangeVisibilityFor(categoryUid, form, isChecked);\n\n markers.forEach((marker) => {\n marker.setVisible(isChecked);\n });\n });\n });\n\n element.insertAdjacentElement(\"afterend\", form);\n }\n\n /**\n * Get Checkbox for Category\n *\n * @param category\n */\n getCheckbox(category) {\n let div = document.createElement(\"div\");\n div.classList.add(\"form-group\");\n div.innerHTML = `\n
\n \n
`;\n\n return div;\n }\n\n /**\n * Count Object properties\n *\n * @param obj\n */\n countObjectProperties = obj => {\n let count = 0;\n for (let key in obj) {\n if (obj.hasOwnProperty(key)) {\n count++;\n }\n }\n return count;\n }\n\n /**\n * Create Point by CollectionType\n *\n * @param {HTMLElement} element\n * @param {Environment} environment\n */\n createPointByCollectionType = (element, environment) => {\n let marker;\n let categoryUid = 0;\n\n if (this.poiCollections !== null && this.poiCollections.length) {\n this.poiCollections.forEach(poiCollection => {\n if (poiCollection.strokeColor === \"\") {\n poiCollection.strokeColor = environment.extConf.strokeColor;\n }\n if (poiCollection.strokeOpacity === \"\") {\n poiCollection.strokeOpacity = environment.extConf.strokeOpacity;\n }\n if (poiCollection.strokeWeight === \"\") {\n poiCollection.strokeWeight = environment.extConf.strokeWeight;\n }\n if (poiCollection.fillColor === \"\") {\n poiCollection.fillColor = environment.extConf.fillColor;\n }\n if (poiCollection.fillOpacity === \"\") {\n poiCollection.fillOpacity = environment.extConf.fillOpacity;\n }\n\n marker = null;\n switch (poiCollection.collectionType) {\n case \"Point\":\n marker = this.createMarker(poiCollection, element, environment);\n break;\n case \"Area\":\n marker = this.createArea(poiCollection, environment);\n break;\n case \"Route\":\n marker = this.createRoute(poiCollection, environment);\n break;\n case \"Radius\":\n marker = this.createRadius(poiCollection, environment);\n break;\n }\n\n if (marker !== null) {\n this.allMarkers.push({\n marker: marker,\n poiCollection: poiCollection\n });\n\n categoryUid = 0;\n for (let c = 0; c < poiCollection.categories.length; c++) {\n categoryUid = poiCollection.categories[c].uid;\n if (!this.categorizedMarkers.hasOwnProperty(categoryUid)) {\n this.categorizedMarkers[categoryUid] = [];\n }\n this.categorizedMarkers[categoryUid].push({\n marker: marker,\n relatedCategories: poiCollection.categories\n });\n }\n }\n });\n }\n }\n\n /**\n * Create Marker with InfoWindow\n *\n * @param {PoiCollection} poiCollection\n * @param {HTMLElement} element\n * @param {Environment} environment\n */\n createMarker = (poiCollection, element, environment) => {\n let categoryUid = \"0\";\n let marker = new google.maps.Marker({\n position: new google.maps.LatLng(poiCollection.latitude, poiCollection.longitude),\n map: this.map\n });\n marker.setDraggable(this.editable);\n\n // assign first found marker icon, if available\n if (poiCollection.hasOwnProperty(\"markerIcon\") && poiCollection.markerIcon !== \"\") {\n let icon = {\n url: poiCollection.markerIcon,\n scaledSize: new google.maps.Size(poiCollection.markerIconWidth, poiCollection.markerIconHeight),\n anchor: new google.maps.Point(poiCollection.markerIconAnchorPosX, poiCollection.markerIconAnchorPosY)\n };\n marker.setIcon(icon);\n }\n\n this.pointMarkers.push(marker);\n this.bounds.extend(marker.position);\n\n if (this.editable) {\n this.addEditListeners(element, marker, poiCollection, environment);\n } else {\n this.addInfoWindow(marker, poiCollection, environment);\n }\n\n return marker;\n }\n\n /**\n * Create Area\n *\n * @param poiCollection\n * @param environment\n */\n createArea = (poiCollection, environment) => {\n let latLng;\n let paths = [];\n for (let i = 0; i < poiCollection.pois.length; i++) {\n latLng = new google.maps.LatLng(poiCollection.pois[i].latitude, poiCollection.pois[i].longitude);\n this.bounds.extend(latLng);\n paths.push(latLng);\n }\n\n if (paths.length === 0) {\n paths.push(this.mapPosition);\n }\n\n let area = new google.maps.Polygon(this.getPolygonOptions(paths, poiCollection));\n area.setMap(this.map);\n this.addInfoWindow(area, poiCollection, environment);\n\n return area;\n }\n\n /**\n * Create Route\n *\n * @param poiCollection\n * @param environment\n */\n createRoute = (poiCollection, environment) => {\n let latLng;\n let paths = [];\n for (let i = 0; i < poiCollection.pois.length; i++) {\n latLng = new google.maps.LatLng(poiCollection.pois[i].latitude, poiCollection.pois[i].longitude);\n this.bounds.extend(latLng);\n paths.push(latLng);\n }\n\n if (paths.length === 0) {\n paths.push(this.mapPosition);\n }\n\n let route = new google.maps.Polyline(this.getPolylineOptions(paths, poiCollection));\n route.setMap(this.map);\n this.addInfoWindow(route, poiCollection, environment);\n\n return route;\n }\n\n /**\n * Create Radius\n *\n * @param poiCollection\n * @param environment\n */\n createRadius = (poiCollection, environment) => {\n let circle = new google.maps.Circle(\n this.getCircleOptions(\n this.map,\n new google.maps.LatLng(poiCollection.latitude, poiCollection.longitude),\n poiCollection\n )\n );\n\n this.bounds.union(circle.getBounds());\n this.addInfoWindow(circle, poiCollection, environment);\n\n return circle;\n }\n\n /**\n * Add Info Window to element\n *\n * @param element\n * @param poiCollection\n * @param environment\n */\n addInfoWindow = (element, poiCollection, environment) => {\n // we need these both vars to be set global. So that we can access them in Listener\n let infoWindow = this.infoWindow;\n let map = this.map;\n google.maps.event.addListener(element, \"click\", event => {\n fetch(environment.ajaxUrl, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify({\n poiCollection: poiCollection.uid\n })\n })\n .then(response => response.json())\n .then(data => {\n infoWindow.close();\n infoWindow.setContent(data.content);\n\n // Do not set pointer of InfoWindow to the same pointer of the POI icon.\n // In case of Point the pointer of InfoWindow should be at mouse position.\n if (poiCollection.collectionType === \"Point\") {\n infoWindow.setPosition(null);\n infoWindow.open(map, element);\n } else {\n infoWindow.setPosition(new google.maps.LatLng(poiCollection.latitude, poiCollection.longitude));\n infoWindow.open(map);\n }\n })\n .catch(error => console.error('Error:', error));\n });\n }\n\n /**\n * Check for item in list\n * Check if an item exists in a comma-separated list of items.\n *\n * @param list\n * @param item\n */\n inList = (list, item) => {\n let catSearch = ',' + list + ',';\n item = ',' + item + ',';\n return catSearch.search(item);\n };\n\n /**\n * Create Marker with InfoWindow\n *\n * @param latitude\n * @param longitude\n */\n createMarkerByLatLng = (latitude, longitude) => {\n let marker = new google.maps.Marker({\n position: new google.maps.LatLng(latitude, longitude),\n map: this.map\n });\n this.bounds.extend(marker.position);\n };\n\n /**\n * Add Edit Listeners\n * This will only work for Markers (Point)\n *\n * @param mapContainer\n * @param marker\n * @param poiCollection\n * @param environment\n */\n addEditListeners = (mapContainer, marker, poiCollection, environment) => {\n // update fields and marker while dragging\n google.maps.event.addListener(marker, 'dragend', () => {\n let lat = marker.getPosition().lat().toFixed(6);\n let lng = marker.getPosition().lng().toFixed(6);\n mapContainer.prevAll(\"input.latitude-\" + environment.contentRecord.uid).val(lat);\n mapContainer.prevAll(\"input.longitude-\" + environment.contentRecord.uid).val(lng);\n });\n\n // update fields and marker when clicking on the map\n google.maps.event.addListener(this.map, 'click', event => {\n marker.setPosition(event.latLng);\n mapContainer.prevAll(\"input.latitude-\" + environment.contentRecord.uid).val(event.latLng.lat().toFixed(6));\n mapContainer.prevAll(\"input.longitude-\" + environment.contentRecord.uid).val(event.latLng.lng().toFixed(6));\n });\n };\n}\n\nlet maps2GoogleMaps = [];\n\n/**\n * This function will be called by the &callback argument of the Google Maps API library\n */\nfunction initMap () {\n document.querySelectorAll(\".maps2\").forEach(element => {\n const environment = typeof element.dataset.environment !== 'undefined' ? element.dataset.environment : '{}';\n const override = typeof element.dataset.override !== 'undefined' ? element.dataset.override : '{}';\n\n // Pass in the objects to merge as arguments.\n // For a deep extend, set the first argument to `true`.\n const extend = () => {\n let extended = {};\n let deep = false;\n let i = 0;\n let length = arguments.length;\n\n // Check for deep merge\n if (Object.prototype.toString.call(arguments[0]) === '[object Boolean]') {\n deep = arguments[0];\n i++;\n }\n\n // Merge the object into the extended object\n const merge = function (obj) {\n for ( var prop in obj ) {\n if ( Object.prototype.hasOwnProperty.call( obj, prop ) ) {\n // If deep merge and property is an object, merge properties\n if ( deep && Object.prototype.toString.call(obj[prop]) === '[object Object]' ) {\n extended[prop] = extend( true, extended[prop], obj[prop] );\n } else {\n extended[prop] = obj[prop];\n }\n }\n }\n };\n\n // Loop through each object and conduct a merge\n for ( ; i < length; i++ ) {\n var obj = arguments[i];\n merge(obj);\n }\n\n return extended;\n };\n\n maps2GoogleMaps.push(new GoogleMaps2(\n element,\n extend(JSON.parse(environment), JSON.parse(override))\n ));\n });\n\n // Initialize radius search\n let address = document.querySelector('#maps2Address');\n let radius = document.querySelector('#maps2Radius');\n if (address !== null && radius !== null) {\n let autocomplete = new google.maps.places.Autocomplete(address, {\n fields: [\n \"place_id\"\n ]\n });\n\n address.addEventListener(\"keydown\", event => {\n if (event.keyCode === 13) return false;\n });\n }\n}\n"]} \ No newline at end of file diff --git a/Resources/Public/JavaScript/OpenStreetMap2.min.js b/Resources/Public/JavaScript/OpenStreetMap2.min.js index 2669ceba..378e0b75 100644 --- a/Resources/Public/JavaScript/OpenStreetMap2.min.js +++ b/Resources/Public/JavaScript/OpenStreetMap2.min.js @@ -3,5 +3,5 @@ class OpenStreetMap2{element={};environment={};editable=!1;bounds={};allMarkers= - `,e}countObjectProperties(t){let e=0;for(var i in t)t.hasOwnProperty(i)&&e++;return e}createPointByCollectionType(){let i,o=0;null!==this.poiCollections&&this.poiCollections.length&&this.poiCollections.forEach(e=>{switch(""===e.strokeColor&&(e.strokeColor=this.getExtConf().strokeColor),""===e.strokeOpacity&&(e.strokeOpacity=this.getExtConf().strokeOpacity),""===e.strokeWeight&&(e.strokeWeight=this.getExtConf().strokeWeight),""===e.fillColor&&(e.fillColor=this.getExtConf().fillColor),""===e.fillOpacity&&(e.fillOpacity=this.getExtConf().fillOpacity),i=null,e.collectionType){case"Point":i=this.createMarker(e);break;case"Area":i=this.createArea(e);break;case"Route":i=this.createRoute(e);break;case"Radius":i=this.createRadius(e)}this.allMarkers.push({marker:i,poiCollection:e});for(let t=o=0;t{t=[t.latitude,t.longitude];this.bounds.extend(t),e.push(t)});var i=L.polygon(e,{color:t.strokeColor,opacity:t.strokeOpacity,weight:t.strokeWeight,fillColor:t.fillColor,fillOpacity:t.fillOpacity}).addTo(this.map);return this.addInfoWindow(i,t),i}createRoute(t){let e=[];t.pois.forEach(t=>{t=[t.latitude,t.longitude];this.bounds.extend(t),e.push(t)});var i=L.polyline(e,{color:t.strokeColor,opacity:t.strokeOpacity,weight:t.strokeWeight,fillColor:t.fillColor,fillOpacity:t.fillOpacity}).addTo(this.map);return this.addInfoWindow(i,t),i}createRadius(t){var e=L.circle([t.latitude,t.longitude],{color:t.strokeColor,opacity:t.strokeOpacity,weight:t.strokeWeight,fillColor:t.fillColor,fillOpacity:t.fillOpacity,radius:t.radius}).addTo(this.map);return this.bounds.extend(e.getBounds()),this.addInfoWindow(e,t),e}addInfoWindow(e,t){e.addEventListener("click",()=>{fetch(this.environment.ajaxUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({poiCollection:t.uid})}).then(t=>t.json()).then(t=>{e.bindPopup(t.content).openPopup()}).catch(t=>console.error("Error:",t))})}addEditListeners(i,o,t){o.on("dragend",()=>{var t=o.getLatLng().lat.toFixed(6),e=o.getLatLng().lng.toFixed(6);i.previousElementSibling?.querySelector("input.latitude-"+this.getContentRecord().uid).setAttribute("value",t),i.previousElementSibling?.querySelector("input.longitude-"+this.getContentRecord().uid).setAttribute("value",e)}),this.map.on("click",t=>{o.setLatLng(t.latlng),i.previousElementSibling?.querySelector("input.latitude-"+this.getContentRecord().uid).setAttribute("value",t.latlng.lat.toFixed(6)),i.previousElementSibling?.querySelector("input.longitude-"+this.getContentRecord().uid).setAttribute("value",t.latlng.lng.toFixed(6))})}canBeInterpretedAsNumber(t){return"number"==typeof t||!isNaN(Number(t))}getContentRecord(){return this.environment.contentRecord}getExtConf(){return this.environment.extConf}getSettings(){return this.environment.settings}}let maps2OpenStreetMaps=[];document.querySelectorAll(".maps2").forEach(t=>{var e=void 0!==t.dataset.environment?t.dataset.environment:"{}",i=void 0!==t.dataset.override?t.dataset.override:"{}";maps2OpenStreetMaps.push(new OpenStreetMap2(t,{...JSON.parse(e),...JSON.parse(i)}))}); + `,e}countObjectProperties(t){let e=0;for(var i in t)t.hasOwnProperty(i)&&e++;return e}createPointByCollectionType(){let i,o=0;null!==this.poiCollections&&this.poiCollections.length&&this.poiCollections.forEach(e=>{switch(""===e.strokeColor&&(e.strokeColor=this.getExtConf().strokeColor),""===e.strokeOpacity&&(e.strokeOpacity=this.getExtConf().strokeOpacity),""===e.strokeWeight&&(e.strokeWeight=this.getExtConf().strokeWeight),""===e.fillColor&&(e.fillColor=this.getExtConf().fillColor),""===e.fillOpacity&&(e.fillOpacity=this.getExtConf().fillOpacity),i=null,e.collectionType){case"Point":i=this.createMarker(e);break;case"Area":i=this.createArea(e);break;case"Route":i=this.createRoute(e);break;case"Radius":i=this.createRadius(e)}this.allMarkers.push({marker:i,poiCollection:e});for(let t=o=0;t{t=[t.latitude,t.longitude];this.bounds.extend(t),e.push(t)});var i=L.polygon(e,{color:t.strokeColor,opacity:t.strokeOpacity,weight:t.strokeWeight,fillColor:t.fillColor,fillOpacity:t.fillOpacity}).addTo(this.map);return this.addInfoWindow(i,t),i}createRoute(t){let e=[];t.pois.forEach(t=>{t=[t.latitude,t.longitude];this.bounds.extend(t),e.push(t)});var i=L.polyline(e,{color:t.strokeColor,opacity:t.strokeOpacity,weight:t.strokeWeight,fillColor:t.fillColor,fillOpacity:t.fillOpacity}).addTo(this.map);return this.addInfoWindow(i,t),i}createRadius(t){var e=L.circle([t.latitude,t.longitude],{color:t.strokeColor,opacity:t.strokeOpacity,weight:t.strokeWeight,fillColor:t.fillColor,fillOpacity:t.fillOpacity,radius:t.radius}).addTo(this.map);return this.bounds.extend(e.getBounds()),this.addInfoWindow(e,t),e}addInfoWindow(e,t){e.addEventListener("click",()=>{fetch(this.environment.ajaxUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({poiCollection:t.uid})}).then(t=>t.json()).then(t=>{e.bindPopup(t.content).openPopup()}).catch(t=>console.error("Error:",t))})}addEditListeners(i,o,t){o.on("dragend",()=>{var t=o.getLatLng().lat.toFixed(6),e=o.getLatLng().lng.toFixed(6);i.previousElementSibling?.querySelector("input.latitude-"+this.getContentRecord().uid).setAttribute("value",t),i.previousElementSibling?.querySelector("input.longitude-"+this.getContentRecord().uid).setAttribute("value",e)}),this.map.on("click",t=>{o.setLatLng(t.latlng),i.previousElementSibling?.querySelector("input.latitude-"+this.getContentRecord().uid).setAttribute("value",t.latlng.lat.toFixed(6)),i.previousElementSibling?.querySelector("input.longitude-"+this.getContentRecord().uid).setAttribute("value",t.latlng.lng.toFixed(6))})}canBeInterpretedAsNumber(t){return"number"==typeof t||!isNaN(Number(t))}getContentRecord(){return this.environment.contentRecord}getExtConf(){return this.environment.extConf}getSettings(){return this.environment.settings}}let maps2OpenStreetMaps=[];document.querySelectorAll(".maps2").forEach(t=>{var e=void 0!==t.dataset.environment?t.dataset.environment:"{}",i=void 0!==t.dataset.override?t.dataset.override:"{}";const n=()=>{let t={},e=!1,i=0;var o=arguments.length;for("[object Boolean]"===Object.prototype.toString.call(arguments[0])&&(e=arguments[0],i++);i 1) {\n this.showSwitchableCategories();\n }\n this.adjustMapZoom();\n }\n\n adjustMapZoom() {\n if (this.shouldFitBounds()) {\n this.map.fitBounds(this.bounds);\n } else {\n this.map.panTo([this.poiCollections[0].latitude, this.poiCollections[0].longitude]);\n }\n }\n\n /**\n * @returns {boolean}\n */\n shouldFitBounds() {\n if (this.getSettings().forceZoom === true) {\n return false;\n }\n\n if (this.poiCollections === null) {\n return false;\n }\n\n if (this.poiCollections.length > 1) {\n return true;\n }\n\n if (\n this.poiCollections.length === 1\n && (\n this.poiCollections[0].collectionType === \"Area\"\n || this.poiCollections[0].collectionType === \"Route\"\n )\n ) {\n return true;\n }\n\n return false;\n }\n\n setMapDimensions() {\n this.element.style.height = this.normalizeDimension(this.getSettings().mapHeight);\n this.element.style.width = this.normalizeDimension(this.getSettings().mapWidth);\n }\n\n /**\n * @param {string | number} dimension\n * @returns {string}\n */\n normalizeDimension(dimension) {\n let normalizedDimension = String(dimension);\n\n if (this.canBeInterpretedAsNumber(normalizedDimension)) {\n normalizedDimension += 'px';\n }\n\n return normalizedDimension;\n }\n\n createMap() {\n this.map = L.map(\n this.element, {\n center: [this.getExtConf().defaultLatitude, this.getExtConf().defaultLongitude],\n zoom: this.getSettings().zoom ? this.getSettings().zoom : 12,\n editable: this.editable,\n scrollWheelZoom: this.getSettings().activateScrollWheel !== \"0\"\n }\n );\n\n L.tileLayer(this.getSettings().mapTile, {\n attribution: this.getSettings().mapTileAttribution,\n maxZoom: 20\n }).addTo(this.map);\n }\n\n /**\n * @returns {{[p: string]: Category}}\n */\n groupCategories() {\n const groupedCategories = {};\n\n this.poiCollections.forEach((poiCollection) => {\n const categoryUids = poiCollection.categories.map((category) => String(category.uid));\n\n categoryUids\n .filter((categoryUid) => this.getSettings().categories.includes(categoryUid))\n .forEach((categoryUid) => {\n if (!groupedCategories.hasOwnProperty(categoryUid)) {\n groupedCategories[categoryUid] = poiCollection.categories.find((category) => String(category.uid) === categoryUid);\n }\n });\n });\n\n return groupedCategories;\n }\n\n /**\n * @param {HTMLElement} form\n * @param {boolean} isChecked\n * @returns {number[]}\n */\n getCategoriesOfCheckboxesWithStatus(form, isChecked) {\n let categories = [];\n let checkboxes = isChecked\n ? Array.from(form.querySelectorAll(\"input:checked\"))\n : Array.from(form.querySelectorAll(\"input:not(:checked)\"));\n\n checkboxes.forEach((checkbox) => {\n categories.push(parseInt((checkbox).value));\n });\n\n return categories;\n }\n\n /**\n * @param {string} categoryUid\n * @param {HTMLElement} form\n * @param { boolean} isChecked\n * @returns {*[]}\n */\n getMarkersToChangeVisibilityFor(categoryUid, form, isChecked) {\n let markers = [];\n if (this.allMarkers.length === 0) {\n return markers;\n }\n\n let marker = null;\n let allCategoriesOfMarker = null;\n let categoriesOfCheckboxesWithStatus = this.getCategoriesOfCheckboxesWithStatus(form, isChecked);\n for (let i = 0; i < this.allMarkers.length; i++) {\n marker = this.allMarkers[i];\n allCategoriesOfMarker = marker.poiCollection.categories;\n if (allCategoriesOfMarker.length === 0) {\n continue;\n }\n\n let markerCategoryHasCheckboxWithStatus;\n for (let j = 0; j < allCategoriesOfMarker.length; j++) {\n markerCategoryHasCheckboxWithStatus = false;\n for (let k = 0; k < categoriesOfCheckboxesWithStatus.length; k++) {\n if (allCategoriesOfMarker[j].uid === categoriesOfCheckboxesWithStatus[k]) {\n markerCategoryHasCheckboxWithStatus = true;\n }\n }\n if (markerCategoryHasCheckboxWithStatus === isChecked) {\n break;\n }\n }\n\n if (markerCategoryHasCheckboxWithStatus) {\n markers.push(marker.marker);\n }\n }\n\n return markers;\n }\n\n showSwitchableCategories() {\n let categories = this.groupCategories();\n let form = document.createElement(\"form\");\n form.classList.add(\"txMaps2Form\");\n form.setAttribute(\"id\", \"txMaps2Form-\" + this.getContentRecord().uid);\n\n // Add checkbox for category\n for (let categoryUid in categories) {\n if (categories.hasOwnProperty(categoryUid)) {\n form.appendChild(this.getCheckbox(categories[categoryUid]));\n form.querySelector(\"#checkCategory_\" + categoryUid)?.insertAdjacentHTML(\n \"afterend\",\n `${categories[categoryUid].title}`\n );\n }\n }\n\n // Add listener for checkboxes\n form.querySelectorAll(\"input\").forEach((checkbox) => {\n checkbox.addEventListener(\"click\", () => {\n let isChecked = (checkbox).checked;\n let categoryUid = (checkbox).value;\n let markers = this.getMarkersToChangeVisibilityFor(categoryUid, form, isChecked);\n\n markers.forEach((marker) => {\n if (isChecked) {\n this.map.addLayer(marker);\n } else {\n this.map.removeLayer(marker);\n }\n });\n });\n });\n\n this.element.insertAdjacentElement(\"afterend\", form);\n }\n\n /**\n * @param {Category} category\n * @returns {HTMLElement}\n */\n getCheckbox(category) {\n let div = document.createElement(\"div\");\n div.classList.add(\"form-group\");\n div.innerHTML = `\n
\n \n
`;\n\n return div;\n }\n\n /**\n * @param {object} obj\n * @returns {number}\n */\n countObjectProperties(obj) {\n let count = 0;\n for (let key in obj) {\n if (obj.hasOwnProperty(key)) {\n count++;\n }\n }\n return count;\n }\n\n createPointByCollectionType() {\n let marker;\n let categoryUid = 0;\n\n if (this.poiCollections !== null && this.poiCollections.length) {\n this.poiCollections.forEach(poiCollection => {\n if (poiCollection.strokeColor === \"\") {\n poiCollection.strokeColor = this.getExtConf().strokeColor;\n }\n if (poiCollection.strokeOpacity === \"\") {\n poiCollection.strokeOpacity = this.getExtConf().strokeOpacity;\n }\n if (poiCollection.strokeWeight === \"\") {\n poiCollection.strokeWeight = this.getExtConf().strokeWeight;\n }\n if (poiCollection.fillColor === \"\") {\n poiCollection.fillColor = this.getExtConf().fillColor;\n }\n if (poiCollection.fillOpacity === \"\") {\n poiCollection.fillOpacity = this.getExtConf().fillOpacity;\n }\n\n marker = null;\n switch (poiCollection.collectionType) {\n case \"Point\":\n marker = this.createMarker(poiCollection);\n break;\n case \"Area\":\n marker = this.createArea(poiCollection);\n break;\n case \"Route\":\n marker = this.createRoute(poiCollection);\n break;\n case \"Radius\":\n marker = this.createRadius(poiCollection);\n break;\n }\n\n this.allMarkers.push({\n marker: marker,\n poiCollection: poiCollection\n });\n\n categoryUid = 0;\n for (let c = 0; c < poiCollection.categories.length; c++) {\n categoryUid = poiCollection.categories[c].uid;\n if (!this.categorizedMarkers.hasOwnProperty(categoryUid)) {\n this.categorizedMarkers[categoryUid] = [];\n }\n this.categorizedMarkers[categoryUid].push(marker);\n }\n });\n }\n }\n\n /**\n * @param {number} latitude\n * @param {number} longitude\n */\n createMarkerByLatLng(latitude, longitude) {\n let marker = L.marker(\n [latitude, longitude]\n ).addTo(this.map);\n\n this.bounds.extend(marker.getLatLng());\n }\n\n /**\n * @param {PoiCollection} poiCollection\n * @returns {Marker}\n */\n createMarker(poiCollection) {\n let marker = L.marker(\n [poiCollection.latitude, poiCollection.longitude],\n {\n 'draggable': this.editable\n }\n ).addTo(this.map);\n\n if (poiCollection.hasOwnProperty(\"markerIcon\") && poiCollection.markerIcon !== \"\") {\n let icon = L.icon({\n iconUrl: poiCollection.markerIcon,\n iconSize: [poiCollection.markerIconWidth, poiCollection.markerIconHeight],\n iconAnchor: [poiCollection.markerIconAnchorPosX, poiCollection.markerIconAnchorPosY]\n });\n marker.setIcon(icon);\n }\n\n this.bounds.extend(marker.getLatLng());\n\n if (this.editable) {\n this.addEditListeners(this.element, marker, poiCollection);\n } else {\n this.addInfoWindow(marker, poiCollection);\n }\n\n return marker;\n }\n\n /**\n * @param {PoiCollection} poiCollection\n * @returns {Polygon}\n */\n createArea(poiCollection) {\n let latlngs = [];\n\n poiCollection.pois.forEach(poi => {\n let latLng = [poi.latitude, poi.longitude];\n this.bounds.extend(latLng);\n latlngs.push(latLng);\n });\n\n let marker = L.polygon(latlngs, {\n color: poiCollection.strokeColor,\n opacity: poiCollection.strokeOpacity,\n weight: poiCollection.strokeWeight,\n fillColor: poiCollection.fillColor,\n fillOpacity: poiCollection.fillOpacity\n }).addTo(this.map);\n\n this.addInfoWindow(marker, poiCollection);\n\n return marker;\n }\n\n /**\n * @param {PoiCollection} poiCollection\n * @returns {Polyline}\n */\n createRoute(poiCollection) {\n let latlngs = [];\n\n poiCollection.pois.forEach(poi => {\n let latLng = [poi.latitude, poi.longitude];\n this.bounds.extend(latLng);\n latlngs.push(latLng);\n });\n\n let marker = L.polyline(latlngs, {\n color: poiCollection.strokeColor,\n opacity: poiCollection.strokeOpacity,\n weight: poiCollection.strokeWeight,\n fillColor: poiCollection.fillColor,\n fillOpacity: poiCollection.fillOpacity\n }).addTo(this.map);\n\n this.addInfoWindow(marker, poiCollection);\n\n return marker;\n }\n\n /**\n * @param {PoiCollection} poiCollection\n * @returns {Circle}\n */\n createRadius(poiCollection) {\n let marker = L.circle([poiCollection.latitude, poiCollection.longitude], {\n color: poiCollection.strokeColor,\n opacity: poiCollection.strokeOpacity,\n weight: poiCollection.strokeWeight,\n fillColor: poiCollection.fillColor,\n fillOpacity: poiCollection.fillOpacity,\n radius: poiCollection.radius\n }).addTo(this.map);\n\n this.bounds.extend(marker.getBounds());\n\n this.addInfoWindow(marker, poiCollection);\n\n return marker;\n }\n\n /**\n * @param {HTMLElement} element\n * @param {PoiCollection} poiCollection\n */\n addInfoWindow(element, poiCollection) {\n element.addEventListener(\"click\", () => {\n fetch(this.environment.ajaxUrl, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify({\n poiCollection: poiCollection.uid\n })\n })\n .then(response => response.json())\n .then(data => {\n element.bindPopup(data.content).openPopup();\n })\n .catch(error => console.error('Error:', error));\n });\n }\n\n /**\n * @param {HTMLElement} mapContainer\n * @param {L.Marker} marker\n * @param {PoiCollection} poiCollection\n */\n addEditListeners(mapContainer, marker, poiCollection) {\n marker.on('dragend', () => {\n let lat = marker.getLatLng().lat.toFixed(6);\n let lng = marker.getLatLng().lng.toFixed(6);\n mapContainer\n .previousElementSibling\n ?.querySelector(`input.latitude-${this.getContentRecord().uid}`)\n .setAttribute(\"value\", lat);\n mapContainer\n .previousElementSibling\n ?.querySelector(`input.longitude-${this.getContentRecord().uid}`)\n .setAttribute(\"value\", lng);\n });\n\n this.map.on('click', (event) => {\n marker.setLatLng(event.latlng);\n mapContainer\n .previousElementSibling\n ?.querySelector(`input.latitude-${this.getContentRecord().uid}`)\n .setAttribute(\"value\", event.latlng.lat.toFixed(6));\n mapContainer\n .previousElementSibling\n ?.querySelector(`input.longitude-${this.getContentRecord().uid}`)\n .setAttribute(\"value\", event.latlng.lng.toFixed(6));\n });\n }\n\n /**\n * return {boolean}\n */\n canBeInterpretedAsNumber(value) {\n return typeof value === 'number' || !isNaN(Number(value));\n }\n\n /**\n * return {ContentRecord}\n */\n getContentRecord() {\n return this.environment.contentRecord;\n }\n\n /**\n * return {ExtConf}\n */\n getExtConf() {\n return this.environment.extConf;\n }\n\n /**\n * return {Settings}\n */\n getSettings() {\n return this.environment.settings;\n }\n}\n\nlet maps2OpenStreetMaps = [];\n\ndocument.querySelectorAll(\".maps2\").forEach((element) => {\n const environment = typeof element.dataset.environment !== 'undefined' ? element.dataset.environment : '{}';\n const override = typeof element.dataset.override !== 'undefined' ? element.dataset.override : '{}';\n\n maps2OpenStreetMaps.push(new OpenStreetMap2(\n element,\n {...JSON.parse(environment), ...JSON.parse(override)}\n ));\n});\n"]} \ No newline at end of file +{"version":3,"sources":["OpenStreetMap2.js"],"names":["OpenStreetMap2","element","environment","editable","bounds","allMarkers","categorizedMarkers","poiCollections","map","constructor","this","classList","contains","L","LatLngBounds","preparePoiCollection","setMapDimensions","createMap","setMarkersOnMap","JSON","parse","getAttribute","isPOICollectionsEmpty","createMarkerBasedOnDataAttributes","createMarkerBasedOnPOICollections","length","latitude","getAttributeAsFloat","longitude","isNaN","createMarkerByLatLng","attributeName","parseFloat","createPointByCollectionType","countObjectProperties","showSwitchableCategories","adjustMapZoom","shouldFitBounds","fitBounds","panTo","getSettings","forceZoom","collectionType","style","height","normalizeDimension","mapHeight","width","mapWidth","dimension","let","normalizedDimension","String","canBeInterpretedAsNumber","center","getExtConf","defaultLatitude","defaultLongitude","zoom","scrollWheelZoom","activateScrollWheel","tileLayer","mapTile","attribution","mapTileAttribution","maxZoom","addTo","groupCategories","groupedCategories","forEach","poiCollection","categories","category","uid","filter","includes","categoryUid","hasOwnProperty","find","getCategoriesOfCheckboxesWithStatus","form","isChecked","Array","from","querySelectorAll","push","parseInt","value","getMarkersToChangeVisibilityFor","markers","marker","allCategoriesOfMarker","categoriesOfCheckboxesWithStatus","i","markerCategoryHasCheckboxWithStatus","j","k","document","createElement","add","setAttribute","getContentRecord","appendChild","getCheckbox","querySelector","insertAdjacentHTML","title","checkbox","addEventListener","checked","addLayer","removeLayer","insertAdjacentElement","div","innerHTML","obj","count","key","strokeColor","strokeOpacity","strokeWeight","fillColor","fillOpacity","createMarker","createArea","createRoute","createRadius","c","extend","getLatLng","icon","draggable","markerIcon","iconUrl","iconSize","markerIconWidth","markerIconHeight","iconAnchor","markerIconAnchorPosX","markerIconAnchorPosY","setIcon","addEditListeners","addInfoWindow","latlngs","pois","poi","latLng","polygon","color","opacity","weight","polyline","circle","radius","getBounds","fetch","ajaxUrl","method","headers","Content-Type","body","stringify","then","response","json","data","bindPopup","content","openPopup","catch","error","console","mapContainer","on","lat","toFixed","lng","previousElementSibling","setLatLng","event","latlng","Number","contentRecord","extConf","settings","maps2OpenStreetMaps","dataset","override","extended","deep","arguments","Object","prototype","toString","call","prop"],"mappings":"MAAAA,eACAC,QAAA,GACAC,YAAA,GACAC,SAAA,CAAA,EACAC,OAAA,GAEAC,WAAA,GACAC,mBAAA,GACAC,eAAA,GACAC,IAAA,GAEAC,YAAAR,EAAAC,GACAQ,KAAAT,QAAAA,EACAS,KAAAR,YAAAA,EACAQ,KAAAP,SAAAO,KAAAT,QAAAU,UAAAC,SAAA,YAAA,EACAF,KAAAN,OAAA,IAAAS,EAAAC,aAEAJ,KAAAK,qBAAA,EACAL,KAAAM,iBAAA,EACAN,KAAAO,UAAA,EACAP,KAAAQ,gBAAA,CACA,CAEAH,uBACAL,KAAAH,eAAAY,KAAAC,MAAAV,KAAAT,QAAAoB,aAAA,WAAA,GAAA,IAAA,CACA,CAEAH,kBACAR,KAAAY,sBAAA,EACAZ,KAAAa,kCAAA,EAEAb,KAAAc,kCAAA,CAEA,CAKAF,wBACA,OAAA,IAAAZ,KAAAH,eAAAkB,MACA,CAEAF,oCACA,IAAAG,EAAAhB,KAAAiB,oBAAA,eAAA,EACAC,EAAAlB,KAAAiB,oBAAA,gBAAA,EAEAE,MAAAH,CAAA,GAAAG,MAAAD,CAAA,GACAlB,KAAAoB,qBAA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A,oBAAAE,OAAAC,UAAAC,SAAAC,KAAA/E,EAAAgF,EAAA,EACAP,EAAAO,GAAAnE,EAAA4D,EAAAzE,EAAAgF,EAAA,EAEAP,EAAAO,GAAAhF,EAAAgF,GAUA,CAEA,OAAAP,CACA,EAEAH,oBAAApG,KAAA,IAAArF,eACAC,EACA+H,EAAA7G,KAAAC,MAAAlB,CAAA,EAAAiB,KAAAC,MAAAuK,CAAA,CAAA,CACA,CAAA,CACA,CAAA","file":"OpenStreetMap2.min.js","sourcesContent":["class OpenStreetMap2 {\n element = {};\n environment = {};\n editable = false;;\n bounds = {};\n\n allMarkers = [];\n categorizedMarkers = {};\n poiCollections = [];\n map = {};\n\n constructor(element, environment) {\n this.element = element;\n this.environment = environment;\n this.editable = this.element.classList.contains(\"editMarker\");\n this.bounds = new L.LatLngBounds();\n\n this.preparePoiCollection();\n this.setMapDimensions();\n this.createMap();\n this.setMarkersOnMap();\n }\n\n preparePoiCollection() {\n this.poiCollections = JSON.parse(this.element.getAttribute(\"data-pois\") || '[]');\n }\n\n setMarkersOnMap() {\n if (this.isPOICollectionsEmpty()) {\n this.createMarkerBasedOnDataAttributes();\n } else {\n this.createMarkerBasedOnPOICollections();\n }\n }\n\n /**\n * @returns {boolean}\n */\n isPOICollectionsEmpty() {\n return this.poiCollections.length === 0;\n }\n\n createMarkerBasedOnDataAttributes() {\n const latitude = this.getAttributeAsFloat(\"data-latitude\");\n const longitude = this.getAttributeAsFloat(\"data-longitude\");\n\n if (!isNaN(latitude) && !isNaN(longitude)) {\n this.createMarkerByLatLng(latitude, longitude);\n }\n }\n\n /**\n * @param {string} attributeName\n * @returns {number}\n */\n getAttributeAsFloat(attributeName) {\n return parseFloat(this.element.getAttribute(attributeName) || \"\");\n }\n\n createMarkerBasedOnPOICollections() {\n this.createPointByCollectionType();\n if (this.countObjectProperties(this.categorizedMarkers) > 1) {\n this.showSwitchableCategories();\n }\n this.adjustMapZoom();\n }\n\n adjustMapZoom() {\n if (this.shouldFitBounds()) {\n this.map.fitBounds(this.bounds);\n } else {\n this.map.panTo([this.poiCollections[0].latitude, this.poiCollections[0].longitude]);\n }\n }\n\n /**\n * @returns {boolean}\n */\n shouldFitBounds() {\n if (this.getSettings().forceZoom === true) {\n return false;\n }\n\n if (this.poiCollections === null) {\n return false;\n }\n\n if (this.poiCollections.length > 1) {\n return true;\n }\n\n if (\n this.poiCollections.length === 1\n && (\n this.poiCollections[0].collectionType === \"Area\"\n || this.poiCollections[0].collectionType === \"Route\"\n )\n ) {\n return true;\n }\n\n return false;\n }\n\n setMapDimensions() {\n this.element.style.height = this.normalizeDimension(this.getSettings().mapHeight);\n this.element.style.width = this.normalizeDimension(this.getSettings().mapWidth);\n }\n\n /**\n * @param {string | number} dimension\n * @returns {string}\n */\n normalizeDimension(dimension) {\n let normalizedDimension = String(dimension);\n\n if (this.canBeInterpretedAsNumber(normalizedDimension)) {\n normalizedDimension += 'px';\n }\n\n return normalizedDimension;\n }\n\n createMap() {\n this.map = L.map(\n this.element, {\n center: [this.getExtConf().defaultLatitude, this.getExtConf().defaultLongitude],\n zoom: this.getSettings().zoom ? this.getSettings().zoom : 12,\n editable: this.editable,\n scrollWheelZoom: this.getSettings().activateScrollWheel !== \"0\"\n }\n );\n\n L.tileLayer(this.getSettings().mapTile, {\n attribution: this.getSettings().mapTileAttribution,\n maxZoom: 20\n }).addTo(this.map);\n }\n\n /**\n * @returns {{[p: string]: Category}}\n */\n groupCategories() {\n const groupedCategories = {};\n\n this.poiCollections.forEach((poiCollection) => {\n const categoryUids = poiCollection.categories.map((category) => String(category.uid));\n\n categoryUids\n .filter((categoryUid) => this.getSettings().categories.includes(categoryUid))\n .forEach((categoryUid) => {\n if (!groupedCategories.hasOwnProperty(categoryUid)) {\n groupedCategories[categoryUid] = poiCollection.categories.find((category) => String(category.uid) === categoryUid);\n }\n });\n });\n\n return groupedCategories;\n }\n\n /**\n * @param {HTMLElement} form\n * @param {boolean} isChecked\n * @returns {number[]}\n */\n getCategoriesOfCheckboxesWithStatus(form, isChecked) {\n let categories = [];\n let checkboxes = isChecked\n ? Array.from(form.querySelectorAll(\"input:checked\"))\n : Array.from(form.querySelectorAll(\"input:not(:checked)\"));\n\n checkboxes.forEach((checkbox) => {\n categories.push(parseInt((checkbox).value));\n });\n\n return categories;\n }\n\n /**\n * @param {string} categoryUid\n * @param {HTMLElement} form\n * @param { boolean} isChecked\n * @returns {*[]}\n */\n getMarkersToChangeVisibilityFor(categoryUid, form, isChecked) {\n let markers = [];\n if (this.allMarkers.length === 0) {\n return markers;\n }\n\n let marker = null;\n let allCategoriesOfMarker = null;\n let categoriesOfCheckboxesWithStatus = this.getCategoriesOfCheckboxesWithStatus(form, isChecked);\n for (let i = 0; i < this.allMarkers.length; i++) {\n marker = this.allMarkers[i];\n allCategoriesOfMarker = marker.poiCollection.categories;\n if (allCategoriesOfMarker.length === 0) {\n continue;\n }\n\n let markerCategoryHasCheckboxWithStatus;\n for (let j = 0; j < allCategoriesOfMarker.length; j++) {\n markerCategoryHasCheckboxWithStatus = false;\n for (let k = 0; k < categoriesOfCheckboxesWithStatus.length; k++) {\n if (allCategoriesOfMarker[j].uid === categoriesOfCheckboxesWithStatus[k]) {\n markerCategoryHasCheckboxWithStatus = true;\n }\n }\n if (markerCategoryHasCheckboxWithStatus === isChecked) {\n break;\n }\n }\n\n if (markerCategoryHasCheckboxWithStatus) {\n markers.push(marker.marker);\n }\n }\n\n return markers;\n }\n\n showSwitchableCategories() {\n let categories = this.groupCategories();\n let form = document.createElement(\"form\");\n form.classList.add(\"txMaps2Form\");\n form.setAttribute(\"id\", \"txMaps2Form-\" + this.getContentRecord().uid);\n\n // Add checkbox for category\n for (let categoryUid in categories) {\n if (categories.hasOwnProperty(categoryUid)) {\n form.appendChild(this.getCheckbox(categories[categoryUid]));\n form.querySelector(\"#checkCategory_\" + categoryUid)?.insertAdjacentHTML(\n \"afterend\",\n `${categories[categoryUid].title}`\n );\n }\n }\n\n // Add listener for checkboxes\n form.querySelectorAll(\"input\").forEach((checkbox) => {\n checkbox.addEventListener(\"click\", () => {\n let isChecked = (checkbox).checked;\n let categoryUid = (checkbox).value;\n let markers = this.getMarkersToChangeVisibilityFor(categoryUid, form, isChecked);\n\n markers.forEach((marker) => {\n if (isChecked) {\n this.map.addLayer(marker);\n } else {\n this.map.removeLayer(marker);\n }\n });\n });\n });\n\n this.element.insertAdjacentElement(\"afterend\", form);\n }\n\n /**\n * @param {Category} category\n * @returns {HTMLElement}\n */\n getCheckbox(category) {\n let div = document.createElement(\"div\");\n div.classList.add(\"form-group\");\n div.innerHTML = `\n
\n \n
`;\n\n return div;\n }\n\n /**\n * @param {object} obj\n * @returns {number}\n */\n countObjectProperties(obj) {\n let count = 0;\n for (let key in obj) {\n if (obj.hasOwnProperty(key)) {\n count++;\n }\n }\n return count;\n }\n\n createPointByCollectionType() {\n let marker;\n let categoryUid = 0;\n\n if (this.poiCollections !== null && this.poiCollections.length) {\n this.poiCollections.forEach(poiCollection => {\n if (poiCollection.strokeColor === \"\") {\n poiCollection.strokeColor = this.getExtConf().strokeColor;\n }\n if (poiCollection.strokeOpacity === \"\") {\n poiCollection.strokeOpacity = this.getExtConf().strokeOpacity;\n }\n if (poiCollection.strokeWeight === \"\") {\n poiCollection.strokeWeight = this.getExtConf().strokeWeight;\n }\n if (poiCollection.fillColor === \"\") {\n poiCollection.fillColor = this.getExtConf().fillColor;\n }\n if (poiCollection.fillOpacity === \"\") {\n poiCollection.fillOpacity = this.getExtConf().fillOpacity;\n }\n\n marker = null;\n switch (poiCollection.collectionType) {\n case \"Point\":\n marker = this.createMarker(poiCollection);\n break;\n case \"Area\":\n marker = this.createArea(poiCollection);\n break;\n case \"Route\":\n marker = this.createRoute(poiCollection);\n break;\n case \"Radius\":\n marker = this.createRadius(poiCollection);\n break;\n }\n\n this.allMarkers.push({\n marker: marker,\n poiCollection: poiCollection\n });\n\n categoryUid = 0;\n for (let c = 0; c < poiCollection.categories.length; c++) {\n categoryUid = poiCollection.categories[c].uid;\n if (!this.categorizedMarkers.hasOwnProperty(categoryUid)) {\n this.categorizedMarkers[categoryUid] = [];\n }\n this.categorizedMarkers[categoryUid].push(marker);\n }\n });\n }\n }\n\n /**\n * @param {number} latitude\n * @param {number} longitude\n */\n createMarkerByLatLng(latitude, longitude) {\n let marker = L.marker(\n [latitude, longitude]\n ).addTo(this.map);\n\n this.bounds.extend(marker.getLatLng());\n }\n\n /**\n * @param {PoiCollection} poiCollection\n * @returns {Marker}\n */\n createMarker(poiCollection) {\n let marker = L.marker(\n [poiCollection.latitude, poiCollection.longitude],\n {\n 'draggable': this.editable\n }\n ).addTo(this.map);\n\n if (poiCollection.hasOwnProperty(\"markerIcon\") && poiCollection.markerIcon !== \"\") {\n let icon = L.icon({\n iconUrl: poiCollection.markerIcon,\n iconSize: [poiCollection.markerIconWidth, poiCollection.markerIconHeight],\n iconAnchor: [poiCollection.markerIconAnchorPosX, poiCollection.markerIconAnchorPosY]\n });\n marker.setIcon(icon);\n }\n\n this.bounds.extend(marker.getLatLng());\n\n if (this.editable) {\n this.addEditListeners(this.element, marker, poiCollection);\n } else {\n this.addInfoWindow(marker, poiCollection);\n }\n\n return marker;\n }\n\n /**\n * @param {PoiCollection} poiCollection\n * @returns {Polygon}\n */\n createArea(poiCollection) {\n let latlngs = [];\n\n poiCollection.pois.forEach(poi => {\n let latLng = [poi.latitude, poi.longitude];\n this.bounds.extend(latLng);\n latlngs.push(latLng);\n });\n\n let marker = L.polygon(latlngs, {\n color: poiCollection.strokeColor,\n opacity: poiCollection.strokeOpacity,\n weight: poiCollection.strokeWeight,\n fillColor: poiCollection.fillColor,\n fillOpacity: poiCollection.fillOpacity\n }).addTo(this.map);\n\n this.addInfoWindow(marker, poiCollection);\n\n return marker;\n }\n\n /**\n * @param {PoiCollection} poiCollection\n * @returns {Polyline}\n */\n createRoute(poiCollection) {\n let latlngs = [];\n\n poiCollection.pois.forEach(poi => {\n let latLng = [poi.latitude, poi.longitude];\n this.bounds.extend(latLng);\n latlngs.push(latLng);\n });\n\n let marker = L.polyline(latlngs, {\n color: poiCollection.strokeColor,\n opacity: poiCollection.strokeOpacity,\n weight: poiCollection.strokeWeight,\n fillColor: poiCollection.fillColor,\n fillOpacity: poiCollection.fillOpacity\n }).addTo(this.map);\n\n this.addInfoWindow(marker, poiCollection);\n\n return marker;\n }\n\n /**\n * @param {PoiCollection} poiCollection\n * @returns {Circle}\n */\n createRadius(poiCollection) {\n let marker = L.circle([poiCollection.latitude, poiCollection.longitude], {\n color: poiCollection.strokeColor,\n opacity: poiCollection.strokeOpacity,\n weight: poiCollection.strokeWeight,\n fillColor: poiCollection.fillColor,\n fillOpacity: poiCollection.fillOpacity,\n radius: poiCollection.radius\n }).addTo(this.map);\n\n this.bounds.extend(marker.getBounds());\n\n this.addInfoWindow(marker, poiCollection);\n\n return marker;\n }\n\n /**\n * @param {HTMLElement} element\n * @param {PoiCollection} poiCollection\n */\n addInfoWindow(element, poiCollection) {\n element.addEventListener(\"click\", () => {\n fetch(this.environment.ajaxUrl, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify({\n poiCollection: poiCollection.uid\n })\n })\n .then(response => response.json())\n .then(data => {\n element.bindPopup(data.content).openPopup();\n })\n .catch(error => console.error('Error:', error));\n });\n }\n\n /**\n * @param {HTMLElement} mapContainer\n * @param {L.Marker} marker\n * @param {PoiCollection} poiCollection\n */\n addEditListeners(mapContainer, marker, poiCollection) {\n marker.on('dragend', () => {\n let lat = marker.getLatLng().lat.toFixed(6);\n let lng = marker.getLatLng().lng.toFixed(6);\n mapContainer\n .previousElementSibling\n ?.querySelector(`input.latitude-${this.getContentRecord().uid}`)\n .setAttribute(\"value\", lat);\n mapContainer\n .previousElementSibling\n ?.querySelector(`input.longitude-${this.getContentRecord().uid}`)\n .setAttribute(\"value\", lng);\n });\n\n this.map.on('click', (event) => {\n marker.setLatLng(event.latlng);\n mapContainer\n .previousElementSibling\n ?.querySelector(`input.latitude-${this.getContentRecord().uid}`)\n .setAttribute(\"value\", event.latlng.lat.toFixed(6));\n mapContainer\n .previousElementSibling\n ?.querySelector(`input.longitude-${this.getContentRecord().uid}`)\n .setAttribute(\"value\", event.latlng.lng.toFixed(6));\n });\n }\n\n /**\n * return {boolean}\n */\n canBeInterpretedAsNumber(value) {\n return typeof value === 'number' || !isNaN(Number(value));\n }\n\n /**\n * return {ContentRecord}\n */\n getContentRecord() {\n return this.environment.contentRecord;\n }\n\n /**\n * return {ExtConf}\n */\n getExtConf() {\n return this.environment.extConf;\n }\n\n /**\n * return {Settings}\n */\n getSettings() {\n return this.environment.settings;\n }\n}\n\nlet maps2OpenStreetMaps = [];\n\ndocument.querySelectorAll(\".maps2\").forEach((element) => {\n const environment = typeof element.dataset.environment !== 'undefined' ? element.dataset.environment : '{}';\n const override = typeof element.dataset.override !== 'undefined' ? element.dataset.override : '{}';\n\n // Pass in the objects to merge as arguments.\n // For a deep extend, set the first argument to `true`.\n const extend = () => {\n let extended = {};\n let deep = false;\n let i = 0;\n let length = arguments.length;\n\n // Check for deep merge\n if (Object.prototype.toString.call(arguments[0]) === '[object Boolean]') {\n deep = arguments[0];\n i++;\n }\n\n // Merge the object into the extended object\n const merge = function (obj) {\n for ( var prop in obj ) {\n if ( Object.prototype.hasOwnProperty.call( obj, prop ) ) {\n // If deep merge and property is an object, merge properties\n if ( deep && Object.prototype.toString.call(obj[prop]) === '[object Object]' ) {\n extended[prop] = extend( true, extended[prop], obj[prop] );\n } else {\n extended[prop] = obj[prop];\n }\n }\n }\n };\n\n // Loop through each object and conduct a merge\n for ( ; i < length; i++ ) {\n var obj = arguments[i];\n merge(obj);\n }\n\n return extended;\n };\n\n maps2OpenStreetMaps.push(new OpenStreetMap2(\n element,\n extend(true, JSON.parse(environment), JSON.parse(override))\n ));\n});\n"]} \ No newline at end of file From 1d4ee7b7fc03bfbfcdb5e1128cba62cbc35ec205 Mon Sep 17 00:00:00 2001 From: Stefan Froemken Date: Tue, 19 Mar 2024 15:33:19 +0100 Subject: [PATCH 2/8] Define arguments for arrow functions --- Resources/Private/Build/JavaScript/GoogleMaps2.js | 2 +- Resources/Private/Build/JavaScript/OpenStreetMap2.js | 2 +- Resources/Public/JavaScript/GoogleMaps2.min.js | 2 +- Resources/Public/JavaScript/GoogleMaps2.min.js.map | 2 +- Resources/Public/JavaScript/OpenStreetMap2.min.js | 2 +- Resources/Public/JavaScript/OpenStreetMap2.min.js.map | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Resources/Private/Build/JavaScript/GoogleMaps2.js b/Resources/Private/Build/JavaScript/GoogleMaps2.js index 54ba3610..c2057b99 100644 --- a/Resources/Private/Build/JavaScript/GoogleMaps2.js +++ b/Resources/Private/Build/JavaScript/GoogleMaps2.js @@ -667,7 +667,7 @@ function initMap () { // Pass in the objects to merge as arguments. // For a deep extend, set the first argument to `true`. - const extend = () => { + const extend = (...arguments) => { let extended = {}; let deep = false; let i = 0; diff --git a/Resources/Private/Build/JavaScript/OpenStreetMap2.js b/Resources/Private/Build/JavaScript/OpenStreetMap2.js index 63b4872d..927ad40c 100644 --- a/Resources/Private/Build/JavaScript/OpenStreetMap2.js +++ b/Resources/Private/Build/JavaScript/OpenStreetMap2.js @@ -551,7 +551,7 @@ document.querySelectorAll(".maps2").forEach((element) => { // Pass in the objects to merge as arguments. // For a deep extend, set the first argument to `true`. - const extend = () => { + const extend = (...arguments) => { let extended = {}; let deep = false; let i = 0; diff --git a/Resources/Public/JavaScript/GoogleMaps2.min.js b/Resources/Public/JavaScript/GoogleMaps2.min.js index 4f4d82d4..c506f852 100644 --- a/Resources/Public/JavaScript/GoogleMaps2.min.js +++ b/Resources/Public/JavaScript/GoogleMaps2.min.js @@ -3,5 +3,5 @@ class GoogleMaps2{allMarkers=[];categorizedMarkers={};pointMarkers=[];bounds={}; - `,t}countObjectProperties=e=>{let t=0;for(var o in e)e.hasOwnProperty(o)&&t++;return t};createPointByCollectionType=(e,o)=>{let i,s=0;null!==this.poiCollections&&this.poiCollections.length&&this.poiCollections.forEach(t=>{switch(""===t.strokeColor&&(t.strokeColor=o.extConf.strokeColor),""===t.strokeOpacity&&(t.strokeOpacity=o.extConf.strokeOpacity),""===t.strokeWeight&&(t.strokeWeight=o.extConf.strokeWeight),""===t.fillColor&&(t.fillColor=o.extConf.fillColor),""===t.fillOpacity&&(t.fillOpacity=o.extConf.fillOpacity),i=null,t.collectionType){case"Point":i=this.createMarker(t,e,o);break;case"Area":i=this.createArea(t,o);break;case"Route":i=this.createRoute(t,o);break;case"Radius":i=this.createRadius(t,o)}if(null!==i){this.allMarkers.push({marker:i,poiCollection:t});for(let e=s=0;e{var i,s=new google.maps.Marker({position:new google.maps.LatLng(e.latitude,e.longitude),map:this.map});return s.setDraggable(this.editable),e.hasOwnProperty("markerIcon")&&""!==e.markerIcon&&(i={url:e.markerIcon,scaledSize:new google.maps.Size(e.markerIconWidth,e.markerIconHeight),anchor:new google.maps.Point(e.markerIconAnchorPosX,e.markerIconAnchorPosY)},s.setIcon(i)),this.pointMarkers.push(s),this.bounds.extend(s.position),this.editable?this.addEditListeners(t,s,e,o):this.addInfoWindow(s,e,o),s};createArea=(t,e)=>{var o,i=[];for(let e=0;e{var o,i=[];for(let e=0;e{var o=new google.maps.Circle(this.getCircleOptions(this.map,new google.maps.LatLng(e.latitude,e.longitude),e));return this.bounds.union(o.getBounds()),this.addInfoWindow(o,e,t),o};addInfoWindow=(t,o,i)=>{let s=this.infoWindow,r=this.map;google.maps.event.addListener(t,"click",e=>{fetch(i.ajaxUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({poiCollection:o.uid})}).then(e=>e.json()).then(e=>{s.close(),s.setContent(e.content),"Point"===o.collectionType?(s.setPosition(null),s.open(r,t)):(s.setPosition(new google.maps.LatLng(o.latitude,o.longitude)),s.open(r))}).catch(e=>console.error("Error:",e))})};inList=(e,t)=>{return(","+e+",").search(t=","+t+",")};createMarkerByLatLng=(e,t)=>{e=new google.maps.Marker({position:new google.maps.LatLng(e,t),map:this.map});this.bounds.extend(e.position)};addEditListeners=(o,i,e,s)=>{google.maps.event.addListener(i,"dragend",()=>{var e=i.getPosition().lat().toFixed(6),t=i.getPosition().lng().toFixed(6);o.prevAll("input.latitude-"+s.contentRecord.uid).val(e),o.prevAll("input.longitude-"+s.contentRecord.uid).val(t)}),google.maps.event.addListener(this.map,"click",e=>{i.setPosition(e.latLng),o.prevAll("input.latitude-"+s.contentRecord.uid).val(e.latLng.lat().toFixed(6)),o.prevAll("input.longitude-"+s.contentRecord.uid).val(e.latLng.lng().toFixed(6))})}}let maps2GoogleMaps=[];function initMap(){document.querySelectorAll(".maps2").forEach(e=>{var t=void 0!==e.dataset.environment?e.dataset.environment:"{}",o=void 0!==e.dataset.override?e.dataset.override:"{}";const n=()=>{let e={},t=!1,o=0;var i=arguments.length;for("[object Boolean]"===Object.prototype.toString.call(arguments[0])&&(t=arguments[0],o++);o{if(13===e.keyCode)return!1}))} + `,t}countObjectProperties=e=>{let t=0;for(var o in e)e.hasOwnProperty(o)&&t++;return t};createPointByCollectionType=(e,o)=>{let i,s=0;null!==this.poiCollections&&this.poiCollections.length&&this.poiCollections.forEach(t=>{switch(""===t.strokeColor&&(t.strokeColor=o.extConf.strokeColor),""===t.strokeOpacity&&(t.strokeOpacity=o.extConf.strokeOpacity),""===t.strokeWeight&&(t.strokeWeight=o.extConf.strokeWeight),""===t.fillColor&&(t.fillColor=o.extConf.fillColor),""===t.fillOpacity&&(t.fillOpacity=o.extConf.fillOpacity),i=null,t.collectionType){case"Point":i=this.createMarker(t,e,o);break;case"Area":i=this.createArea(t,o);break;case"Route":i=this.createRoute(t,o);break;case"Radius":i=this.createRadius(t,o)}if(null!==i){this.allMarkers.push({marker:i,poiCollection:t});for(let e=s=0;e{var i,s=new google.maps.Marker({position:new google.maps.LatLng(e.latitude,e.longitude),map:this.map});return s.setDraggable(this.editable),e.hasOwnProperty("markerIcon")&&""!==e.markerIcon&&(i={url:e.markerIcon,scaledSize:new google.maps.Size(e.markerIconWidth,e.markerIconHeight),anchor:new google.maps.Point(e.markerIconAnchorPosX,e.markerIconAnchorPosY)},s.setIcon(i)),this.pointMarkers.push(s),this.bounds.extend(s.position),this.editable?this.addEditListeners(t,s,e,o):this.addInfoWindow(s,e,o),s};createArea=(t,e)=>{var o,i=[];for(let e=0;e{var o,i=[];for(let e=0;e{var o=new google.maps.Circle(this.getCircleOptions(this.map,new google.maps.LatLng(e.latitude,e.longitude),e));return this.bounds.union(o.getBounds()),this.addInfoWindow(o,e,t),o};addInfoWindow=(t,o,i)=>{let s=this.infoWindow,r=this.map;google.maps.event.addListener(t,"click",e=>{fetch(i.ajaxUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({poiCollection:o.uid})}).then(e=>e.json()).then(e=>{s.close(),s.setContent(e.content),"Point"===o.collectionType?(s.setPosition(null),s.open(r,t)):(s.setPosition(new google.maps.LatLng(o.latitude,o.longitude)),s.open(r))}).catch(e=>console.error("Error:",e))})};inList=(e,t)=>{return(","+e+",").search(t=","+t+",")};createMarkerByLatLng=(e,t)=>{e=new google.maps.Marker({position:new google.maps.LatLng(e,t),map:this.map});this.bounds.extend(e.position)};addEditListeners=(o,i,e,s)=>{google.maps.event.addListener(i,"dragend",()=>{var e=i.getPosition().lat().toFixed(6),t=i.getPosition().lng().toFixed(6);o.prevAll("input.latitude-"+s.contentRecord.uid).val(e),o.prevAll("input.longitude-"+s.contentRecord.uid).val(t)}),google.maps.event.addListener(this.map,"click",e=>{i.setPosition(e.latLng),o.prevAll("input.latitude-"+s.contentRecord.uid).val(e.latLng.lat().toFixed(6)),o.prevAll("input.longitude-"+s.contentRecord.uid).val(e.latLng.lng().toFixed(6))})}}let maps2GoogleMaps=[];function initMap(){document.querySelectorAll(".maps2").forEach(e=>{var t=void 0!==e.dataset.environment?e.dataset.environment:"{}",o=void 0!==e.dataset.override?e.dataset.override:"{}";const n=(...arguments)=>{let e={},t=!1,o=0;var i=arguments.length;for("[object Boolean]"===Object.prototype.toString.call(arguments[0])&&(t=arguments[0],o++);o{if(13===e.keyCode)return!1}))} //# sourceMappingURL=GoogleMaps2.min.js.map diff --git a/Resources/Public/JavaScript/GoogleMaps2.min.js.map b/Resources/Public/JavaScript/GoogleMaps2.min.js.map index 59a6dfe0..d1c9a29c 100644 --- a/Resources/Public/JavaScript/GoogleMaps2.min.js.map +++ b/Resources/Public/JavaScript/GoogleMaps2.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["GoogleMaps2.js"],"names":["GoogleMaps2","allMarkers","categorizedMarkers","pointMarkers","bounds","infoWindow","poiCollections","editable","map","constructor","element","environment","lat","lng","this","google","maps","LatLngBounds","InfoWindow","JSON","parse","dataset","pois","classList","contains","setMapDimensions","settings","createMap","Number","latitude","longitude","createMarkerByLatLng","setCenter","LatLng","extConf","defaultLatitude","defaultLongitude","createPointByCollectionType","markerClusterer","enable","MarkerClusterer","imagePath","countObjectProperties","showSwitchableCategories","shouldFitBounds","fitBounds","getMapOptions","let","mapOptions","mapTypeId","zoom","parseInt","zoomControl","mapTypeControl","scaleControl","streetViewControl","fullscreenControl","fullScreenControl","scrollwheel","activateScrollWheel","styles","eval","MapTypeId","HYBRID","ROADMAP","SATELLITE","TERRAIN","getCircleOptions","centerPosition","poiCollection","center","radius","strokeColor","strokeOpacity","strokeWeight","fillColor","fillOpacity","getPolygonOptions","paths","getPolylineOptions","path","Map","canBeInterpretedAsNumber","value","isNaN","normalizeDimension","dimension","normalizedDimension","String","forceZoom","length","collectionType","style","height","mapHeight","width","mapWidth","groupCategories","categoryUid","groupedCategories","x","y","categories","uid","inList","hasOwnProperty","getCategoriesOfCheckboxesWithStatus","form","isChecked","querySelectorAll","forEach","checkbox","push","getMarkersToChangeVisibilityFor","markers","marker","allCategoriesOfMarker","categoriesOfCheckboxesWithStatus","i","markerCategoryHasCheckboxWithStatus","j","k","document","createElement","add","setAttribute","contentRecord","appendChild","getCheckbox","querySelector","insertAdjacentHTML","title","addEventListener","checked","setVisible","insertAdjacentElement","category","div","innerHTML","obj","count","key","createMarker","createArea","createRoute","createRadius","c","relatedCategories","icon","Marker","position","setDraggable","markerIcon","url","scaledSize","Size","markerIconWidth","markerIconHeight","anchor","Point","markerIconAnchorPosX","markerIconAnchorPosY","setIcon","extend","addEditListeners","addInfoWindow","latLng","mapPosition","area","Polygon","setMap","route","Polyline","circle","Circle","union","getBounds","event","addListener","fetch","ajaxUrl","method","headers","Content-Type","body","stringify","then","response","json","data","close","setContent","content","setPosition","open","catch","error","console","list","item","search","mapContainer","getPosition","toFixed","prevAll","val","maps2GoogleMaps","initMap","override","extended","deep","arguments","Object","prototype","toString","call","prop","address","places","Autocomplete","fields","keyCode"],"mappings":"MAAAA,YACAC,WAAA,GACAC,mBAAA,GACAC,aAAA,GACAC,OAAA,GACAC,WAAA,GACAC,eAAA,GACAC,SAAA,GACAC,IAAA,GAOAC,YAAAC,EAAAC,GAaA,IAEAC,EACAC,EAfAC,KAAAb,WAAA,GACAa,KAAAZ,mBAAA,GACAY,KAAAX,aAAA,GACAW,KAAAV,OAAA,IAAAW,OAAAC,KAAAC,aACAH,KAAAT,WAAA,IAAAU,OAAAC,KAAAE,WACAJ,KAAAR,eAAAa,KAAAC,MAAAV,EAAAW,QAAAC,MAAA,MAAA,EACAR,KAAAP,SAAAG,EAAAa,UAAAC,SAAA,YAAA,EAEAV,KAAAW,iBAAAf,EAAAC,EAAAe,QAAA,EAEAZ,KAAAa,UAAAjB,EAAAC,CAAA,EAEA,KAAA,IAAAG,KAAAR,gBAAA,OAAAQ,KAAAR,gBAEAM,EAAAgB,OAAAlB,EAAAW,QAAAQ,QAAA,EACAhB,EAAAe,OAAAlB,EAAAW,QAAAS,SAAA,EACAlB,GAAAC,GACAC,KAAAiB,qBAAAnB,EAAAC,CAAA,EACAC,KAAAN,IAAAwB,UAAA,IAAAjB,OAAAC,KAAAiB,OAAArB,EAAAC,CAAA,CAAA,GAGAC,KAAAN,IAAAwB,UAAA,IAAAjB,OAAAC,KAAAiB,OAAAtB,EAAAuB,Q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{};\n pointMarkers = [];\n bounds = {};\n infoWindow = {};\n poiCollections = {};\n editable = {};\n map = {};\n\n /**\n * @param {HTMLElement} element\n * @param {Environment} environment\n * @constructor\n */\n constructor (element, environment) {\n this.allMarkers = [];\n this.categorizedMarkers = {};\n this.pointMarkers = [];\n this.bounds = new google.maps.LatLngBounds();\n this.infoWindow = new google.maps.InfoWindow();\n this.poiCollections = JSON.parse(element.dataset.pois || \"null\");\n this.editable = element.classList.contains('editMarker');\n\n this.setMapDimensions(element, environment.settings);\n\n this.createMap(element, environment);\n\n if (typeof this.poiCollections === 'undefined' || this.poiCollections === null) {\n // Plugin: CityMap\n let lat = Number(element.dataset.latitude);\n let lng = Number(element.dataset.longitude);\n if (lat && lng) {\n this.createMarkerByLatLng(lat, lng);\n this.map.setCenter(new google.maps.LatLng(lat, lng));\n } else {\n // Fallback\n this.map.setCenter(new google.maps.LatLng(environment.extConf.defaultLatitude, environment.extConf.defaultLongitude));\n }\n } else {\n // normal case\n this.createPointByCollectionType(element, environment);\n if (\n typeof environment.settings.markerClusterer !== 'undefined'\n && environment.settings.markerClusterer.enable === 1\n ) {\n new MarkerClusterer(\n this.map,\n this.pointMarkers,\n { imagePath: environment.settings.markerClusterer.imagePath }\n );\n }\n\n if (this.countObjectProperties(this.categorizedMarkers) > 1) {\n this.showSwitchableCategories(element, environment);\n }\n\n if (this.shouldFitBounds(environment.settings)) {\n this.map.fitBounds(this.bounds);\n } else {\n this.map.setCenter(new google.maps.LatLng(this.poiCollections[0].latitude, this.poiCollections[0].longitude));\n }\n }\n }\n\n /**\n * Return a MapOptions object which can be assigned to the Map object of Google\n *\n * @param {Settings} settings\n * @return {object}\n */\n getMapOptions = settings => {\n let mapOptions = {\n mapTypeId: '',\n zoom: parseInt(settings.zoom),\n zoomControl: (parseInt(settings.zoomControl) !== 0),\n mapTypeControl: (parseInt(settings.mapTypeControl) !== 0),\n scaleControl: (parseInt(settings.scaleControl) !== 0),\n streetViewControl: (parseInt(settings.streetViewControl) !== 0),\n fullscreenControl: (parseInt(settings.fullScreenControl) !== 0),\n scrollwheel: settings.activateScrollWheel,\n styles: ''\n };\n\n if (settings.styles) {\n mapOptions.styles = eval(settings.styles);\n }\n\n switch (settings.mapTypeId) {\n case 'google.maps.MapTypeId.HYBRID':\n case 'hybrid':\n mapOptions.mapTypeId = google.maps.MapTypeId.HYBRID;\n break;\n case 'google.maps.MapTypeId.ROADMAP':\n case 'roadmap':\n mapOptions.mapTypeId = google.maps.MapTypeId.ROADMAP;\n break;\n case 'google.maps.MapTypeId.SATELLITE':\n case 'satellite':\n mapOptions.mapTypeId = google.maps.MapTypeId.SATELLITE;\n break;\n case 'google.maps.MapTypeId.TERRAIN':\n case 'terrain':\n mapOptions.mapTypeId = google.maps.MapTypeId.TERRAIN;\n break;\n }\n\n return mapOptions;\n }\n\n /**\n * Returns CircleOptions which can be assigned to the Circle object of Google\n *\n * @param {L.Map} map\n * @param {object} centerPosition\n * @param {PoiCollection} poiCollection\n * @return {object}\n */\n getCircleOptions (map, centerPosition, poiCollection) {\n return {\n map: map,\n center: centerPosition,\n radius: poiCollection.radius,\n strokeColor: poiCollection.strokeColor,\n strokeOpacity: poiCollection.strokeOpacity,\n strokeWeight: poiCollection.strokeWeight,\n fillColor: poiCollection.fillColor,\n fillOpacity: poiCollection.fillOpacity\n };\n }\n\n /**\n * Returns PolygonOptions which can be assigned to the Polygon object of Google\n *\n * @param {object} paths\n * @param {PoiCollection} poiCollection\n * @return {object}\n */\n getPolygonOptions (paths, poiCollection) {\n return {\n paths: paths,\n strokeColor: poiCollection.strokeColor,\n strokeOpacity: poiCollection.strokeOpacity,\n strokeWeight: poiCollection.strokeWeight,\n fillColor: poiCollection.fillColor,\n fillOpacity: poiCollection.fillOpacity\n };\n }\n\n /**\n * Return PolylineOptions which can be assigned to the Polyline object of Google\n *\n * @param {object} paths\n * @param {PoiCollection} poiCollection\n * @return {object}\n */\n getPolylineOptions (paths, poiCollection) {\n return {\n path: paths,\n strokeColor: poiCollection.strokeColor,\n strokeOpacity: poiCollection.strokeOpacity,\n strokeWeight: poiCollection.strokeWeight,\n };\n }\n\n /**\n * Create Map\n *\n * @param {HTMLElement} element\n * @param {Environment} environment\n */\n createMap (element, environment) {\n this.map = new google.maps.Map(\n element,\n this.getMapOptions(environment.settings)\n );\n }\n\n /**\n * @param {string | number} value\n * @return {boolean}\n */\n canBeInterpretedAsNumber(value) {\n return typeof value === 'number' || !isNaN(Number(value));\n }\n\n /**\n * @param {string | number} dimension\n * @returns {string}\n */\n normalizeDimension(dimension) {\n let normalizedDimension = String(dimension);\n\n if (this.canBeInterpretedAsNumber(normalizedDimension)) {\n normalizedDimension += 'px';\n }\n\n return normalizedDimension;\n }\n\n /**\n * @param {Settings} settings\n * @returns {boolean}\n */\n shouldFitBounds(settings) {\n if (settings.forceZoom === true) {\n return false;\n }\n\n if (this.poiCollections === null) {\n return false;\n }\n\n if (this.poiCollections.length > 1) {\n return true;\n }\n\n if (\n this.poiCollections.length === 1\n && (\n this.poiCollections[0].collectionType === \"Area\"\n || this.poiCollections[0].collectionType === \"Route\"\n )\n ) {\n return true;\n }\n\n return false;\n }\n\n /**\n * @param {HTMLElement} element\n * @param {Settings} settings\n */\n setMapDimensions(element, settings) {\n element.style.height = this.normalizeDimension(settings.mapHeight);\n element.style.width = this.normalizeDimension(settings.mapWidth);\n }\n\n /**\n * Group Categories\n *\n * @param {Environment} environment\n */\n groupCategories = environment => {\n let groupedCategories = {};\n let categoryUid = \"0\";\n for (let x = 0; x < this.poiCollections.length; x++) {\n for (let y = 0; y < this.poiCollections[x].categories.length; y++) {\n categoryUid = String(this.poiCollections[x].categories[y].uid);\n if (this.inList(environment.settings.categories, categoryUid) > -1 && !groupedCategories.hasOwnProperty(categoryUid)) {\n groupedCategories[categoryUid] = this.poiCollections[x].categories[y];\n }\n }\n }\n\n return groupedCategories;\n };\n\n /**\n * Get categories of all checkboxes with a given status\n *\n * @param {HTMLElement} form The HTML form element containing the checkboxes\n * @param {boolean} isChecked Get checkboxes of this status only\n */\n getCategoriesOfCheckboxesWithStatus = (form, isChecked) => {\n let categories = [];\n let checkboxes = isChecked ? form.querySelectorAll(\"input:checked\") : form.querySelectorAll(\"input:not(input:checked)\");\n\n checkboxes.forEach(checkbox => {\n categories.push(parseInt(checkbox.value));\n });\n\n return categories;\n }\n\n getMarkersToChangeVisibilityFor = (categoryUid, form, isChecked) => {\n let markers = [];\n if (this.allMarkers.length === 0) {\n return markers;\n }\n\n let marker = null;\n let allCategoriesOfMarker = null;\n let categoriesOfCheckboxesWithStatus = this.getCategoriesOfCheckboxesWithStatus(form, isChecked);\n for (let i = 0; i < this.allMarkers.length; i++) {\n marker = this.allMarkers[i];\n allCategoriesOfMarker = marker.poiCollection.categories;\n if (allCategoriesOfMarker.length === 0) {\n continue;\n }\n\n let markerCategoryHasCheckboxWithStatus;\n for (let j = 0; j < allCategoriesOfMarker.length; j++) {\n markerCategoryHasCheckboxWithStatus = false;\n for (let k = 0; k < categoriesOfCheckboxesWithStatus.length; k++) {\n if (allCategoriesOfMarker[j].uid === categoriesOfCheckboxesWithStatus[k]) {\n markerCategoryHasCheckboxWithStatus = true;\n }\n }\n if (markerCategoryHasCheckboxWithStatus === isChecked) {\n break;\n }\n }\n\n if (markerCategoryHasCheckboxWithStatus) {\n markers.push(marker.marker);\n }\n }\n\n return markers;\n }\n\n /**\n * Show switchable categories\n *\n * @param {HTMLElement} element\n * @param {Environment} environment\n */\n showSwitchableCategories = (element, environment) => {\n let categories = this.groupCategories(environment);\n let form = document.createElement(\"form\");\n let span = {};\n\n form.classList.add(\"txMaps2Form\");\n form.setAttribute(\"id\", \"txMaps2Form-\" + environment.contentRecord.uid);\n\n // Add checkbox for category\n for (let categoryUid in categories) {\n if (categories.hasOwnProperty(categoryUid)) {\n form.appendChild(this.getCheckbox(categories[categoryUid]));\n form.querySelector(\"#checkCategory_\" + categoryUid)?.insertAdjacentHTML(\n \"afterend\",\n `${categories[categoryUid].title}`\n );\n }\n }\n\n // Add listener for checkboxes\n form.querySelectorAll(\"input\").forEach((checkbox) => {\n checkbox.addEventListener(\"click\", () => {\n let isChecked = (checkbox).checked;\n let categoryUid = (checkbox).value;\n let markers = this.getMarkersToChangeVisibilityFor(categoryUid, form, isChecked);\n\n markers.forEach((marker) => {\n marker.setVisible(isChecked);\n });\n });\n });\n\n element.insertAdjacentElement(\"afterend\", form);\n }\n\n /**\n * Get Checkbox for Category\n *\n * @param category\n */\n getCheckbox(category) {\n let div = document.createElement(\"div\");\n div.classList.add(\"form-group\");\n div.innerHTML = `\n
\n \n
`;\n\n return div;\n }\n\n /**\n * Count Object properties\n *\n * @param obj\n */\n countObjectProperties = obj => {\n let count = 0;\n for (let key in obj) {\n if (obj.hasOwnProperty(key)) {\n count++;\n }\n }\n return count;\n }\n\n /**\n * Create Point by CollectionType\n *\n * @param {HTMLElement} element\n * @param {Environment} environment\n */\n createPointByCollectionType = (element, environment) => {\n let marker;\n let categoryUid = 0;\n\n if (this.poiCollections !== null && this.poiCollections.length) {\n this.poiCollections.forEach(poiCollection => {\n if (poiCollection.strokeColor === \"\") {\n poiCollection.strokeColor = environment.extConf.strokeColor;\n }\n if (poiCollection.strokeOpacity === \"\") {\n poiCollection.strokeOpacity = environment.extConf.strokeOpacity;\n }\n if (poiCollection.strokeWeight === \"\") {\n poiCollection.strokeWeight = environment.extConf.strokeWeight;\n }\n if (poiCollection.fillColor === \"\") {\n poiCollection.fillColor = environment.extConf.fillColor;\n }\n if (poiCollection.fillOpacity === \"\") {\n poiCollection.fillOpacity = environment.extConf.fillOpacity;\n }\n\n marker = null;\n switch (poiCollection.collectionType) {\n case \"Point\":\n marker = this.createMarker(poiCollection, element, environment);\n break;\n case \"Area\":\n marker = this.createArea(poiCollection, environment);\n break;\n case \"Route\":\n marker = this.createRoute(poiCollection, environment);\n break;\n case \"Radius\":\n marker = this.createRadius(poiCollection, environment);\n break;\n }\n\n if (marker !== null) {\n this.allMarkers.push({\n marker: marker,\n poiCollection: poiCollection\n });\n\n categoryUid = 0;\n for (let c = 0; c < poiCollection.categories.length; c++) {\n categoryUid = poiCollection.categories[c].uid;\n if (!this.categorizedMarkers.hasOwnProperty(categoryUid)) {\n this.categorizedMarkers[categoryUid] = [];\n }\n this.categorizedMarkers[categoryUid].push({\n marker: marker,\n relatedCategories: poiCollection.categories\n });\n }\n }\n });\n }\n }\n\n /**\n * Create Marker with InfoWindow\n *\n * @param {PoiCollection} poiCollection\n * @param {HTMLElement} element\n * @param {Environment} environment\n */\n createMarker = (poiCollection, element, environment) => {\n let categoryUid = \"0\";\n let marker = new google.maps.Marker({\n position: new google.maps.LatLng(poiCollection.latitude, poiCollection.longitude),\n map: this.map\n });\n marker.setDraggable(this.editable);\n\n // assign first found marker icon, if available\n if (poiCollection.hasOwnProperty(\"markerIcon\") && poiCollection.markerIcon !== \"\") {\n let icon = {\n url: poiCollection.markerIcon,\n scaledSize: new google.maps.Size(poiCollection.markerIconWidth, poiCollection.markerIconHeight),\n anchor: new google.maps.Point(poiCollection.markerIconAnchorPosX, poiCollection.markerIconAnchorPosY)\n };\n marker.setIcon(icon);\n }\n\n this.pointMarkers.push(marker);\n this.bounds.extend(marker.position);\n\n if (this.editable) {\n this.addEditListeners(element, marker, poiCollection, environment);\n } else {\n this.addInfoWindow(marker, poiCollection, environment);\n }\n\n return marker;\n }\n\n /**\n * Create Area\n *\n * @param poiCollection\n * @param environment\n */\n createArea = (poiCollection, environment) => {\n let latLng;\n let paths = [];\n for (let i = 0; i < poiCollection.pois.length; i++) {\n latLng = new google.maps.LatLng(poiCollection.pois[i].latitude, poiCollection.pois[i].longitude);\n this.bounds.extend(latLng);\n paths.push(latLng);\n }\n\n if (paths.length === 0) {\n paths.push(this.mapPosition);\n }\n\n let area = new google.maps.Polygon(this.getPolygonOptions(paths, poiCollection));\n area.setMap(this.map);\n this.addInfoWindow(area, poiCollection, environment);\n\n return area;\n }\n\n /**\n * Create Route\n *\n * @param poiCollection\n * @param environment\n */\n createRoute = (poiCollection, environment) => {\n let latLng;\n let paths = [];\n for (let i = 0; i < poiCollection.pois.length; i++) {\n latLng = new google.maps.LatLng(poiCollection.pois[i].latitude, poiCollection.pois[i].longitude);\n this.bounds.extend(latLng);\n paths.push(latLng);\n }\n\n if (paths.length === 0) {\n paths.push(this.mapPosition);\n }\n\n let route = new google.maps.Polyline(this.getPolylineOptions(paths, poiCollection));\n route.setMap(this.map);\n this.addInfoWindow(route, poiCollection, environment);\n\n return route;\n }\n\n /**\n * Create Radius\n *\n * @param poiCollection\n * @param environment\n */\n createRadius = (poiCollection, environment) => {\n let circle = new google.maps.Circle(\n this.getCircleOptions(\n this.map,\n new google.maps.LatLng(poiCollection.latitude, poiCollection.longitude),\n poiCollection\n )\n );\n\n this.bounds.union(circle.getBounds());\n this.addInfoWindow(circle, poiCollection, environment);\n\n return circle;\n }\n\n /**\n * Add Info Window to element\n *\n * @param element\n * @param poiCollection\n * @param environment\n */\n addInfoWindow = (element, poiCollection, environment) => {\n // we need these both vars to be set global. So that we can access them in Listener\n let infoWindow = this.infoWindow;\n let map = this.map;\n google.maps.event.addListener(element, \"click\", event => {\n fetch(environment.ajaxUrl, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify({\n poiCollection: poiCollection.uid\n })\n })\n .then(response => response.json())\n .then(data => {\n infoWindow.close();\n infoWindow.setContent(data.content);\n\n // Do not set pointer of InfoWindow to the same pointer of the POI icon.\n // In case of Point the pointer of InfoWindow should be at mouse position.\n if (poiCollection.collectionType === \"Point\") {\n infoWindow.setPosition(null);\n infoWindow.open(map, element);\n } else {\n infoWindow.setPosition(new google.maps.LatLng(poiCollection.latitude, poiCollection.longitude));\n infoWindow.open(map);\n }\n })\n .catch(error => console.error('Error:', error));\n });\n }\n\n /**\n * Check for item in list\n * Check if an item exists in a comma-separated list of items.\n *\n * @param list\n * @param item\n */\n inList = (list, item) => {\n let catSearch = ',' + list + ',';\n item = ',' + item + ',';\n return catSearch.search(item);\n };\n\n /**\n * Create Marker with InfoWindow\n *\n * @param latitude\n * @param longitude\n */\n createMarkerByLatLng = (latitude, longitude) => {\n let marker = new google.maps.Marker({\n position: new google.maps.LatLng(latitude, longitude),\n map: this.map\n });\n this.bounds.extend(marker.position);\n };\n\n /**\n * Add Edit Listeners\n * This will only work for Markers (Point)\n *\n * @param mapContainer\n * @param marker\n * @param poiCollection\n * @param environment\n */\n addEditListeners = (mapContainer, marker, poiCollection, environment) => {\n // update fields and marker while dragging\n google.maps.event.addListener(marker, 'dragend', () => {\n let lat = marker.getPosition().lat().toFixed(6);\n let lng = marker.getPosition().lng().toFixed(6);\n mapContainer.prevAll(\"input.latitude-\" + environment.contentRecord.uid).val(lat);\n mapContainer.prevAll(\"input.longitude-\" + environment.contentRecord.uid).val(lng);\n });\n\n // update fields and marker when clicking on the map\n google.maps.event.addListener(this.map, 'click', event => {\n marker.setPosition(event.latLng);\n mapContainer.prevAll(\"input.latitude-\" + environment.contentRecord.uid).val(event.latLng.lat().toFixed(6));\n mapContainer.prevAll(\"input.longitude-\" + environment.contentRecord.uid).val(event.latLng.lng().toFixed(6));\n });\n };\n}\n\nlet maps2GoogleMaps = [];\n\n/**\n * This function will be called by the &callback argument of the Google Maps API library\n */\nfunction initMap () {\n document.querySelectorAll(\".maps2\").forEach(element => {\n const environment = typeof element.dataset.environment !== 'undefined' ? element.dataset.environment : '{}';\n const override = typeof element.dataset.override !== 'undefined' ? element.dataset.override : '{}';\n\n // Pass in the objects to merge as arguments.\n // For a deep extend, set the first argument to `true`.\n const extend = () => {\n let extended = {};\n let deep = false;\n let i = 0;\n let length = arguments.length;\n\n // Check for deep merge\n if (Object.prototype.toString.call(arguments[0]) === '[object Boolean]') {\n deep = arguments[0];\n i++;\n }\n\n // Merge the object into the extended object\n const merge = function (obj) {\n for ( var prop in obj ) {\n if ( Object.prototype.hasOwnProperty.call( obj, prop ) ) {\n // If deep merge and property is an object, merge properties\n if ( deep && Object.prototype.toString.call(obj[prop]) === '[object Object]' ) {\n extended[prop] = extend( true, extended[prop], obj[prop] );\n } else {\n extended[prop] = obj[prop];\n }\n }\n }\n };\n\n // Loop through each object and conduct a merge\n for ( ; i < length; i++ ) {\n var obj = arguments[i];\n merge(obj);\n }\n\n return extended;\n };\n\n maps2GoogleMaps.push(new GoogleMaps2(\n element,\n extend(JSON.parse(environment), JSON.parse(override))\n ));\n });\n\n // Initialize radius search\n let address = document.querySelector('#maps2Address');\n let radius = document.querySelector('#maps2Radius');\n if (address !== null && radius !== null) {\n let autocomplete = new google.maps.places.Autocomplete(address, {\n fields: [\n \"place_id\"\n ]\n });\n\n address.addEventListener(\"keydown\", event => {\n if (event.keyCode === 13) return false;\n });\n }\n}\n"]} \ No newline at end of file +{"version":3,"sources":["GoogleMaps2.js"],"names":["GoogleMaps2","allMarkers","categorizedMarkers","pointMarkers","bounds","infoWindow","poiCollections","editable","map","constructor","element","environment","lat","lng","this","google","maps","LatLngBounds","InfoWindow","JSON","parse","dataset","pois","classList","contains","setMapDimensions","settings","createMap","Number","latitude","longitude","createMarkerByLatLng","setCenter","LatLng","extConf","defaultLatitude","defaultLongitude","createPointByCollectionType","markerClusterer","enable","MarkerClusterer","imagePath","countObjectProperties","showSwitchableCategories","shouldFitBounds","fitBounds","getMapOptions","let","mapOptions","mapTypeId","zoom","parseInt","zoomControl","mapTypeControl","scaleControl","streetViewControl","fullscreenControl","fullScreenControl","scrollwheel","activateScrollWheel","styles","eval","MapTypeId","HYBRID","ROADMAP","SATELLITE","TERRAIN","getCircleOptions","centerPosition","poiCollection","center","radius","strokeColor","strokeOpacity","strokeWeight","fillColor","fillOpacity","getPolygonOptions","paths","getPolylineOptions","path","Map","canBeInterpretedAsNumber","value","isNaN","normalizeDimension","dimension","normalizedDimension","String","forceZoom","length","collectionType","style","height","mapHeight","width","mapWidth","groupCategories","categoryUid","groupedCategories","x","y","categories","uid","inList","hasOwnProperty","getCategoriesOfCheckboxesWithStatus","form","isChecked","querySelectorAll","forEach","checkbox","push","getMarkersToChangeVisibilityFor","markers","marker","allCategoriesOfMarker","categoriesOfCheckboxesWithStatus","i","markerCategoryHasCheckboxWithStatus","j","k","document","createElement","add","setAttribute","contentRecord","appendChild","getCheckbox","querySelector","insertAdjacentHTML","title","addEventListener","checked","setVisible","insertAdjacentElement","category","div","innerHTML","obj","count","key","createMarker","createArea","createRoute","createRadius","c","relatedCategories","icon","Marker","position","setDraggable","markerIcon","url","scaledSize","Size","markerIconWidth","markerIconHeight","anchor","Point","markerIconAnchorPosX","markerIconAnchorPosY","setIcon","extend","addEditListeners","addInfoWindow","latLng","mapPosition","area","Polygon","setMap","route","Polyline","circle","Circle","union","getBounds","event","addListener","fetch","ajaxUrl","method","headers","Content-Type","body","stringify","then","response","json","data","close","setContent","content","setPosition","open","catch","error","console","list","item","search","mapContainer","getPosition","toFixed","prevAll","val","maps2GoogleMaps","initMap","override","arguments","extended","deep","Object","prototype","toString","call","prop","address","places","Autocomplete","fields","keyCode"],"mappings":"MAAAA,YACAC,WAAA,GACAC,mBAAA,GACAC,aAAA,GACAC,OAAA,GACAC,WAAA,GACAC,eAAA,GACAC,SAAA,GACAC,IAAA,GAOAC,YAAAC,EAAAC,GAaA,IAEAC,EACAC,EAfAC,KAAAb,WAAA,GACAa,KAAAZ,mBAAA,GACAY,KAAAX,aAAA,GACAW,KAAAV,OAAA,IAAAW,OAAAC,KAAAC,aACAH,KAAAT,WAAA,IAAAU,OAAAC,KAAAE,WACAJ,KAAAR,eAAAa,KAAAC,MAAAV,EAAAW,QAAAC,MAAA,MAAA,EACAR,KAAAP,SAAAG,EAAAa,UAAAC,SAAA,YAAA,EAEAV,KAAAW,iBAAAf,EAAAC,EAAAe,QAAA,EAEAZ,KAAAa,UAAAjB,EAAAC,CAAA,EAEA,KAAA,IAAAG,KAAAR,gBAAA,OAAAQ,KAAAR,gBAEAM,EAAAgB,OAAAlB,EAAAW,QAAAQ,QAAA,EACAhB,EAAAe,OAAAlB,EAAAW,QAAAS,SAAA,EACAlB,GAAAC,GACAC,KAAAiB,qBA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A,CACA,WAEA,CAAA,EAEAH,EAAArF,iBAAA,UAAA6C,IACA,GAAA,KAAAA,EAAA4C,QAAA,MAAA,CAAA,CACA,CAAA,EAEA","file":"GoogleMaps2.min.js","sourcesContent":["class GoogleMaps2 {\n allMarkers = [];\n categorizedMarkers = {};\n pointMarkers = [];\n bounds = {};\n infoWindow = {};\n poiCollections = {};\n editable = {};\n map = {};\n\n /**\n * @param {HTMLElement} element\n * @param {Environment} environment\n * @constructor\n */\n constructor (element, environment) {\n this.allMarkers = [];\n this.categorizedMarkers = {};\n this.pointMarkers = [];\n this.bounds = new google.maps.LatLngBounds();\n this.infoWindow = new google.maps.InfoWindow();\n this.poiCollections = JSON.parse(element.dataset.pois || \"null\");\n this.editable = element.classList.contains('editMarker');\n\n this.setMapDimensions(element, environment.settings);\n\n this.createMap(element, environment);\n\n if (typeof this.poiCollections === 'undefined' || this.poiCollections === null) {\n // Plugin: CityMap\n let lat = Number(element.dataset.latitude);\n let lng = Number(element.dataset.longitude);\n if (lat && lng) {\n this.createMarkerByLatLng(lat, lng);\n this.map.setCenter(new google.maps.LatLng(lat, lng));\n } else {\n // Fallback\n this.map.setCenter(new google.maps.LatLng(environment.extConf.defaultLatitude, environment.extConf.defaultLongitude));\n }\n } else {\n // normal case\n this.createPointByCollectionType(element, environment);\n if (\n typeof environment.settings.markerClusterer !== 'undefined'\n && environment.settings.markerClusterer.enable === 1\n ) {\n new MarkerClusterer(\n this.map,\n this.pointMarkers,\n { imagePath: environment.settings.markerClusterer.imagePath }\n );\n }\n\n if (this.countObjectProperties(this.categorizedMarkers) > 1) {\n this.showSwitchableCategories(element, environment);\n }\n\n if (this.shouldFitBounds(environment.settings)) {\n this.map.fitBounds(this.bounds);\n } else {\n this.map.setCenter(new google.maps.LatLng(this.poiCollections[0].latitude, this.poiCollections[0].longitude));\n }\n }\n }\n\n /**\n * Return a MapOptions object which can be assigned to the Map object of Google\n *\n * @param {Settings} settings\n * @return {object}\n */\n getMapOptions = settings => {\n let mapOptions = {\n mapTypeId: '',\n zoom: parseInt(settings.zoom),\n zoomControl: (parseInt(settings.zoomControl) !== 0),\n mapTypeControl: (parseInt(settings.mapTypeControl) !== 0),\n scaleControl: (parseInt(settings.scaleControl) !== 0),\n streetViewControl: (parseInt(settings.streetViewControl) !== 0),\n fullscreenControl: (parseInt(settings.fullScreenControl) !== 0),\n scrollwheel: settings.activateScrollWheel,\n styles: ''\n };\n\n if (settings.styles) {\n mapOptions.styles = eval(settings.styles);\n }\n\n switch (settings.mapTypeId) {\n case 'google.maps.MapTypeId.HYBRID':\n case 'hybrid':\n mapOptions.mapTypeId = google.maps.MapTypeId.HYBRID;\n break;\n case 'google.maps.MapTypeId.ROADMAP':\n case 'roadmap':\n mapOptions.mapTypeId = google.maps.MapTypeId.ROADMAP;\n break;\n case 'google.maps.MapTypeId.SATELLITE':\n case 'satellite':\n mapOptions.mapTypeId = google.maps.MapTypeId.SATELLITE;\n break;\n case 'google.maps.MapTypeId.TERRAIN':\n case 'terrain':\n mapOptions.mapTypeId = google.maps.MapTypeId.TERRAIN;\n break;\n }\n\n return mapOptions;\n }\n\n /**\n * Returns CircleOptions which can be assigned to the Circle object of Google\n *\n * @param {L.Map} map\n * @param {object} centerPosition\n * @param {PoiCollection} poiCollection\n * @return {object}\n */\n getCircleOptions (map, centerPosition, poiCollection) {\n return {\n map: map,\n center: centerPosition,\n radius: poiCollection.radius,\n strokeColor: poiCollection.strokeColor,\n strokeOpacity: poiCollection.strokeOpacity,\n strokeWeight: poiCollection.strokeWeight,\n fillColor: poiCollection.fillColor,\n fillOpacity: poiCollection.fillOpacity\n };\n }\n\n /**\n * Returns PolygonOptions which can be assigned to the Polygon object of Google\n *\n * @param {object} paths\n * @param {PoiCollection} poiCollection\n * @return {object}\n */\n getPolygonOptions (paths, poiCollection) {\n return {\n paths: paths,\n strokeColor: poiCollection.strokeColor,\n strokeOpacity: poiCollection.strokeOpacity,\n strokeWeight: poiCollection.strokeWeight,\n fillColor: poiCollection.fillColor,\n fillOpacity: poiCollection.fillOpacity\n };\n }\n\n /**\n * Return PolylineOptions which can be assigned to the Polyline object of Google\n *\n * @param {object} paths\n * @param {PoiCollection} poiCollection\n * @return {object}\n */\n getPolylineOptions (paths, poiCollection) {\n return {\n path: paths,\n strokeColor: poiCollection.strokeColor,\n strokeOpacity: poiCollection.strokeOpacity,\n strokeWeight: poiCollection.strokeWeight,\n };\n }\n\n /**\n * Create Map\n *\n * @param {HTMLElement} element\n * @param {Environment} environment\n */\n createMap (element, environment) {\n this.map = new google.maps.Map(\n element,\n this.getMapOptions(environment.settings)\n );\n }\n\n /**\n * @param {string | number} value\n * @return {boolean}\n */\n canBeInterpretedAsNumber(value) {\n return typeof value === 'number' || !isNaN(Number(value));\n }\n\n /**\n * @param {string | number} dimension\n * @returns {string}\n */\n normalizeDimension(dimension) {\n let normalizedDimension = String(dimension);\n\n if (this.canBeInterpretedAsNumber(normalizedDimension)) {\n normalizedDimension += 'px';\n }\n\n return normalizedDimension;\n }\n\n /**\n * @param {Settings} settings\n * @returns {boolean}\n */\n shouldFitBounds(settings) {\n if (settings.forceZoom === true) {\n return false;\n }\n\n if (this.poiCollections === null) {\n return false;\n }\n\n if (this.poiCollections.length > 1) {\n return true;\n }\n\n if (\n this.poiCollections.length === 1\n && (\n this.poiCollections[0].collectionType === \"Area\"\n || this.poiCollections[0].collectionType === \"Route\"\n )\n ) {\n return true;\n }\n\n return false;\n }\n\n /**\n * @param {HTMLElement} element\n * @param {Settings} settings\n */\n setMapDimensions(element, settings) {\n element.style.height = this.normalizeDimension(settings.mapHeight);\n element.style.width = this.normalizeDimension(settings.mapWidth);\n }\n\n /**\n * Group Categories\n *\n * @param {Environment} environment\n */\n groupCategories = environment => {\n let groupedCategories = {};\n let categoryUid = \"0\";\n for (let x = 0; x < this.poiCollections.length; x++) {\n for (let y = 0; y < this.poiCollections[x].categories.length; y++) {\n categoryUid = String(this.poiCollections[x].categories[y].uid);\n if (this.inList(environment.settings.categories, categoryUid) > -1 && !groupedCategories.hasOwnProperty(categoryUid)) {\n groupedCategories[categoryUid] = this.poiCollections[x].categories[y];\n }\n }\n }\n\n return groupedCategories;\n };\n\n /**\n * Get categories of all checkboxes with a given status\n *\n * @param {HTMLElement} form The HTML form element containing the checkboxes\n * @param {boolean} isChecked Get checkboxes of this status only\n */\n getCategoriesOfCheckboxesWithStatus = (form, isChecked) => {\n let categories = [];\n let checkboxes = isChecked ? form.querySelectorAll(\"input:checked\") : form.querySelectorAll(\"input:not(input:checked)\");\n\n checkboxes.forEach(checkbox => {\n categories.push(parseInt(checkbox.value));\n });\n\n return categories;\n }\n\n getMarkersToChangeVisibilityFor = (categoryUid, form, isChecked) => {\n let markers = [];\n if (this.allMarkers.length === 0) {\n return markers;\n }\n\n let marker = null;\n let allCategoriesOfMarker = null;\n let categoriesOfCheckboxesWithStatus = this.getCategoriesOfCheckboxesWithStatus(form, isChecked);\n for (let i = 0; i < this.allMarkers.length; i++) {\n marker = this.allMarkers[i];\n allCategoriesOfMarker = marker.poiCollection.categories;\n if (allCategoriesOfMarker.length === 0) {\n continue;\n }\n\n let markerCategoryHasCheckboxWithStatus;\n for (let j = 0; j < allCategoriesOfMarker.length; j++) {\n markerCategoryHasCheckboxWithStatus = false;\n for (let k = 0; k < categoriesOfCheckboxesWithStatus.length; k++) {\n if (allCategoriesOfMarker[j].uid === categoriesOfCheckboxesWithStatus[k]) {\n markerCategoryHasCheckboxWithStatus = true;\n }\n }\n if (markerCategoryHasCheckboxWithStatus === isChecked) {\n break;\n }\n }\n\n if (markerCategoryHasCheckboxWithStatus) {\n markers.push(marker.marker);\n }\n }\n\n return markers;\n }\n\n /**\n * Show switchable categories\n *\n * @param {HTMLElement} element\n * @param {Environment} environment\n */\n showSwitchableCategories = (element, environment) => {\n let categories = this.groupCategories(environment);\n let form = document.createElement(\"form\");\n let span = {};\n\n form.classList.add(\"txMaps2Form\");\n form.setAttribute(\"id\", \"txMaps2Form-\" + environment.contentRecord.uid);\n\n // Add checkbox for category\n for (let categoryUid in categories) {\n if (categories.hasOwnProperty(categoryUid)) {\n form.appendChild(this.getCheckbox(categories[categoryUid]));\n form.querySelector(\"#checkCategory_\" + categoryUid)?.insertAdjacentHTML(\n \"afterend\",\n `${categories[categoryUid].title}`\n );\n }\n }\n\n // Add listener for checkboxes\n form.querySelectorAll(\"input\").forEach((checkbox) => {\n checkbox.addEventListener(\"click\", () => {\n let isChecked = (checkbox).checked;\n let categoryUid = (checkbox).value;\n let markers = this.getMarkersToChangeVisibilityFor(categoryUid, form, isChecked);\n\n markers.forEach((marker) => {\n marker.setVisible(isChecked);\n });\n });\n });\n\n element.insertAdjacentElement(\"afterend\", form);\n }\n\n /**\n * Get Checkbox for Category\n *\n * @param category\n */\n getCheckbox(category) {\n let div = document.createElement(\"div\");\n div.classList.add(\"form-group\");\n div.innerHTML = `\n
\n \n
`;\n\n return div;\n }\n\n /**\n * Count Object properties\n *\n * @param obj\n */\n countObjectProperties = obj => {\n let count = 0;\n for (let key in obj) {\n if (obj.hasOwnProperty(key)) {\n count++;\n }\n }\n return count;\n }\n\n /**\n * Create Point by CollectionType\n *\n * @param {HTMLElement} element\n * @param {Environment} environment\n */\n createPointByCollectionType = (element, environment) => {\n let marker;\n let categoryUid = 0;\n\n if (this.poiCollections !== null && this.poiCollections.length) {\n this.poiCollections.forEach(poiCollection => {\n if (poiCollection.strokeColor === \"\") {\n poiCollection.strokeColor = environment.extConf.strokeColor;\n }\n if (poiCollection.strokeOpacity === \"\") {\n poiCollection.strokeOpacity = environment.extConf.strokeOpacity;\n }\n if (poiCollection.strokeWeight === \"\") {\n poiCollection.strokeWeight = environment.extConf.strokeWeight;\n }\n if (poiCollection.fillColor === \"\") {\n poiCollection.fillColor = environment.extConf.fillColor;\n }\n if (poiCollection.fillOpacity === \"\") {\n poiCollection.fillOpacity = environment.extConf.fillOpacity;\n }\n\n marker = null;\n switch (poiCollection.collectionType) {\n case \"Point\":\n marker = this.createMarker(poiCollection, element, environment);\n break;\n case \"Area\":\n marker = this.createArea(poiCollection, environment);\n break;\n case \"Route\":\n marker = this.createRoute(poiCollection, environment);\n break;\n case \"Radius\":\n marker = this.createRadius(poiCollection, environment);\n break;\n }\n\n if (marker !== null) {\n this.allMarkers.push({\n marker: marker,\n poiCollection: poiCollection\n });\n\n categoryUid = 0;\n for (let c = 0; c < poiCollection.categories.length; c++) {\n categoryUid = poiCollection.categories[c].uid;\n if (!this.categorizedMarkers.hasOwnProperty(categoryUid)) {\n this.categorizedMarkers[categoryUid] = [];\n }\n this.categorizedMarkers[categoryUid].push({\n marker: marker,\n relatedCategories: poiCollection.categories\n });\n }\n }\n });\n }\n }\n\n /**\n * Create Marker with InfoWindow\n *\n * @param {PoiCollection} poiCollection\n * @param {HTMLElement} element\n * @param {Environment} environment\n */\n createMarker = (poiCollection, element, environment) => {\n let categoryUid = \"0\";\n let marker = new google.maps.Marker({\n position: new google.maps.LatLng(poiCollection.latitude, poiCollection.longitude),\n map: this.map\n });\n marker.setDraggable(this.editable);\n\n // assign first found marker icon, if available\n if (poiCollection.hasOwnProperty(\"markerIcon\") && poiCollection.markerIcon !== \"\") {\n let icon = {\n url: poiCollection.markerIcon,\n scaledSize: new google.maps.Size(poiCollection.markerIconWidth, poiCollection.markerIconHeight),\n anchor: new google.maps.Point(poiCollection.markerIconAnchorPosX, poiCollection.markerIconAnchorPosY)\n };\n marker.setIcon(icon);\n }\n\n this.pointMarkers.push(marker);\n this.bounds.extend(marker.position);\n\n if (this.editable) {\n this.addEditListeners(element, marker, poiCollection, environment);\n } else {\n this.addInfoWindow(marker, poiCollection, environment);\n }\n\n return marker;\n }\n\n /**\n * Create Area\n *\n * @param poiCollection\n * @param environment\n */\n createArea = (poiCollection, environment) => {\n let latLng;\n let paths = [];\n for (let i = 0; i < poiCollection.pois.length; i++) {\n latLng = new google.maps.LatLng(poiCollection.pois[i].latitude, poiCollection.pois[i].longitude);\n this.bounds.extend(latLng);\n paths.push(latLng);\n }\n\n if (paths.length === 0) {\n paths.push(this.mapPosition);\n }\n\n let area = new google.maps.Polygon(this.getPolygonOptions(paths, poiCollection));\n area.setMap(this.map);\n this.addInfoWindow(area, poiCollection, environment);\n\n return area;\n }\n\n /**\n * Create Route\n *\n * @param poiCollection\n * @param environment\n */\n createRoute = (poiCollection, environment) => {\n let latLng;\n let paths = [];\n for (let i = 0; i < poiCollection.pois.length; i++) {\n latLng = new google.maps.LatLng(poiCollection.pois[i].latitude, poiCollection.pois[i].longitude);\n this.bounds.extend(latLng);\n paths.push(latLng);\n }\n\n if (paths.length === 0) {\n paths.push(this.mapPosition);\n }\n\n let route = new google.maps.Polyline(this.getPolylineOptions(paths, poiCollection));\n route.setMap(this.map);\n this.addInfoWindow(route, poiCollection, environment);\n\n return route;\n }\n\n /**\n * Create Radius\n *\n * @param poiCollection\n * @param environment\n */\n createRadius = (poiCollection, environment) => {\n let circle = new google.maps.Circle(\n this.getCircleOptions(\n this.map,\n new google.maps.LatLng(poiCollection.latitude, poiCollection.longitude),\n poiCollection\n )\n );\n\n this.bounds.union(circle.getBounds());\n this.addInfoWindow(circle, poiCollection, environment);\n\n return circle;\n }\n\n /**\n * Add Info Window to element\n *\n * @param element\n * @param poiCollection\n * @param environment\n */\n addInfoWindow = (element, poiCollection, environment) => {\n // we need these both vars to be set global. So that we can access them in Listener\n let infoWindow = this.infoWindow;\n let map = this.map;\n google.maps.event.addListener(element, \"click\", event => {\n fetch(environment.ajaxUrl, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify({\n poiCollection: poiCollection.uid\n })\n })\n .then(response => response.json())\n .then(data => {\n infoWindow.close();\n infoWindow.setContent(data.content);\n\n // Do not set pointer of InfoWindow to the same pointer of the POI icon.\n // In case of Point the pointer of InfoWindow should be at mouse position.\n if (poiCollection.collectionType === \"Point\") {\n infoWindow.setPosition(null);\n infoWindow.open(map, element);\n } else {\n infoWindow.setPosition(new google.maps.LatLng(poiCollection.latitude, poiCollection.longitude));\n infoWindow.open(map);\n }\n })\n .catch(error => console.error('Error:', error));\n });\n }\n\n /**\n * Check for item in list\n * Check if an item exists in a comma-separated list of items.\n *\n * @param list\n * @param item\n */\n inList = (list, item) => {\n let catSearch = ',' + list + ',';\n item = ',' + item + ',';\n return catSearch.search(item);\n };\n\n /**\n * Create Marker with InfoWindow\n *\n * @param latitude\n * @param longitude\n */\n createMarkerByLatLng = (latitude, longitude) => {\n let marker = new google.maps.Marker({\n position: new google.maps.LatLng(latitude, longitude),\n map: this.map\n });\n this.bounds.extend(marker.position);\n };\n\n /**\n * Add Edit Listeners\n * This will only work for Markers (Point)\n *\n * @param mapContainer\n * @param marker\n * @param poiCollection\n * @param environment\n */\n addEditListeners = (mapContainer, marker, poiCollection, environment) => {\n // update fields and marker while dragging\n google.maps.event.addListener(marker, 'dragend', () => {\n let lat = marker.getPosition().lat().toFixed(6);\n let lng = marker.getPosition().lng().toFixed(6);\n mapContainer.prevAll(\"input.latitude-\" + environment.contentRecord.uid).val(lat);\n mapContainer.prevAll(\"input.longitude-\" + environment.contentRecord.uid).val(lng);\n });\n\n // update fields and marker when clicking on the map\n google.maps.event.addListener(this.map, 'click', event => {\n marker.setPosition(event.latLng);\n mapContainer.prevAll(\"input.latitude-\" + environment.contentRecord.uid).val(event.latLng.lat().toFixed(6));\n mapContainer.prevAll(\"input.longitude-\" + environment.contentRecord.uid).val(event.latLng.lng().toFixed(6));\n });\n };\n}\n\nlet maps2GoogleMaps = [];\n\n/**\n * This function will be called by the &callback argument of the Google Maps API library\n */\nfunction initMap () {\n document.querySelectorAll(\".maps2\").forEach(element => {\n const environment = typeof element.dataset.environment !== 'undefined' ? element.dataset.environment : '{}';\n const override = typeof element.dataset.override !== 'undefined' ? element.dataset.override : '{}';\n\n // Pass in the objects to merge as arguments.\n // For a deep extend, set the first argument to `true`.\n const extend = (...arguments) => {\n let extended = {};\n let deep = false;\n let i = 0;\n let length = arguments.length;\n\n // Check for deep merge\n if (Object.prototype.toString.call(arguments[0]) === '[object Boolean]') {\n deep = arguments[0];\n i++;\n }\n\n // Merge the object into the extended object\n const merge = function (obj) {\n for ( var prop in obj ) {\n if ( Object.prototype.hasOwnProperty.call( obj, prop ) ) {\n // If deep merge and property is an object, merge properties\n if ( deep && Object.prototype.toString.call(obj[prop]) === '[object Object]' ) {\n extended[prop] = extend( true, extended[prop], obj[prop] );\n } else {\n extended[prop] = obj[prop];\n }\n }\n }\n };\n\n // Loop through each object and conduct a merge\n for ( ; i < length; i++ ) {\n var obj = arguments[i];\n merge(obj);\n }\n\n return extended;\n };\n\n maps2GoogleMaps.push(new GoogleMaps2(\n element,\n extend(JSON.parse(environment), JSON.parse(override))\n ));\n });\n\n // Initialize radius search\n let address = document.querySelector('#maps2Address');\n let radius = document.querySelector('#maps2Radius');\n if (address !== null && radius !== null) {\n let autocomplete = new google.maps.places.Autocomplete(address, {\n fields: [\n \"place_id\"\n ]\n });\n\n address.addEventListener(\"keydown\", event => {\n if (event.keyCode === 13) return false;\n });\n }\n}\n"]} \ No newline at end of file diff --git a/Resources/Public/JavaScript/OpenStreetMap2.min.js b/Resources/Public/JavaScript/OpenStreetMap2.min.js index 378e0b75..51510147 100644 --- a/Resources/Public/JavaScript/OpenStreetMap2.min.js +++ b/Resources/Public/JavaScript/OpenStreetMap2.min.js @@ -3,5 +3,5 @@ class OpenStreetMap2{element={};environment={};editable=!1;bounds={};allMarkers= - `,e}countObjectProperties(t){let e=0;for(var i in t)t.hasOwnProperty(i)&&e++;return e}createPointByCollectionType(){let i,o=0;null!==this.poiCollections&&this.poiCollections.length&&this.poiCollections.forEach(e=>{switch(""===e.strokeColor&&(e.strokeColor=this.getExtConf().strokeColor),""===e.strokeOpacity&&(e.strokeOpacity=this.getExtConf().strokeOpacity),""===e.strokeWeight&&(e.strokeWeight=this.getExtConf().strokeWeight),""===e.fillColor&&(e.fillColor=this.getExtConf().fillColor),""===e.fillOpacity&&(e.fillOpacity=this.getExtConf().fillOpacity),i=null,e.collectionType){case"Point":i=this.createMarker(e);break;case"Area":i=this.createArea(e);break;case"Route":i=this.createRoute(e);break;case"Radius":i=this.createRadius(e)}this.allMarkers.push({marker:i,poiCollection:e});for(let t=o=0;t{t=[t.latitude,t.longitude];this.bounds.extend(t),e.push(t)});var i=L.polygon(e,{color:t.strokeColor,opacity:t.strokeOpacity,weight:t.strokeWeight,fillColor:t.fillColor,fillOpacity:t.fillOpacity}).addTo(this.map);return this.addInfoWindow(i,t),i}createRoute(t){let e=[];t.pois.forEach(t=>{t=[t.latitude,t.longitude];this.bounds.extend(t),e.push(t)});var i=L.polyline(e,{color:t.strokeColor,opacity:t.strokeOpacity,weight:t.strokeWeight,fillColor:t.fillColor,fillOpacity:t.fillOpacity}).addTo(this.map);return this.addInfoWindow(i,t),i}createRadius(t){var e=L.circle([t.latitude,t.longitude],{color:t.strokeColor,opacity:t.strokeOpacity,weight:t.strokeWeight,fillColor:t.fillColor,fillOpacity:t.fillOpacity,radius:t.radius}).addTo(this.map);return this.bounds.extend(e.getBounds()),this.addInfoWindow(e,t),e}addInfoWindow(e,t){e.addEventListener("click",()=>{fetch(this.environment.ajaxUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({poiCollection:t.uid})}).then(t=>t.json()).then(t=>{e.bindPopup(t.content).openPopup()}).catch(t=>console.error("Error:",t))})}addEditListeners(i,o,t){o.on("dragend",()=>{var t=o.getLatLng().lat.toFixed(6),e=o.getLatLng().lng.toFixed(6);i.previousElementSibling?.querySelector("input.latitude-"+this.getContentRecord().uid).setAttribute("value",t),i.previousElementSibling?.querySelector("input.longitude-"+this.getContentRecord().uid).setAttribute("value",e)}),this.map.on("click",t=>{o.setLatLng(t.latlng),i.previousElementSibling?.querySelector("input.latitude-"+this.getContentRecord().uid).setAttribute("value",t.latlng.lat.toFixed(6)),i.previousElementSibling?.querySelector("input.longitude-"+this.getContentRecord().uid).setAttribute("value",t.latlng.lng.toFixed(6))})}canBeInterpretedAsNumber(t){return"number"==typeof t||!isNaN(Number(t))}getContentRecord(){return this.environment.contentRecord}getExtConf(){return this.environment.extConf}getSettings(){return this.environment.settings}}let maps2OpenStreetMaps=[];document.querySelectorAll(".maps2").forEach(t=>{var e=void 0!==t.dataset.environment?t.dataset.environment:"{}",i=void 0!==t.dataset.override?t.dataset.override:"{}";const n=()=>{let t={},e=!1,i=0;var o=arguments.length;for("[object Boolean]"===Object.prototype.toString.call(arguments[0])&&(e=arguments[0],i++);i`,e}countObjectProperties(t){let e=0;for(var i in t)t.hasOwnProperty(i)&&e++;return e}createPointByCollectionType(){let i,o=0;null!==this.poiCollections&&this.poiCollections.length&&this.poiCollections.forEach(e=>{switch(""===e.strokeColor&&(e.strokeColor=this.getExtConf().strokeColor),""===e.strokeOpacity&&(e.strokeOpacity=this.getExtConf().strokeOpacity),""===e.strokeWeight&&(e.strokeWeight=this.getExtConf().strokeWeight),""===e.fillColor&&(e.fillColor=this.getExtConf().fillColor),""===e.fillOpacity&&(e.fillOpacity=this.getExtConf().fillOpacity),i=null,e.collectionType){case"Point":i=this.createMarker(e);break;case"Area":i=this.createArea(e);break;case"Route":i=this.createRoute(e);break;case"Radius":i=this.createRadius(e)}this.allMarkers.push({marker:i,poiCollection:e});for(let t=o=0;t{t=[t.latitude,t.longitude];this.bounds.extend(t),e.push(t)});var i=L.polygon(e,{color:t.strokeColor,opacity:t.strokeOpacity,weight:t.strokeWeight,fillColor:t.fillColor,fillOpacity:t.fillOpacity}).addTo(this.map);return this.addInfoWindow(i,t),i}createRoute(t){let e=[];t.pois.forEach(t=>{t=[t.latitude,t.longitude];this.bounds.extend(t),e.push(t)});var i=L.polyline(e,{color:t.strokeColor,opacity:t.strokeOpacity,weight:t.strokeWeight,fillColor:t.fillColor,fillOpacity:t.fillOpacity}).addTo(this.map);return this.addInfoWindow(i,t),i}createRadius(t){var e=L.circle([t.latitude,t.longitude],{color:t.strokeColor,opacity:t.strokeOpacity,weight:t.strokeWeight,fillColor:t.fillColor,fillOpacity:t.fillOpacity,radius:t.radius}).addTo(this.map);return this.bounds.extend(e.getBounds()),this.addInfoWindow(e,t),e}addInfoWindow(e,t){e.addEventListener("click",()=>{fetch(this.environment.ajaxUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({poiCollection:t.uid})}).then(t=>t.json()).then(t=>{e.bindPopup(t.content).openPopup()}).catch(t=>console.error("Error:",t))})}addEditListeners(i,o,t){o.on("dragend",()=>{var t=o.getLatLng().lat.toFixed(6),e=o.getLatLng().lng.toFixed(6);i.previousElementSibling?.querySelector("input.latitude-"+this.getContentRecord().uid).setAttribute("value",t),i.previousElementSibling?.querySelector("input.longitude-"+this.getContentRecord().uid).setAttribute("value",e)}),this.map.on("click",t=>{o.setLatLng(t.latlng),i.previousElementSibling?.querySelector("input.latitude-"+this.getContentRecord().uid).setAttribute("value",t.latlng.lat.toFixed(6)),i.previousElementSibling?.querySelector("input.longitude-"+this.getContentRecord().uid).setAttribute("value",t.latlng.lng.toFixed(6))})}canBeInterpretedAsNumber(t){return"number"==typeof t||!isNaN(Number(t))}getContentRecord(){return this.environment.contentRecord}getExtConf(){return this.environment.extConf}getSettings(){return this.environment.settings}}let maps2OpenStreetMaps=[];document.querySelectorAll(".maps2").forEach(t=>{var e=void 0!==t.dataset.environment?t.dataset.environment:"{}",i=void 0!==t.dataset.override?t.dataset.override:"{}";const n=(...arguments)=>{let t={},e=!1,i=0;var o=arguments.length;for("[object Boolean]"===Object.prototype.toString.call(arguments[0])&&(e=arguments[0],i++);i 1) {\n this.showSwitchableCategories();\n }\n this.adjustMapZoom();\n }\n\n adjustMapZoom() {\n if (this.shouldFitBounds()) {\n this.map.fitBounds(this.bounds);\n } else {\n this.map.panTo([this.poiCollections[0].latitude, this.poiCollections[0].longitude]);\n }\n }\n\n /**\n * @returns {boolean}\n */\n shouldFitBounds() {\n if (this.getSettings().forceZoom === true) {\n return false;\n }\n\n if (this.poiCollections === null) {\n return false;\n }\n\n if (this.poiCollections.length > 1) {\n return true;\n }\n\n if (\n this.poiCollections.length === 1\n && (\n this.poiCollections[0].collectionType === \"Area\"\n || this.poiCollections[0].collectionType === \"Route\"\n )\n ) {\n return true;\n }\n\n return false;\n }\n\n setMapDimensions() {\n this.element.style.height = this.normalizeDimension(this.getSettings().mapHeight);\n this.element.style.width = this.normalizeDimension(this.getSettings().mapWidth);\n }\n\n /**\n * @param {string | number} dimension\n * @returns {string}\n */\n normalizeDimension(dimension) {\n let normalizedDimension = String(dimension);\n\n if (this.canBeInterpretedAsNumber(normalizedDimension)) {\n normalizedDimension += 'px';\n }\n\n return normalizedDimension;\n }\n\n createMap() {\n this.map = L.map(\n this.element, {\n center: [this.getExtConf().defaultLatitude, this.getExtConf().defaultLongitude],\n zoom: this.getSettings().zoom ? this.getSettings().zoom : 12,\n editable: this.editable,\n scrollWheelZoom: this.getSettings().activateScrollWheel !== \"0\"\n }\n );\n\n L.tileLayer(this.getSettings().mapTile, {\n attribution: this.getSettings().mapTileAttribution,\n maxZoom: 20\n }).addTo(this.map);\n }\n\n /**\n * @returns {{[p: string]: Category}}\n */\n groupCategories() {\n const groupedCategories = {};\n\n this.poiCollections.forEach((poiCollection) => {\n const categoryUids = poiCollection.categories.map((category) => String(category.uid));\n\n categoryUids\n .filter((categoryUid) => this.getSettings().categories.includes(categoryUid))\n .forEach((categoryUid) => {\n if (!groupedCategories.hasOwnProperty(categoryUid)) {\n groupedCategories[categoryUid] = poiCollection.categories.find((category) => String(category.uid) === categoryUid);\n }\n });\n });\n\n return groupedCategories;\n }\n\n /**\n * @param {HTMLElement} form\n * @param {boolean} isChecked\n * @returns {number[]}\n */\n getCategoriesOfCheckboxesWithStatus(form, isChecked) {\n let categories = [];\n let checkboxes = isChecked\n ? Array.from(form.querySelectorAll(\"input:checked\"))\n : Array.from(form.querySelectorAll(\"input:not(:checked)\"));\n\n checkboxes.forEach((checkbox) => {\n categories.push(parseInt((checkbox).value));\n });\n\n return categories;\n }\n\n /**\n * @param {string} categoryUid\n * @param {HTMLElement} form\n * @param { boolean} isChecked\n * @returns {*[]}\n */\n getMarkersToChangeVisibilityFor(categoryUid, form, isChecked) {\n let markers = [];\n if (this.allMarkers.length === 0) {\n return markers;\n }\n\n let marker = null;\n let allCategoriesOfMarker = null;\n let categoriesOfCheckboxesWithStatus = this.getCategoriesOfCheckboxesWithStatus(form, isChecked);\n for (let i = 0; i < this.allMarkers.length; i++) {\n marker = this.allMarkers[i];\n allCategoriesOfMarker = marker.poiCollection.categories;\n if (allCategoriesOfMarker.length === 0) {\n continue;\n }\n\n let markerCategoryHasCheckboxWithStatus;\n for (let j = 0; j < allCategoriesOfMarker.length; j++) {\n markerCategoryHasCheckboxWithStatus = false;\n for (let k = 0; k < categoriesOfCheckboxesWithStatus.length; k++) {\n if (allCategoriesOfMarker[j].uid === categoriesOfCheckboxesWithStatus[k]) {\n markerCategoryHasCheckboxWithStatus = true;\n }\n }\n if (markerCategoryHasCheckboxWithStatus === isChecked) {\n break;\n }\n }\n\n if (markerCategoryHasCheckboxWithStatus) {\n markers.push(marker.marker);\n }\n }\n\n return markers;\n }\n\n showSwitchableCategories() {\n let categories = this.groupCategories();\n let form = document.createElement(\"form\");\n form.classList.add(\"txMaps2Form\");\n form.setAttribute(\"id\", \"txMaps2Form-\" + this.getContentRecord().uid);\n\n // Add checkbox for category\n for (let categoryUid in categories) {\n if (categories.hasOwnProperty(categoryUid)) {\n form.appendChild(this.getCheckbox(categories[categoryUid]));\n form.querySelector(\"#checkCategory_\" + categoryUid)?.insertAdjacentHTML(\n \"afterend\",\n `${categories[categoryUid].title}`\n );\n }\n }\n\n // Add listener for checkboxes\n form.querySelectorAll(\"input\").forEach((checkbox) => {\n checkbox.addEventListener(\"click\", () => {\n let isChecked = (checkbox).checked;\n let categoryUid = (checkbox).value;\n let markers = this.getMarkersToChangeVisibilityFor(categoryUid, form, isChecked);\n\n markers.forEach((marker) => {\n if (isChecked) {\n this.map.addLayer(marker);\n } else {\n this.map.removeLayer(marker);\n }\n });\n });\n });\n\n this.element.insertAdjacentElement(\"afterend\", form);\n }\n\n /**\n * @param {Category} category\n * @returns {HTMLElement}\n */\n getCheckbox(category) {\n let div = document.createElement(\"div\");\n div.classList.add(\"form-group\");\n div.innerHTML = `\n
\n \n
`;\n\n return div;\n }\n\n /**\n * @param {object} obj\n * @returns {number}\n */\n countObjectProperties(obj) {\n let count = 0;\n for (let key in obj) {\n if (obj.hasOwnProperty(key)) {\n count++;\n }\n }\n return count;\n }\n\n createPointByCollectionType() {\n let marker;\n let categoryUid = 0;\n\n if (this.poiCollections !== null && this.poiCollections.length) {\n this.poiCollections.forEach(poiCollection => {\n if (poiCollection.strokeColor === \"\") {\n poiCollection.strokeColor = this.getExtConf().strokeColor;\n }\n if (poiCollection.strokeOpacity === \"\") {\n poiCollection.strokeOpacity = this.getExtConf().strokeOpacity;\n }\n if (poiCollection.strokeWeight === \"\") {\n poiCollection.strokeWeight = this.getExtConf().strokeWeight;\n }\n if (poiCollection.fillColor === \"\") {\n poiCollection.fillColor = this.getExtConf().fillColor;\n }\n if (poiCollection.fillOpacity === \"\") {\n poiCollection.fillOpacity = this.getExtConf().fillOpacity;\n }\n\n marker = null;\n switch (poiCollection.collectionType) {\n case \"Point\":\n marker = this.createMarker(poiCollection);\n break;\n case \"Area\":\n marker = this.createArea(poiCollection);\n break;\n case \"Route\":\n marker = this.createRoute(poiCollection);\n break;\n case \"Radius\":\n marker = this.createRadius(poiCollection);\n break;\n }\n\n this.allMarkers.push({\n marker: marker,\n poiCollection: poiCollection\n });\n\n categoryUid = 0;\n for (let c = 0; c < poiCollection.categories.length; c++) {\n categoryUid = poiCollection.categories[c].uid;\n if (!this.categorizedMarkers.hasOwnProperty(categoryUid)) {\n this.categorizedMarkers[categoryUid] = [];\n }\n this.categorizedMarkers[categoryUid].push(marker);\n }\n });\n }\n }\n\n /**\n * @param {number} latitude\n * @param {number} longitude\n */\n createMarkerByLatLng(latitude, longitude) {\n let marker = L.marker(\n [latitude, longitude]\n ).addTo(this.map);\n\n this.bounds.extend(marker.getLatLng());\n }\n\n /**\n * @param {PoiCollection} poiCollection\n * @returns {Marker}\n */\n createMarker(poiCollection) {\n let marker = L.marker(\n [poiCollection.latitude, poiCollection.longitude],\n {\n 'draggable': this.editable\n }\n ).addTo(this.map);\n\n if (poiCollection.hasOwnProperty(\"markerIcon\") && poiCollection.markerIcon !== \"\") {\n let icon = L.icon({\n iconUrl: poiCollection.markerIcon,\n iconSize: [poiCollection.markerIconWidth, poiCollection.markerIconHeight],\n iconAnchor: [poiCollection.markerIconAnchorPosX, poiCollection.markerIconAnchorPosY]\n });\n marker.setIcon(icon);\n }\n\n this.bounds.extend(marker.getLatLng());\n\n if (this.editable) {\n this.addEditListeners(this.element, marker, poiCollection);\n } else {\n this.addInfoWindow(marker, poiCollection);\n }\n\n return marker;\n }\n\n /**\n * @param {PoiCollection} poiCollection\n * @returns {Polygon}\n */\n createArea(poiCollection) {\n let latlngs = [];\n\n poiCollection.pois.forEach(poi => {\n let latLng = [poi.latitude, poi.longitude];\n this.bounds.extend(latLng);\n latlngs.push(latLng);\n });\n\n let marker = L.polygon(latlngs, {\n color: poiCollection.strokeColor,\n opacity: poiCollection.strokeOpacity,\n weight: poiCollection.strokeWeight,\n fillColor: poiCollection.fillColor,\n fillOpacity: poiCollection.fillOpacity\n }).addTo(this.map);\n\n this.addInfoWindow(marker, poiCollection);\n\n return marker;\n }\n\n /**\n * @param {PoiCollection} poiCollection\n * @returns {Polyline}\n */\n createRoute(poiCollection) {\n let latlngs = [];\n\n poiCollection.pois.forEach(poi => {\n let latLng = [poi.latitude, poi.longitude];\n this.bounds.extend(latLng);\n latlngs.push(latLng);\n });\n\n let marker = L.polyline(latlngs, {\n color: poiCollection.strokeColor,\n opacity: poiCollection.strokeOpacity,\n weight: poiCollection.strokeWeight,\n fillColor: poiCollection.fillColor,\n fillOpacity: poiCollection.fillOpacity\n }).addTo(this.map);\n\n this.addInfoWindow(marker, poiCollection);\n\n return marker;\n }\n\n /**\n * @param {PoiCollection} poiCollection\n * @returns {Circle}\n */\n createRadius(poiCollection) {\n let marker = L.circle([poiCollection.latitude, poiCollection.longitude], {\n color: poiCollection.strokeColor,\n opacity: poiCollection.strokeOpacity,\n weight: poiCollection.strokeWeight,\n fillColor: poiCollection.fillColor,\n fillOpacity: poiCollection.fillOpacity,\n radius: poiCollection.radius\n }).addTo(this.map);\n\n this.bounds.extend(marker.getBounds());\n\n this.addInfoWindow(marker, poiCollection);\n\n return marker;\n }\n\n /**\n * @param {HTMLElement} element\n * @param {PoiCollection} poiCollection\n */\n addInfoWindow(element, poiCollection) {\n element.addEventListener(\"click\", () => {\n fetch(this.environment.ajaxUrl, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify({\n poiCollection: poiCollection.uid\n })\n })\n .then(response => response.json())\n .then(data => {\n element.bindPopup(data.content).openPopup();\n })\n .catch(error => console.error('Error:', error));\n });\n }\n\n /**\n * @param {HTMLElement} mapContainer\n * @param {L.Marker} marker\n * @param {PoiCollection} poiCollection\n */\n addEditListeners(mapContainer, marker, poiCollection) {\n marker.on('dragend', () => {\n let lat = marker.getLatLng().lat.toFixed(6);\n let lng = marker.getLatLng().lng.toFixed(6);\n mapContainer\n .previousElementSibling\n ?.querySelector(`input.latitude-${this.getContentRecord().uid}`)\n .setAttribute(\"value\", lat);\n mapContainer\n .previousElementSibling\n ?.querySelector(`input.longitude-${this.getContentRecord().uid}`)\n .setAttribute(\"value\", lng);\n });\n\n this.map.on('click', (event) => {\n marker.setLatLng(event.latlng);\n mapContainer\n .previousElementSibling\n ?.querySelector(`input.latitude-${this.getContentRecord().uid}`)\n .setAttribute(\"value\", event.latlng.lat.toFixed(6));\n mapContainer\n .previousElementSibling\n ?.querySelector(`input.longitude-${this.getContentRecord().uid}`)\n .setAttribute(\"value\", event.latlng.lng.toFixed(6));\n });\n }\n\n /**\n * return {boolean}\n */\n canBeInterpretedAsNumber(value) {\n return typeof value === 'number' || !isNaN(Number(value));\n }\n\n /**\n * return {ContentRecord}\n */\n getContentRecord() {\n return this.environment.contentRecord;\n }\n\n /**\n * return {ExtConf}\n */\n getExtConf() {\n return this.environment.extConf;\n }\n\n /**\n * return {Settings}\n */\n getSettings() {\n return this.environment.settings;\n }\n}\n\nlet maps2OpenStreetMaps = [];\n\ndocument.querySelectorAll(\".maps2\").forEach((element) => {\n const environment = typeof element.dataset.environment !== 'undefined' ? element.dataset.environment : '{}';\n const override = typeof element.dataset.override !== 'undefined' ? element.dataset.override : '{}';\n\n // Pass in the objects to merge as arguments.\n // For a deep extend, set the first argument to `true`.\n const extend = () => {\n let extended = {};\n let deep = false;\n let i = 0;\n let length = arguments.length;\n\n // Check for deep merge\n if (Object.prototype.toString.call(arguments[0]) === '[object Boolean]') {\n deep = arguments[0];\n i++;\n }\n\n // Merge the object into the extended object\n const merge = function (obj) {\n for ( var prop in obj ) {\n if ( Object.prototype.hasOwnProperty.call( obj, prop ) ) {\n // If deep merge and property is an object, merge properties\n if ( deep && Object.prototype.toString.call(obj[prop]) === '[object Object]' ) {\n extended[prop] = extend( true, extended[prop], obj[prop] );\n } else {\n extended[prop] = obj[prop];\n }\n }\n }\n };\n\n // Loop through each object and conduct a merge\n for ( ; i < length; i++ ) {\n var obj = arguments[i];\n merge(obj);\n }\n\n return extended;\n };\n\n maps2OpenStreetMaps.push(new OpenStreetMap2(\n element,\n extend(true, JSON.parse(environment), JSON.parse(override))\n ));\n});\n"]} \ No newline at end of file +{"version":3,"sources":["OpenStreetMap2.js"],"names":["OpenStreetMap2","element","environment","editable","bounds","allMarkers","categorizedMarkers","poiCollections","map","constructor","this","classList","contains","L","LatLngBounds","preparePoiCollection","setMapDimensions","createMap","setMarkersOnMap","JSON","parse","getAttribute","isPOICollectionsEmpty","createMarkerBasedOnDataAttributes","createMarkerBasedOnPOICollections","length","latitude","getAttributeAsFloat","longitude","isNaN","createMarkerByLatLng","attributeName","parseFloat","createPointByCollectionType","countObjectProperties","showSwitchableCategories","adjustMapZoom","shouldFitBounds","fitBounds","panTo","getSettings","forceZoom","collectionType","style","height","normalizeDimension","mapHeight","width","mapWidth","dimension","let","normalizedDimension","String","canBeInterpretedAsNumber","center","getExtConf","defaultLatitude","defaultLongitude","zoom","scrollWheelZoom","activateScrollWheel","tileLayer","mapTile","attribution","mapTileAttribution","maxZoom","addTo","groupCategories","groupedCategories","forEach","poiCollection","categories","category","uid","filter","includes","categoryUid","hasOwnProperty","find","getCategoriesOfCheckboxesWithStatus","form","isChecked","Array","from","querySelectorAll","push","parseInt","value","getMarkersToChangeVisibilityFor","markers","marker","allCategoriesOfMarker","categoriesOfCheckboxesWithStatus","i","markerCategoryHasCheckboxWithStatus","j","k","document","createElement","add","setAttribute","getContentRecord","appendChild","getCheckbox","querySelector","insertAdjacentHTML","title","checkbox","addEventListener","checked","addLayer","removeLayer","insertAdjacentElement","div","innerHTML","obj","count","key","strokeColor","strokeOpacity","strokeWeight","fillColor","fillOpacity","createMarker","createArea","createRoute","createRadius","c","extend","getLatLng","icon","draggable","markerIcon","iconUrl","iconSize","markerIconWidth","markerIconHeight","iconAnchor","markerIconAnchorPosX","markerIconAnchorPosY","setIcon","addEditListeners","addInfoWindow","latlngs","pois","poi","latLng","polygon","color","opacity","weight","polyline","circle","radius","getBounds","fetch","ajaxUrl","method","headers","Content-Type","body","stringify","then","response","json","data","bindPopup","content","openPopup","catch","error","console","mapContainer","on","lat","toFixed","lng","previousElementSibling","setLatLng","event","latlng","Number","contentRecord","extConf","settings","maps2OpenStreetMaps","dataset","override","arguments","extended","deep","Object","prototype","toString","call","prop"],"mappings":"MAAAA,eACAC,QAAA,GACAC,YAAA,GACAC,SAAA,CAAA,EACAC,OAAA,GAEAC,WAAA,GACAC,mBAAA,GACAC,eAAA,GACAC,IAAA,GAEAC,YAAAR,EAAAC,GACAQ,KAAAT,QAAAA,EACAS,KAAAR,YAAAA,EACAQ,KAAAP,SAAAO,KAAAT,QAAAU,UAAAC,SAAA,YAAA,EACAF,KAAAN,OAAA,IAAAS,EAAAC,aAEAJ,KAAAK,qBAAA,EACAL,KAAAM,iBAAA,EAC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AA,KAIA,MAAA3D,EAAA,IAAA4D,aACA1I,IAAA2I,EAAA,GACAC,EAAA,CAAA,EACAjG,EAAA,EACA3C,IAAAzB,EAAAmK,UAAAnK,OAuBA,IApBA,qBAAAsK,OAAAC,UAAAC,SAAAC,KAAAN,UAAA,EAAA,IACAE,EAAAF,UAAA,GACA/F,CAAA,IAkBAA,EAAApE,EAAAoE,CAAA,GAAA,CACA,IAdAsG,EAcAhF,EAAAyE,UAAA/F,GAfAsB,GACAgF,EAAAA,KAAAA,EAeAhF,GAfA,IAAAgF,KAAAhF,EACA4E,OAAAC,UAAAnH,eAAAqH,KAAA/E,EAAAgF,CAAA,IAEAL,GAAA,oBAAAC,OAAAC,UAAAC,SAAAC,KAAA/E,EAAAgF,EAAA,EACAN,EAAAM,GAAAnE,EAAA,CAAA,EAAA6D,EAAAM,GAAAhF,EAAAgF,EAAA,EAEAN,EAAAM,GAAAhF,EAAAgF,GAUA,CAEA,OAAAN,CACA,EAEAJ,oBAAApG,KAAA,IAAArF,eACAC,EACA+H,EAAA,CAAA,EAAA7G,KAAAC,MAAAlB,CAAA,EAAAiB,KAAAC,MAAAuK,CAAA,CAAA,CACA,CAAA,CACA,CAAA","file":"OpenStreetMap2.min.js","sourcesContent":["class OpenStreetMap2 {\n element = {};\n environment = {};\n editable = false;;\n bounds = {};\n\n allMarkers = [];\n categorizedMarkers = {};\n poiCollections = [];\n map = {};\n\n constructor(element, environment) {\n this.element = element;\n this.environment = environment;\n this.editable = this.element.classList.contains(\"editMarker\");\n this.bounds = new L.LatLngBounds();\n\n this.preparePoiCollection();\n this.setMapDimensions();\n this.createMap();\n this.setMarkersOnMap();\n }\n\n preparePoiCollection() {\n this.poiCollections = JSON.parse(this.element.getAttribute(\"data-pois\") || '[]');\n }\n\n setMarkersOnMap() {\n if (this.isPOICollectionsEmpty()) {\n this.createMarkerBasedOnDataAttributes();\n } else {\n this.createMarkerBasedOnPOICollections();\n }\n }\n\n /**\n * @returns {boolean}\n */\n isPOICollectionsEmpty() {\n return this.poiCollections.length === 0;\n }\n\n createMarkerBasedOnDataAttributes() {\n const latitude = this.getAttributeAsFloat(\"data-latitude\");\n const longitude = this.getAttributeAsFloat(\"data-longitude\");\n\n if (!isNaN(latitude) && !isNaN(longitude)) {\n this.createMarkerByLatLng(latitude, longitude);\n }\n }\n\n /**\n * @param {string} attributeName\n * @returns {number}\n */\n getAttributeAsFloat(attributeName) {\n return parseFloat(this.element.getAttribute(attributeName) || \"\");\n }\n\n createMarkerBasedOnPOICollections() {\n this.createPointByCollectionType();\n if (this.countObjectProperties(this.categorizedMarkers) > 1) {\n this.showSwitchableCategories();\n }\n this.adjustMapZoom();\n }\n\n adjustMapZoom() {\n if (this.shouldFitBounds()) {\n this.map.fitBounds(this.bounds);\n } else {\n this.map.panTo([this.poiCollections[0].latitude, this.poiCollections[0].longitude]);\n }\n }\n\n /**\n * @returns {boolean}\n */\n shouldFitBounds() {\n if (this.getSettings().forceZoom === true) {\n return false;\n }\n\n if (this.poiCollections === null) {\n return false;\n }\n\n if (this.poiCollections.length > 1) {\n return true;\n }\n\n if (\n this.poiCollections.length === 1\n && (\n this.poiCollections[0].collectionType === \"Area\"\n || this.poiCollections[0].collectionType === \"Route\"\n )\n ) {\n return true;\n }\n\n return false;\n }\n\n setMapDimensions() {\n this.element.style.height = this.normalizeDimension(this.getSettings().mapHeight);\n this.element.style.width = this.normalizeDimension(this.getSettings().mapWidth);\n }\n\n /**\n * @param {string | number} dimension\n * @returns {string}\n */\n normalizeDimension(dimension) {\n let normalizedDimension = String(dimension);\n\n if (this.canBeInterpretedAsNumber(normalizedDimension)) {\n normalizedDimension += 'px';\n }\n\n return normalizedDimension;\n }\n\n createMap() {\n this.map = L.map(\n this.element, {\n center: [this.getExtConf().defaultLatitude, this.getExtConf().defaultLongitude],\n zoom: this.getSettings().zoom ? this.getSettings().zoom : 12,\n editable: this.editable,\n scrollWheelZoom: this.getSettings().activateScrollWheel !== \"0\"\n }\n );\n\n L.tileLayer(this.getSettings().mapTile, {\n attribution: this.getSettings().mapTileAttribution,\n maxZoom: 20\n }).addTo(this.map);\n }\n\n /**\n * @returns {{[p: string]: Category}}\n */\n groupCategories() {\n const groupedCategories = {};\n\n this.poiCollections.forEach((poiCollection) => {\n const categoryUids = poiCollection.categories.map((category) => String(category.uid));\n\n categoryUids\n .filter((categoryUid) => this.getSettings().categories.includes(categoryUid))\n .forEach((categoryUid) => {\n if (!groupedCategories.hasOwnProperty(categoryUid)) {\n groupedCategories[categoryUid] = poiCollection.categories.find((category) => String(category.uid) === categoryUid);\n }\n });\n });\n\n return groupedCategories;\n }\n\n /**\n * @param {HTMLElement} form\n * @param {boolean} isChecked\n * @returns {number[]}\n */\n getCategoriesOfCheckboxesWithStatus(form, isChecked) {\n let categories = [];\n let checkboxes = isChecked\n ? Array.from(form.querySelectorAll(\"input:checked\"))\n : Array.from(form.querySelectorAll(\"input:not(:checked)\"));\n\n checkboxes.forEach((checkbox) => {\n categories.push(parseInt((checkbox).value));\n });\n\n return categories;\n }\n\n /**\n * @param {string} categoryUid\n * @param {HTMLElement} form\n * @param { boolean} isChecked\n * @returns {*[]}\n */\n getMarkersToChangeVisibilityFor(categoryUid, form, isChecked) {\n let markers = [];\n if (this.allMarkers.length === 0) {\n return markers;\n }\n\n let marker = null;\n let allCategoriesOfMarker = null;\n let categoriesOfCheckboxesWithStatus = this.getCategoriesOfCheckboxesWithStatus(form, isChecked);\n for (let i = 0; i < this.allMarkers.length; i++) {\n marker = this.allMarkers[i];\n allCategoriesOfMarker = marker.poiCollection.categories;\n if (allCategoriesOfMarker.length === 0) {\n continue;\n }\n\n let markerCategoryHasCheckboxWithStatus;\n for (let j = 0; j < allCategoriesOfMarker.length; j++) {\n markerCategoryHasCheckboxWithStatus = false;\n for (let k = 0; k < categoriesOfCheckboxesWithStatus.length; k++) {\n if (allCategoriesOfMarker[j].uid === categoriesOfCheckboxesWithStatus[k]) {\n markerCategoryHasCheckboxWithStatus = true;\n }\n }\n if (markerCategoryHasCheckboxWithStatus === isChecked) {\n break;\n }\n }\n\n if (markerCategoryHasCheckboxWithStatus) {\n markers.push(marker.marker);\n }\n }\n\n return markers;\n }\n\n showSwitchableCategories() {\n let categories = this.groupCategories();\n let form = document.createElement(\"form\");\n form.classList.add(\"txMaps2Form\");\n form.setAttribute(\"id\", \"txMaps2Form-\" + this.getContentRecord().uid);\n\n // Add checkbox for category\n for (let categoryUid in categories) {\n if (categories.hasOwnProperty(categoryUid)) {\n form.appendChild(this.getCheckbox(categories[categoryUid]));\n form.querySelector(\"#checkCategory_\" + categoryUid)?.insertAdjacentHTML(\n \"afterend\",\n `${categories[categoryUid].title}`\n );\n }\n }\n\n // Add listener for checkboxes\n form.querySelectorAll(\"input\").forEach((checkbox) => {\n checkbox.addEventListener(\"click\", () => {\n let isChecked = (checkbox).checked;\n let categoryUid = (checkbox).value;\n let markers = this.getMarkersToChangeVisibilityFor(categoryUid, form, isChecked);\n\n markers.forEach((marker) => {\n if (isChecked) {\n this.map.addLayer(marker);\n } else {\n this.map.removeLayer(marker);\n }\n });\n });\n });\n\n this.element.insertAdjacentElement(\"afterend\", form);\n }\n\n /**\n * @param {Category} category\n * @returns {HTMLElement}\n */\n getCheckbox(category) {\n let div = document.createElement(\"div\");\n div.classList.add(\"form-group\");\n div.innerHTML = `\n
\n \n
`;\n\n return div;\n }\n\n /**\n * @param {object} obj\n * @returns {number}\n */\n countObjectProperties(obj) {\n let count = 0;\n for (let key in obj) {\n if (obj.hasOwnProperty(key)) {\n count++;\n }\n }\n return count;\n }\n\n createPointByCollectionType() {\n let marker;\n let categoryUid = 0;\n\n if (this.poiCollections !== null && this.poiCollections.length) {\n this.poiCollections.forEach(poiCollection => {\n if (poiCollection.strokeColor === \"\") {\n poiCollection.strokeColor = this.getExtConf().strokeColor;\n }\n if (poiCollection.strokeOpacity === \"\") {\n poiCollection.strokeOpacity = this.getExtConf().strokeOpacity;\n }\n if (poiCollection.strokeWeight === \"\") {\n poiCollection.strokeWeight = this.getExtConf().strokeWeight;\n }\n if (poiCollection.fillColor === \"\") {\n poiCollection.fillColor = this.getExtConf().fillColor;\n }\n if (poiCollection.fillOpacity === \"\") {\n poiCollection.fillOpacity = this.getExtConf().fillOpacity;\n }\n\n marker = null;\n switch (poiCollection.collectionType) {\n case \"Point\":\n marker = this.createMarker(poiCollection);\n break;\n case \"Area\":\n marker = this.createArea(poiCollection);\n break;\n case \"Route\":\n marker = this.createRoute(poiCollection);\n break;\n case \"Radius\":\n marker = this.createRadius(poiCollection);\n break;\n }\n\n this.allMarkers.push({\n marker: marker,\n poiCollection: poiCollection\n });\n\n categoryUid = 0;\n for (let c = 0; c < poiCollection.categories.length; c++) {\n categoryUid = poiCollection.categories[c].uid;\n if (!this.categorizedMarkers.hasOwnProperty(categoryUid)) {\n this.categorizedMarkers[categoryUid] = [];\n }\n this.categorizedMarkers[categoryUid].push(marker);\n }\n });\n }\n }\n\n /**\n * @param {number} latitude\n * @param {number} longitude\n */\n createMarkerByLatLng(latitude, longitude) {\n let marker = L.marker(\n [latitude, longitude]\n ).addTo(this.map);\n\n this.bounds.extend(marker.getLatLng());\n }\n\n /**\n * @param {PoiCollection} poiCollection\n * @returns {Marker}\n */\n createMarker(poiCollection) {\n let marker = L.marker(\n [poiCollection.latitude, poiCollection.longitude],\n {\n 'draggable': this.editable\n }\n ).addTo(this.map);\n\n if (poiCollection.hasOwnProperty(\"markerIcon\") && poiCollection.markerIcon !== \"\") {\n let icon = L.icon({\n iconUrl: poiCollection.markerIcon,\n iconSize: [poiCollection.markerIconWidth, poiCollection.markerIconHeight],\n iconAnchor: [poiCollection.markerIconAnchorPosX, poiCollection.markerIconAnchorPosY]\n });\n marker.setIcon(icon);\n }\n\n this.bounds.extend(marker.getLatLng());\n\n if (this.editable) {\n this.addEditListeners(this.element, marker, poiCollection);\n } else {\n this.addInfoWindow(marker, poiCollection);\n }\n\n return marker;\n }\n\n /**\n * @param {PoiCollection} poiCollection\n * @returns {Polygon}\n */\n createArea(poiCollection) {\n let latlngs = [];\n\n poiCollection.pois.forEach(poi => {\n let latLng = [poi.latitude, poi.longitude];\n this.bounds.extend(latLng);\n latlngs.push(latLng);\n });\n\n let marker = L.polygon(latlngs, {\n color: poiCollection.strokeColor,\n opacity: poiCollection.strokeOpacity,\n weight: poiCollection.strokeWeight,\n fillColor: poiCollection.fillColor,\n fillOpacity: poiCollection.fillOpacity\n }).addTo(this.map);\n\n this.addInfoWindow(marker, poiCollection);\n\n return marker;\n }\n\n /**\n * @param {PoiCollection} poiCollection\n * @returns {Polyline}\n */\n createRoute(poiCollection) {\n let latlngs = [];\n\n poiCollection.pois.forEach(poi => {\n let latLng = [poi.latitude, poi.longitude];\n this.bounds.extend(latLng);\n latlngs.push(latLng);\n });\n\n let marker = L.polyline(latlngs, {\n color: poiCollection.strokeColor,\n opacity: poiCollection.strokeOpacity,\n weight: poiCollection.strokeWeight,\n fillColor: poiCollection.fillColor,\n fillOpacity: poiCollection.fillOpacity\n }).addTo(this.map);\n\n this.addInfoWindow(marker, poiCollection);\n\n return marker;\n }\n\n /**\n * @param {PoiCollection} poiCollection\n * @returns {Circle}\n */\n createRadius(poiCollection) {\n let marker = L.circle([poiCollection.latitude, poiCollection.longitude], {\n color: poiCollection.strokeColor,\n opacity: poiCollection.strokeOpacity,\n weight: poiCollection.strokeWeight,\n fillColor: poiCollection.fillColor,\n fillOpacity: poiCollection.fillOpacity,\n radius: poiCollection.radius\n }).addTo(this.map);\n\n this.bounds.extend(marker.getBounds());\n\n this.addInfoWindow(marker, poiCollection);\n\n return marker;\n }\n\n /**\n * @param {HTMLElement} element\n * @param {PoiCollection} poiCollection\n */\n addInfoWindow(element, poiCollection) {\n element.addEventListener(\"click\", () => {\n fetch(this.environment.ajaxUrl, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify({\n poiCollection: poiCollection.uid\n })\n })\n .then(response => response.json())\n .then(data => {\n element.bindPopup(data.content).openPopup();\n })\n .catch(error => console.error('Error:', error));\n });\n }\n\n /**\n * @param {HTMLElement} mapContainer\n * @param {L.Marker} marker\n * @param {PoiCollection} poiCollection\n */\n addEditListeners(mapContainer, marker, poiCollection) {\n marker.on('dragend', () => {\n let lat = marker.getLatLng().lat.toFixed(6);\n let lng = marker.getLatLng().lng.toFixed(6);\n mapContainer\n .previousElementSibling\n ?.querySelector(`input.latitude-${this.getContentRecord().uid}`)\n .setAttribute(\"value\", lat);\n mapContainer\n .previousElementSibling\n ?.querySelector(`input.longitude-${this.getContentRecord().uid}`)\n .setAttribute(\"value\", lng);\n });\n\n this.map.on('click', (event) => {\n marker.setLatLng(event.latlng);\n mapContainer\n .previousElementSibling\n ?.querySelector(`input.latitude-${this.getContentRecord().uid}`)\n .setAttribute(\"value\", event.latlng.lat.toFixed(6));\n mapContainer\n .previousElementSibling\n ?.querySelector(`input.longitude-${this.getContentRecord().uid}`)\n .setAttribute(\"value\", event.latlng.lng.toFixed(6));\n });\n }\n\n /**\n * return {boolean}\n */\n canBeInterpretedAsNumber(value) {\n return typeof value === 'number' || !isNaN(Number(value));\n }\n\n /**\n * return {ContentRecord}\n */\n getContentRecord() {\n return this.environment.contentRecord;\n }\n\n /**\n * return {ExtConf}\n */\n getExtConf() {\n return this.environment.extConf;\n }\n\n /**\n * return {Settings}\n */\n getSettings() {\n return this.environment.settings;\n }\n}\n\nlet maps2OpenStreetMaps = [];\n\ndocument.querySelectorAll(\".maps2\").forEach((element) => {\n const environment = typeof element.dataset.environment !== 'undefined' ? element.dataset.environment : '{}';\n const override = typeof element.dataset.override !== 'undefined' ? element.dataset.override : '{}';\n\n // Pass in the objects to merge as arguments.\n // For a deep extend, set the first argument to `true`.\n const extend = (...arguments) => {\n let extended = {};\n let deep = false;\n let i = 0;\n let length = arguments.length;\n\n // Check for deep merge\n if (Object.prototype.toString.call(arguments[0]) === '[object Boolean]') {\n deep = arguments[0];\n i++;\n }\n\n // Merge the object into the extended object\n const merge = function (obj) {\n for ( var prop in obj ) {\n if ( Object.prototype.hasOwnProperty.call( obj, prop ) ) {\n // If deep merge and property is an object, merge properties\n if ( deep && Object.prototype.toString.call(obj[prop]) === '[object Object]' ) {\n extended[prop] = extend( true, extended[prop], obj[prop] );\n } else {\n extended[prop] = obj[prop];\n }\n }\n }\n };\n\n // Loop through each object and conduct a merge\n for ( ; i < length; i++ ) {\n var obj = arguments[i];\n merge(obj);\n }\n\n return extended;\n };\n\n maps2OpenStreetMaps.push(new OpenStreetMap2(\n element,\n extend(true, JSON.parse(environment), JSON.parse(override))\n ));\n});\n"]} \ No newline at end of file From f3fcd240c13918e4b018d2534e710a9abe880bdb Mon Sep 17 00:00:00 2001 From: Stefan Froemken Date: Tue, 19 Mar 2024 15:49:54 +0100 Subject: [PATCH 3/8] Use args instead of arguments, because of strict type --- Resources/Private/Build/JavaScript/GoogleMaps2.js | 10 +++++----- Resources/Private/Build/JavaScript/OpenStreetMap2.js | 10 +++++----- Resources/Public/JavaScript/GoogleMaps2.min.js | 2 +- Resources/Public/JavaScript/GoogleMaps2.min.js.map | 2 +- Resources/Public/JavaScript/OpenStreetMap2.min.js | 2 +- Resources/Public/JavaScript/OpenStreetMap2.min.js.map | 2 +- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Resources/Private/Build/JavaScript/GoogleMaps2.js b/Resources/Private/Build/JavaScript/GoogleMaps2.js index c2057b99..3523ca5b 100644 --- a/Resources/Private/Build/JavaScript/GoogleMaps2.js +++ b/Resources/Private/Build/JavaScript/GoogleMaps2.js @@ -667,15 +667,15 @@ function initMap () { // Pass in the objects to merge as arguments. // For a deep extend, set the first argument to `true`. - const extend = (...arguments) => { + const extend = (...args) => { let extended = {}; let deep = false; let i = 0; - let length = arguments.length; + let length = args.length; // Check for deep merge - if (Object.prototype.toString.call(arguments[0]) === '[object Boolean]') { - deep = arguments[0]; + if (Object.prototype.toString.call(args[0]) === '[object Boolean]') { + deep = args[0]; i++; } @@ -695,7 +695,7 @@ function initMap () { // Loop through each object and conduct a merge for ( ; i < length; i++ ) { - var obj = arguments[i]; + var obj = args[i]; merge(obj); } diff --git a/Resources/Private/Build/JavaScript/OpenStreetMap2.js b/Resources/Private/Build/JavaScript/OpenStreetMap2.js index 927ad40c..e16b5a31 100644 --- a/Resources/Private/Build/JavaScript/OpenStreetMap2.js +++ b/Resources/Private/Build/JavaScript/OpenStreetMap2.js @@ -551,15 +551,15 @@ document.querySelectorAll(".maps2").forEach((element) => { // Pass in the objects to merge as arguments. // For a deep extend, set the first argument to `true`. - const extend = (...arguments) => { + const extend = (...args) => { let extended = {}; let deep = false; let i = 0; - let length = arguments.length; + let length = args.length; // Check for deep merge - if (Object.prototype.toString.call(arguments[0]) === '[object Boolean]') { - deep = arguments[0]; + if (Object.prototype.toString.call(args[0]) === '[object Boolean]') { + deep = args[0]; i++; } @@ -579,7 +579,7 @@ document.querySelectorAll(".maps2").forEach((element) => { // Loop through each object and conduct a merge for ( ; i < length; i++ ) { - var obj = arguments[i]; + var obj = args[i]; merge(obj); } diff --git a/Resources/Public/JavaScript/GoogleMaps2.min.js b/Resources/Public/JavaScript/GoogleMaps2.min.js index c506f852..61c574cd 100644 --- a/Resources/Public/JavaScript/GoogleMaps2.min.js +++ b/Resources/Public/JavaScript/GoogleMaps2.min.js @@ -3,5 +3,5 @@ class GoogleMaps2{allMarkers=[];categorizedMarkers={};pointMarkers=[];bounds={}; - `,t}countObjectProperties=e=>{let t=0;for(var o in e)e.hasOwnProperty(o)&&t++;return t};createPointByCollectionType=(e,o)=>{let i,s=0;null!==this.poiCollections&&this.poiCollections.length&&this.poiCollections.forEach(t=>{switch(""===t.strokeColor&&(t.strokeColor=o.extConf.strokeColor),""===t.strokeOpacity&&(t.strokeOpacity=o.extConf.strokeOpacity),""===t.strokeWeight&&(t.strokeWeight=o.extConf.strokeWeight),""===t.fillColor&&(t.fillColor=o.extConf.fillColor),""===t.fillOpacity&&(t.fillOpacity=o.extConf.fillOpacity),i=null,t.collectionType){case"Point":i=this.createMarker(t,e,o);break;case"Area":i=this.createArea(t,o);break;case"Route":i=this.createRoute(t,o);break;case"Radius":i=this.createRadius(t,o)}if(null!==i){this.allMarkers.push({marker:i,poiCollection:t});for(let e=s=0;e{var i,s=new google.maps.Marker({position:new google.maps.LatLng(e.latitude,e.longitude),map:this.map});return s.setDraggable(this.editable),e.hasOwnProperty("markerIcon")&&""!==e.markerIcon&&(i={url:e.markerIcon,scaledSize:new google.maps.Size(e.markerIconWidth,e.markerIconHeight),anchor:new google.maps.Point(e.markerIconAnchorPosX,e.markerIconAnchorPosY)},s.setIcon(i)),this.pointMarkers.push(s),this.bounds.extend(s.position),this.editable?this.addEditListeners(t,s,e,o):this.addInfoWindow(s,e,o),s};createArea=(t,e)=>{var o,i=[];for(let e=0;e{var o,i=[];for(let e=0;e{var o=new google.maps.Circle(this.getCircleOptions(this.map,new google.maps.LatLng(e.latitude,e.longitude),e));return this.bounds.union(o.getBounds()),this.addInfoWindow(o,e,t),o};addInfoWindow=(t,o,i)=>{let s=this.infoWindow,r=this.map;google.maps.event.addListener(t,"click",e=>{fetch(i.ajaxUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({poiCollection:o.uid})}).then(e=>e.json()).then(e=>{s.close(),s.setContent(e.content),"Point"===o.collectionType?(s.setPosition(null),s.open(r,t)):(s.setPosition(new google.maps.LatLng(o.latitude,o.longitude)),s.open(r))}).catch(e=>console.error("Error:",e))})};inList=(e,t)=>{return(","+e+",").search(t=","+t+",")};createMarkerByLatLng=(e,t)=>{e=new google.maps.Marker({position:new google.maps.LatLng(e,t),map:this.map});this.bounds.extend(e.position)};addEditListeners=(o,i,e,s)=>{google.maps.event.addListener(i,"dragend",()=>{var e=i.getPosition().lat().toFixed(6),t=i.getPosition().lng().toFixed(6);o.prevAll("input.latitude-"+s.contentRecord.uid).val(e),o.prevAll("input.longitude-"+s.contentRecord.uid).val(t)}),google.maps.event.addListener(this.map,"click",e=>{i.setPosition(e.latLng),o.prevAll("input.latitude-"+s.contentRecord.uid).val(e.latLng.lat().toFixed(6)),o.prevAll("input.longitude-"+s.contentRecord.uid).val(e.latLng.lng().toFixed(6))})}}let maps2GoogleMaps=[];function initMap(){document.querySelectorAll(".maps2").forEach(e=>{var t=void 0!==e.dataset.environment?e.dataset.environment:"{}",o=void 0!==e.dataset.override?e.dataset.override:"{}";const n=(...arguments)=>{let e={},t=!1,o=0;var i=arguments.length;for("[object Boolean]"===Object.prototype.toString.call(arguments[0])&&(t=arguments[0],o++);o{if(13===e.keyCode)return!1}))} + `,t}countObjectProperties=e=>{let t=0;for(var o in e)e.hasOwnProperty(o)&&t++;return t};createPointByCollectionType=(e,o)=>{let i,s=0;null!==this.poiCollections&&this.poiCollections.length&&this.poiCollections.forEach(t=>{switch(""===t.strokeColor&&(t.strokeColor=o.extConf.strokeColor),""===t.strokeOpacity&&(t.strokeOpacity=o.extConf.strokeOpacity),""===t.strokeWeight&&(t.strokeWeight=o.extConf.strokeWeight),""===t.fillColor&&(t.fillColor=o.extConf.fillColor),""===t.fillOpacity&&(t.fillOpacity=o.extConf.fillOpacity),i=null,t.collectionType){case"Point":i=this.createMarker(t,e,o);break;case"Area":i=this.createArea(t,o);break;case"Route":i=this.createRoute(t,o);break;case"Radius":i=this.createRadius(t,o)}if(null!==i){this.allMarkers.push({marker:i,poiCollection:t});for(let e=s=0;e{var i,s=new google.maps.Marker({position:new google.maps.LatLng(e.latitude,e.longitude),map:this.map});return s.setDraggable(this.editable),e.hasOwnProperty("markerIcon")&&""!==e.markerIcon&&(i={url:e.markerIcon,scaledSize:new google.maps.Size(e.markerIconWidth,e.markerIconHeight),anchor:new google.maps.Point(e.markerIconAnchorPosX,e.markerIconAnchorPosY)},s.setIcon(i)),this.pointMarkers.push(s),this.bounds.extend(s.position),this.editable?this.addEditListeners(t,s,e,o):this.addInfoWindow(s,e,o),s};createArea=(t,e)=>{var o,i=[];for(let e=0;e{var o,i=[];for(let e=0;e{var o=new google.maps.Circle(this.getCircleOptions(this.map,new google.maps.LatLng(e.latitude,e.longitude),e));return this.bounds.union(o.getBounds()),this.addInfoWindow(o,e,t),o};addInfoWindow=(t,o,i)=>{let s=this.infoWindow,r=this.map;google.maps.event.addListener(t,"click",e=>{fetch(i.ajaxUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({poiCollection:o.uid})}).then(e=>e.json()).then(e=>{s.close(),s.setContent(e.content),"Point"===o.collectionType?(s.setPosition(null),s.open(r,t)):(s.setPosition(new google.maps.LatLng(o.latitude,o.longitude)),s.open(r))}).catch(e=>console.error("Error:",e))})};inList=(e,t)=>{return(","+e+",").search(t=","+t+",")};createMarkerByLatLng=(e,t)=>{e=new google.maps.Marker({position:new google.maps.LatLng(e,t),map:this.map});this.bounds.extend(e.position)};addEditListeners=(o,i,e,s)=>{google.maps.event.addListener(i,"dragend",()=>{var e=i.getPosition().lat().toFixed(6),t=i.getPosition().lng().toFixed(6);o.prevAll("input.latitude-"+s.contentRecord.uid).val(e),o.prevAll("input.longitude-"+s.contentRecord.uid).val(t)}),google.maps.event.addListener(this.map,"click",e=>{i.setPosition(e.latLng),o.prevAll("input.latitude-"+s.contentRecord.uid).val(e.latLng.lat().toFixed(6)),o.prevAll("input.longitude-"+s.contentRecord.uid).val(e.latLng.lng().toFixed(6))})}}let maps2GoogleMaps=[];function initMap(){document.querySelectorAll(".maps2").forEach(e=>{var t=void 0!==e.dataset.environment?e.dataset.environment:"{}",o=void 0!==e.dataset.override?e.dataset.override:"{}";const l=(...e)=>{let t={},o=!1,i=0;var s=e.length;for("[object Boolean]"===Object.prototype.toString.call(e[0])&&(o=e[0],i++);i{if(13===e.keyCode)return!1}))} //# sourceMappingURL=GoogleMaps2.min.js.map diff --git a/Resources/Public/JavaScript/GoogleMaps2.min.js.map b/Resources/Public/JavaScript/GoogleMaps2.min.js.map index d1c9a29c..42264e57 100644 --- a/Resources/Public/JavaScript/GoogleMaps2.min.js.map +++ b/Resources/Public/JavaScript/GoogleMaps2.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["GoogleMaps2.js"],"names":["GoogleMaps2","allMarkers","categorizedMarkers","pointMarkers","bounds","infoWindow","poiCollections","editable","map","constructor","element","environment","lat","lng","this","google","maps","LatLngBounds","InfoWindow","JSON","parse","dataset","pois","classList","contains","setMapDimensions","settings","createMap","Number","latitude","longitude","createMarkerByLatLng","setCenter","LatLng","extConf","defaultLatitude","defaultLongitude","createPointByCollectionType","markerClusterer","enable","MarkerClusterer","imagePath","countObjectProperties","showSwitchableCategories","shouldFitBounds","fitBounds","getMapOptions","let","mapOptions","mapTypeId","zoom","parseInt","zoomControl","mapTypeControl","scaleControl","streetViewControl","fullscreenControl","fullScreenControl","scrollwheel","activateScrollWheel","styles","eval","MapTypeId","HYBRID","ROADMAP","SATELLITE","TERRAIN","getCircleOptions","centerPosition","poiCollection","center","radius","strokeColor","strokeOpacity","strokeWeight","fillColor","fillOpacity","getPolygonOptions","paths","getPolylineOptions","path","Map","canBeInterpretedAsNumber","value","isNaN","normalizeDimension","dimension","normalizedDimension","String","forceZoom","length","collectionType","style","height","mapHeight","width","mapWidth","groupCategories","categoryUid","groupedCategories","x","y","categories","uid","inList","hasOwnProperty","getCategoriesOfCheckboxesWithStatus","form","isChecked","querySelectorAll","forEach","checkbox","push","getMarkersToChangeVisibilityFor","markers","marker","allCategoriesOfMarker","categoriesOfCheckboxesWithStatus","i","markerCategoryHasCheckboxWithStatus","j","k","document","createElement","add","setAttribute","contentRecord","appendChild","getCheckbox","querySelector","insertAdjacentHTML","title","addEventListener","checked","setVisible","insertAdjacentElement","category","div","innerHTML","obj","count","key","createMarker","createArea","createRoute","createRadius","c","relatedCategories","icon","Marker","position","setDraggable","markerIcon","url","scaledSize","Size","markerIconWidth","markerIconHeight","anchor","Point","markerIconAnchorPosX","markerIconAnchorPosY","setIcon","extend","addEditListeners","addInfoWindow","latLng","mapPosition","area","Polygon","setMap","route","Polyline","circle","Circle","union","getBounds","event","addListener","fetch","ajaxUrl","method","headers","Content-Type","body","stringify","then","response","json","data","close","setContent","content","setPosition","open","catch","error","console","list","item","search","mapContainer","getPosition","toFixed","prevAll","val","maps2GoogleMaps","initMap","override","arguments","extended","deep","Object","prototype","toString","call","prop","address","places","Autocomplete","fields","keyCode"],"mappings":"MAAAA,YACAC,WAAA,GACAC,mBAAA,GACAC,aAAA,GACAC,OAAA,GACAC,WAAA,GACAC,eAAA,GACAC,SAAA,GACAC,IAAA,GAOAC,YAAAC,EAAAC,GAaA,IAEAC,EACAC,EAfAC,KAAAb,WAAA,GACAa,KAAAZ,mBAAA,GACAY,KAAAX,aAAA,GACAW,KAAAV,OAAA,IAAAW,OAAAC,KAAAC,aACAH,KAAAT,WAAA,IAAAU,OAAAC,KAAAE,WACAJ,KAAAR,eAAAa,KAAAC,MAAAV,EAAAW,QAAAC,MAAA,MAAA,EACAR,KAAAP,SAAAG,EAAAa,UAAAC,SAAA,YAAA,EAEAV,KAAAW,iBAAAf,EAAAC,EAAAe,QAAA,EAEAZ,KAAAa,UAAAjB,EAAAC,CAAA,EAEA,KAAA,IAAAG,KAAAR,gBAAA,OAAAQ,KAAAR,gBAEAM,EAAAgB,OAAAlB,EAAAW,QAAAQ,QAAA,EACAhB,EAAAe,OAAAlB,EAAAW,QAAAS,SAAA,EACAlB,GAAAC,GACAC,KAAAiB,qBAAAnB,EAAAC,CAAA,EACAC,KAAAN,IAAAwB,UAAA,IAAAjB,OAAAC,KAAAiB,OAAArB,EAAAC,CAAA,CAAA,GAGAC,KAAAN,IAAAwB,UAAA,IAAAjB,OAAAC,KAAAiB,OAAAtB,EAAAuB,QAAAC,gBAAAxB,EAAAuB,QAAAE,gBAAA,CAAA,IAIAtB,KAAAuB,4BAAA3B,EAAAC,CAAA,EAEA,KAAA,IAAAA,EAAAe,SAAAY,iBACA,IAAA3B,EAAAe,SAAAY,gBAAAC,QAEA,IAAAC,gBACA1B,KAAAN,IACAM,KAAAX,aACA,CAAAsC,UAAA9B,EAAAe,SAAAY,gBAAAG,SAAA,CACA,EAGA,EAAA3B,KAAA4B,sBAAA5B,KAAAZ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A,qBAAA0H,OAAAC,UAAAC,SAAAC,KAAAN,UAAA,EAAA,IACAE,EAAAF,UAAA,GACA3F,CAAA,IAkBAA,EAAA5B,EAAA4B,CAAA,GAAA,CACA,IAdAkG,EAcA7E,EAAAsE,UAAA3F,GAfAqB,GACA6E,EAAAA,KAAAA,EAeA7E,GAfA,IAAA6E,KAAA7E,EACAyE,OAAAC,UAAA5G,eAAA8G,KAAA5E,EAAA6E,CAAA,IAEAL,GAAA,oBAAAC,OAAAC,UAAAC,SAAAC,KAAA5E,EAAA6E,EAAA,EACAN,EAAAM,GAAArD,EAAA,CAAA,EAAA+C,EAAAM,GAAA7E,EAAA6E,EAAA,EAEAN,EAAAM,GAAA7E,EAAA6E,GAUA,CAEA,OAAAN,CACA,EAEAJ,gBAAA9F,KAAA,IAAAhH,YACAU,EACAyJ,EAAAhJ,KAAAC,MAAAT,CAAA,EAAAQ,KAAAC,MAAA4L,CAAA,CAAA,CACA,CAAA,CACA,CAAA,EAGAjK,IAAA0K,EAAA/F,SAAAO,cAAA,eAAA,EACA1D,EAAAmD,SAAAO,cAAA,cAAA,EACA,OAAAwF,GAAA,OAAAlJ,IACA,IAAAxD,OAAAC,KAAA0M,OAAAC,aAAAF,EAAA,CACAG,OAAA,CACA,WAEA,CAAA,EAEAH,EAAArF,iBAAA,UAAA6C,IACA,GAAA,KAAAA,EAAA4C,QAAA,MAAA,CAAA,CACA,CAAA,EAEA","file":"GoogleMaps2.min.js","sourcesContent":["class GoogleMaps2 {\n allMarkers = [];\n categorizedMarkers = {};\n pointMarkers = [];\n bounds = {};\n infoWindow = {};\n poiCollections = {};\n editable = {};\n map = {};\n\n /**\n * @param {HTMLElement} element\n * @param {Environment} environment\n * @constructor\n */\n constructor (element, environment) {\n this.allMarkers = [];\n this.categorizedMarkers = {};\n this.pointMarkers = [];\n this.bounds = new google.maps.LatLngBounds();\n this.infoWindow = new google.maps.InfoWindow();\n this.poiCollections = JSON.parse(element.dataset.pois || \"null\");\n this.editable = element.classList.contains('editMarker');\n\n this.setMapDimensions(element, environment.settings);\n\n this.createMap(element, environment);\n\n if (typeof this.poiCollections === 'undefined' || this.poiCollections === null) {\n // Plugin: CityMap\n let lat = Number(element.dataset.latitude);\n let lng = Number(element.dataset.longitude);\n if (lat && lng) {\n this.createMarkerByLatLng(lat, lng);\n this.map.setCenter(new google.maps.LatLng(lat, lng));\n } else {\n // Fallback\n this.map.setCenter(new google.maps.LatLng(environment.extConf.defaultLatitude, environment.extConf.defaultLongitude));\n }\n } else {\n // normal case\n this.createPointByCollectionType(element, environment);\n if (\n typeof environment.settings.markerClusterer !== 'undefined'\n && environment.settings.markerClusterer.enable === 1\n ) {\n new MarkerClusterer(\n this.map,\n this.pointMarkers,\n { imagePath: environment.settings.markerClusterer.imagePath }\n );\n }\n\n if (this.countObjectProperties(this.categorizedMarkers) > 1) {\n this.showSwitchableCategories(element, environment);\n }\n\n if (this.shouldFitBounds(environment.settings)) {\n this.map.fitBounds(this.bounds);\n } else {\n this.map.setCenter(new google.maps.LatLng(this.poiCollections[0].latitude, this.poiCollections[0].longitude));\n }\n }\n }\n\n /**\n * Return a MapOptions object which can be assigned to the Map object of Google\n *\n * @param {Settings} settings\n * @return {object}\n */\n getMapOptions = settings => {\n let mapOptions = {\n mapTypeId: '',\n zoom: parseInt(settings.zoom),\n zoomControl: (parseInt(settings.zoomControl) !== 0),\n mapTypeControl: (parseInt(settings.mapTypeControl) !== 0),\n scaleControl: (parseInt(settings.scaleControl) !== 0),\n streetViewControl: (parseInt(settings.streetViewControl) !== 0),\n fullscreenControl: (parseInt(settings.fullScreenControl) !== 0),\n scrollwheel: settings.activateScrollWheel,\n styles: ''\n };\n\n if (settings.styles) {\n mapOptions.styles = eval(settings.styles);\n }\n\n switch (settings.mapTypeId) {\n case 'google.maps.MapTypeId.HYBRID':\n case 'hybrid':\n mapOptions.mapTypeId = google.maps.MapTypeId.HYBRID;\n break;\n case 'google.maps.MapTypeId.ROADMAP':\n case 'roadmap':\n mapOptions.mapTypeId = google.maps.MapTypeId.ROADMAP;\n break;\n case 'google.maps.MapTypeId.SATELLITE':\n case 'satellite':\n mapOptions.mapTypeId = google.maps.MapTypeId.SATELLITE;\n break;\n case 'google.maps.MapTypeId.TERRAIN':\n case 'terrain':\n mapOptions.mapTypeId = google.maps.MapTypeId.TERRAIN;\n break;\n }\n\n return mapOptions;\n }\n\n /**\n * Returns CircleOptions which can be assigned to the Circle object of Google\n *\n * @param {L.Map} map\n * @param {object} centerPosition\n * @param {PoiCollection} poiCollection\n * @return {object}\n */\n getCircleOptions (map, centerPosition, poiCollection) {\n return {\n map: map,\n center: centerPosition,\n radius: poiCollection.radius,\n strokeColor: poiCollection.strokeColor,\n strokeOpacity: poiCollection.strokeOpacity,\n strokeWeight: poiCollection.strokeWeight,\n fillColor: poiCollection.fillColor,\n fillOpacity: poiCollection.fillOpacity\n };\n }\n\n /**\n * Returns PolygonOptions which can be assigned to the Polygon object of Google\n *\n * @param {object} paths\n * @param {PoiCollection} poiCollection\n * @return {object}\n */\n getPolygonOptions (paths, poiCollection) {\n return {\n paths: paths,\n strokeColor: poiCollection.strokeColor,\n strokeOpacity: poiCollection.strokeOpacity,\n strokeWeight: poiCollection.strokeWeight,\n fillColor: poiCollection.fillColor,\n fillOpacity: poiCollection.fillOpacity\n };\n }\n\n /**\n * Return PolylineOptions which can be assigned to the Polyline object of Google\n *\n * @param {object} paths\n * @param {PoiCollection} poiCollection\n * @return {object}\n */\n getPolylineOptions (paths, poiCollection) {\n return {\n path: paths,\n strokeColor: poiCollection.strokeColor,\n strokeOpacity: poiCollection.strokeOpacity,\n strokeWeight: poiCollection.strokeWeight,\n };\n }\n\n /**\n * Create Map\n *\n * @param {HTMLElement} element\n * @param {Environment} environment\n */\n createMap (element, environment) {\n this.map = new google.maps.Map(\n element,\n this.getMapOptions(environment.settings)\n );\n }\n\n /**\n * @param {string | number} value\n * @return {boolean}\n */\n canBeInterpretedAsNumber(value) {\n return typeof value === 'number' || !isNaN(Number(value));\n }\n\n /**\n * @param {string | number} dimension\n * @returns {string}\n */\n normalizeDimension(dimension) {\n let normalizedDimension = String(dimension);\n\n if (this.canBeInterpretedAsNumber(normalizedDimension)) {\n normalizedDimension += 'px';\n }\n\n return normalizedDimension;\n }\n\n /**\n * @param {Settings} settings\n * @returns {boolean}\n */\n shouldFitBounds(settings) {\n if (settings.forceZoom === true) {\n return false;\n }\n\n if (this.poiCollections === null) {\n return false;\n }\n\n if (this.poiCollections.length > 1) {\n return true;\n }\n\n if (\n this.poiCollections.length === 1\n && (\n this.poiCollections[0].collectionType === \"Area\"\n || this.poiCollections[0].collectionType === \"Route\"\n )\n ) {\n return true;\n }\n\n return false;\n }\n\n /**\n * @param {HTMLElement} element\n * @param {Settings} settings\n */\n setMapDimensions(element, settings) {\n element.style.height = this.normalizeDimension(settings.mapHeight);\n element.style.width = this.normalizeDimension(settings.mapWidth);\n }\n\n /**\n * Group Categories\n *\n * @param {Environment} environment\n */\n groupCategories = environment => {\n let groupedCategories = {};\n let categoryUid = \"0\";\n for (let x = 0; x < this.poiCollections.length; x++) {\n for (let y = 0; y < this.poiCollections[x].categories.length; y++) {\n categoryUid = String(this.poiCollections[x].categories[y].uid);\n if (this.inList(environment.settings.categories, categoryUid) > -1 && !groupedCategories.hasOwnProperty(categoryUid)) {\n groupedCategories[categoryUid] = this.poiCollections[x].categories[y];\n }\n }\n }\n\n return groupedCategories;\n };\n\n /**\n * Get categories of all checkboxes with a given status\n *\n * @param {HTMLElement} form The HTML form element containing the checkboxes\n * @param {boolean} isChecked Get checkboxes of this status only\n */\n getCategoriesOfCheckboxesWithStatus = (form, isChecked) => {\n let categories = [];\n let checkboxes = isChecked ? form.querySelectorAll(\"input:checked\") : form.querySelectorAll(\"input:not(input:checked)\");\n\n checkboxes.forEach(checkbox => {\n categories.push(parseInt(checkbox.value));\n });\n\n return categories;\n }\n\n getMarkersToChangeVisibilityFor = (categoryUid, form, isChecked) => {\n let markers = [];\n if (this.allMarkers.length === 0) {\n return markers;\n }\n\n let marker = null;\n let allCategoriesOfMarker = null;\n let categoriesOfCheckboxesWithStatus = this.getCategoriesOfCheckboxesWithStatus(form, isChecked);\n for (let i = 0; i < this.allMarkers.length; i++) {\n marker = this.allMarkers[i];\n allCategoriesOfMarker = marker.poiCollection.categories;\n if (allCategoriesOfMarker.length === 0) {\n continue;\n }\n\n let markerCategoryHasCheckboxWithStatus;\n for (let j = 0; j < allCategoriesOfMarker.length; j++) {\n markerCategoryHasCheckboxWithStatus = false;\n for (let k = 0; k < categoriesOfCheckboxesWithStatus.length; k++) {\n if (allCategoriesOfMarker[j].uid === categoriesOfCheckboxesWithStatus[k]) {\n markerCategoryHasCheckboxWithStatus = true;\n }\n }\n if (markerCategoryHasCheckboxWithStatus === isChecked) {\n break;\n }\n }\n\n if (markerCategoryHasCheckboxWithStatus) {\n markers.push(marker.marker);\n }\n }\n\n return markers;\n }\n\n /**\n * Show switchable categories\n *\n * @param {HTMLElement} element\n * @param {Environment} environment\n */\n showSwitchableCategories = (element, environment) => {\n let categories = this.groupCategories(environment);\n let form = document.createElement(\"form\");\n let span = {};\n\n form.classList.add(\"txMaps2Form\");\n form.setAttribute(\"id\", \"txMaps2Form-\" + environment.contentRecord.uid);\n\n // Add checkbox for category\n for (let categoryUid in categories) {\n if (categories.hasOwnProperty(categoryUid)) {\n form.appendChild(this.getCheckbox(categories[categoryUid]));\n form.querySelector(\"#checkCategory_\" + categoryUid)?.insertAdjacentHTML(\n \"afterend\",\n `${categories[categoryUid].title}`\n );\n }\n }\n\n // Add listener for checkboxes\n form.querySelectorAll(\"input\").forEach((checkbox) => {\n checkbox.addEventListener(\"click\", () => {\n let isChecked = (checkbox).checked;\n let categoryUid = (checkbox).value;\n let markers = this.getMarkersToChangeVisibilityFor(categoryUid, form, isChecked);\n\n markers.forEach((marker) => {\n marker.setVisible(isChecked);\n });\n });\n });\n\n element.insertAdjacentElement(\"afterend\", form);\n }\n\n /**\n * Get Checkbox for Category\n *\n * @param category\n */\n getCheckbox(category) {\n let div = document.createElement(\"div\");\n div.classList.add(\"form-group\");\n div.innerHTML = `\n
\n \n
`;\n\n return div;\n }\n\n /**\n * Count Object properties\n *\n * @param obj\n */\n countObjectProperties = obj => {\n let count = 0;\n for (let key in obj) {\n if (obj.hasOwnProperty(key)) {\n count++;\n }\n }\n return count;\n }\n\n /**\n * Create Point by CollectionType\n *\n * @param {HTMLElement} element\n * @param {Environment} environment\n */\n createPointByCollectionType = (element, environment) => {\n let marker;\n let categoryUid = 0;\n\n if (this.poiCollections !== null && this.poiCollections.length) {\n this.poiCollections.forEach(poiCollection => {\n if (poiCollection.strokeColor === \"\") {\n poiCollection.strokeColor = environment.extConf.strokeColor;\n }\n if (poiCollection.strokeOpacity === \"\") {\n poiCollection.strokeOpacity = environment.extConf.strokeOpacity;\n }\n if (poiCollection.strokeWeight === \"\") {\n poiCollection.strokeWeight = environment.extConf.strokeWeight;\n }\n if (poiCollection.fillColor === \"\") {\n poiCollection.fillColor = environment.extConf.fillColor;\n }\n if (poiCollection.fillOpacity === \"\") {\n poiCollection.fillOpacity = environment.extConf.fillOpacity;\n }\n\n marker = null;\n switch (poiCollection.collectionType) {\n case \"Point\":\n marker = this.createMarker(poiCollection, element, environment);\n break;\n case \"Area\":\n marker = this.createArea(poiCollection, environment);\n break;\n case \"Route\":\n marker = this.createRoute(poiCollection, environment);\n break;\n case \"Radius\":\n marker = this.createRadius(poiCollection, environment);\n break;\n }\n\n if (marker !== null) {\n this.allMarkers.push({\n marker: marker,\n poiCollection: poiCollection\n });\n\n categoryUid = 0;\n for (let c = 0; c < poiCollection.categories.length; c++) {\n categoryUid = poiCollection.categories[c].uid;\n if (!this.categorizedMarkers.hasOwnProperty(categoryUid)) {\n this.categorizedMarkers[categoryUid] = [];\n }\n this.categorizedMarkers[categoryUid].push({\n marker: marker,\n relatedCategories: poiCollection.categories\n });\n }\n }\n });\n }\n }\n\n /**\n * Create Marker with InfoWindow\n *\n * @param {PoiCollection} poiCollection\n * @param {HTMLElement} element\n * @param {Environment} environment\n */\n createMarker = (poiCollection, element, environment) => {\n let categoryUid = \"0\";\n let marker = new google.maps.Marker({\n position: new google.maps.LatLng(poiCollection.latitude, poiCollection.longitude),\n map: this.map\n });\n marker.setDraggable(this.editable);\n\n // assign first found marker icon, if available\n if (poiCollection.hasOwnProperty(\"markerIcon\") && poiCollection.markerIcon !== \"\") {\n let icon = {\n url: poiCollection.markerIcon,\n scaledSize: new google.maps.Size(poiCollection.markerIconWidth, poiCollection.markerIconHeight),\n anchor: new google.maps.Point(poiCollection.markerIconAnchorPosX, poiCollection.markerIconAnchorPosY)\n };\n marker.setIcon(icon);\n }\n\n this.pointMarkers.push(marker);\n this.bounds.extend(marker.position);\n\n if (this.editable) {\n this.addEditListeners(element, marker, poiCollection, environment);\n } else {\n this.addInfoWindow(marker, poiCollection, environment);\n }\n\n return marker;\n }\n\n /**\n * Create Area\n *\n * @param poiCollection\n * @param environment\n */\n createArea = (poiCollection, environment) => {\n let latLng;\n let paths = [];\n for (let i = 0; i < poiCollection.pois.length; i++) {\n latLng = new google.maps.LatLng(poiCollection.pois[i].latitude, poiCollection.pois[i].longitude);\n this.bounds.extend(latLng);\n paths.push(latLng);\n }\n\n if (paths.length === 0) {\n paths.push(this.mapPosition);\n }\n\n let area = new google.maps.Polygon(this.getPolygonOptions(paths, poiCollection));\n area.setMap(this.map);\n this.addInfoWindow(area, poiCollection, environment);\n\n return area;\n }\n\n /**\n * Create Route\n *\n * @param poiCollection\n * @param environment\n */\n createRoute = (poiCollection, environment) => {\n let latLng;\n let paths = [];\n for (let i = 0; i < poiCollection.pois.length; i++) {\n latLng = new google.maps.LatLng(poiCollection.pois[i].latitude, poiCollection.pois[i].longitude);\n this.bounds.extend(latLng);\n paths.push(latLng);\n }\n\n if (paths.length === 0) {\n paths.push(this.mapPosition);\n }\n\n let route = new google.maps.Polyline(this.getPolylineOptions(paths, poiCollection));\n route.setMap(this.map);\n this.addInfoWindow(route, poiCollection, environment);\n\n return route;\n }\n\n /**\n * Create Radius\n *\n * @param poiCollection\n * @param environment\n */\n createRadius = (poiCollection, environment) => {\n let circle = new google.maps.Circle(\n this.getCircleOptions(\n this.map,\n new google.maps.LatLng(poiCollection.latitude, poiCollection.longitude),\n poiCollection\n )\n );\n\n this.bounds.union(circle.getBounds());\n this.addInfoWindow(circle, poiCollection, environment);\n\n return circle;\n }\n\n /**\n * Add Info Window to element\n *\n * @param element\n * @param poiCollection\n * @param environment\n */\n addInfoWindow = (element, poiCollection, environment) => {\n // we need these both vars to be set global. So that we can access them in Listener\n let infoWindow = this.infoWindow;\n let map = this.map;\n google.maps.event.addListener(element, \"click\", event => {\n fetch(environment.ajaxUrl, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify({\n poiCollection: poiCollection.uid\n })\n })\n .then(response => response.json())\n .then(data => {\n infoWindow.close();\n infoWindow.setContent(data.content);\n\n // Do not set pointer of InfoWindow to the same pointer of the POI icon.\n // In case of Point the pointer of InfoWindow should be at mouse position.\n if (poiCollection.collectionType === \"Point\") {\n infoWindow.setPosition(null);\n infoWindow.open(map, element);\n } else {\n infoWindow.setPosition(new google.maps.LatLng(poiCollection.latitude, poiCollection.longitude));\n infoWindow.open(map);\n }\n })\n .catch(error => console.error('Error:', error));\n });\n }\n\n /**\n * Check for item in list\n * Check if an item exists in a comma-separated list of items.\n *\n * @param list\n * @param item\n */\n inList = (list, item) => {\n let catSearch = ',' + list + ',';\n item = ',' + item + ',';\n return catSearch.search(item);\n };\n\n /**\n * Create Marker with InfoWindow\n *\n * @param latitude\n * @param longitude\n */\n createMarkerByLatLng = (latitude, longitude) => {\n let marker = new google.maps.Marker({\n position: new google.maps.LatLng(latitude, longitude),\n map: this.map\n });\n this.bounds.extend(marker.position);\n };\n\n /**\n * Add Edit Listeners\n * This will only work for Markers (Point)\n *\n * @param mapContainer\n * @param marker\n * @param poiCollection\n * @param environment\n */\n addEditListeners = (mapContainer, marker, poiCollection, environment) => {\n // update fields and marker while dragging\n google.maps.event.addListener(marker, 'dragend', () => {\n let lat = marker.getPosition().lat().toFixed(6);\n let lng = marker.getPosition().lng().toFixed(6);\n mapContainer.prevAll(\"input.latitude-\" + environment.contentRecord.uid).val(lat);\n mapContainer.prevAll(\"input.longitude-\" + environment.contentRecord.uid).val(lng);\n });\n\n // update fields and marker when clicking on the map\n google.maps.event.addListener(this.map, 'click', event => {\n marker.setPosition(event.latLng);\n mapContainer.prevAll(\"input.latitude-\" + environment.contentRecord.uid).val(event.latLng.lat().toFixed(6));\n mapContainer.prevAll(\"input.longitude-\" + environment.contentRecord.uid).val(event.latLng.lng().toFixed(6));\n });\n };\n}\n\nlet maps2GoogleMaps = [];\n\n/**\n * This function will be called by the &callback argument of the Google Maps API library\n */\nfunction initMap () {\n document.querySelectorAll(\".maps2\").forEach(element => {\n const environment = typeof element.dataset.environment !== 'undefined' ? element.dataset.environment : '{}';\n const override = typeof element.dataset.override !== 'undefined' ? element.dataset.override : '{}';\n\n // Pass in the objects to merge as arguments.\n // For a deep extend, set the first argument to `true`.\n const extend = (...arguments) => {\n let extended = {};\n let deep = false;\n let i = 0;\n let length = arguments.length;\n\n // Check for deep merge\n if (Object.prototype.toString.call(arguments[0]) === '[object Boolean]') {\n deep = arguments[0];\n i++;\n }\n\n // Merge the object into the extended object\n const merge = function (obj) {\n for ( var prop in obj ) {\n if ( Object.prototype.hasOwnProperty.call( obj, prop ) ) {\n // If deep merge and property is an object, merge properties\n if ( deep && Object.prototype.toString.call(obj[prop]) === '[object Object]' ) {\n extended[prop] = extend( true, extended[prop], obj[prop] );\n } else {\n extended[prop] = obj[prop];\n }\n }\n }\n };\n\n // Loop through each object and conduct a merge\n for ( ; i < length; i++ ) {\n var obj = arguments[i];\n merge(obj);\n }\n\n return extended;\n };\n\n maps2GoogleMaps.push(new GoogleMaps2(\n element,\n extend(JSON.parse(environment), JSON.parse(override))\n ));\n });\n\n // Initialize radius search\n let address = document.querySelector('#maps2Address');\n let radius = document.querySelector('#maps2Radius');\n if (address !== null && radius !== null) {\n let autocomplete = new google.maps.places.Autocomplete(address, {\n fields: [\n \"place_id\"\n ]\n });\n\n address.addEventListener(\"keydown\", event => {\n if (event.keyCode === 13) return false;\n });\n }\n}\n"]} \ No newline at end of file +{"version":3,"sources":["GoogleMaps2.js"],"names":["GoogleMaps2","allMarkers","categorizedMarkers","pointMarkers","bounds","infoWindow","poiCollections","editable","map","constructor","element","environment","lat","lng","this","google","maps","LatLngBounds","InfoWindow","JSON","parse","dataset","pois","classList","contains","setMapDimensions","settings","createMap","Number","latitude","longitude","createMarkerByLatLng","setCenter","LatLng","extConf","defaultLatitude","defaultLongitude","createPointByCollectionType","markerClusterer","enable","MarkerClusterer","imagePath","countObjectProperties","showSwitchableCategories","shouldFitBounds","fitBounds","getMapOptions","let","mapOptions","mapTypeId","zoom","parseInt","zoomControl","mapTypeControl","scaleControl","streetViewControl","fullscreenControl","fullScreenControl","scrollwheel","activateScrollWheel","styles","eval","MapTypeId","HYBRID","ROADMAP","SATELLITE","TERRAIN","getCircleOptions","centerPosition","poiCollection","center","radius","strokeColor","strokeOpacity","strokeWeight","fillColor","fillOpacity","getPolygonOptions","paths","getPolylineOptions","path","Map","canBeInterpretedAsNumber","value","isNaN","normalizeDimension","dimension","normalizedDimension","String","forceZoom","length","collectionType","style","height","mapHeight","width","mapWidth","groupCategories","categoryUid","groupedCategories","x","y","categories","uid","inList","hasOwnProperty","getCategoriesOfCheckboxesWithStatus","form","isChecked","querySelectorAll","forEach","checkbox","push","getMarkersToChangeVisibilityFor","markers","marker","allCategoriesOfMarker","categoriesOfCheckboxesWithStatus","i","markerCategoryHasCheckboxWithStatus","j","k","document","createElement","add","setAttribute","contentRecord","appendChild","getCheckbox","querySelector","insertAdjacentHTML","title","addEventListener","checked","setVisible","insertAdjacentElement","category","div","innerHTML","obj","count","key","createMarker","createArea","createRoute","createRadius","c","relatedCategories","icon","Marker","position","setDraggable","markerIcon","url","scaledSize","Size","markerIconWidth","markerIconHeight","anchor","Point","markerIconAnchorPosX","markerIconAnchorPosY","setIcon","extend","addEditListeners","addInfoWindow","latLng","mapPosition","area","Polygon","setMap","route","Polyline","circle","Circle","union","getBounds","event","addListener","fetch","ajaxUrl","method","headers","Content-Type","body","stringify","then","response","json","data","close","setContent","content","setPosition","open","catch","error","console","list","item","search","mapContainer","getPosition","toFixed","prevAll","val","maps2GoogleMaps","initMap","override","args","extended","deep","Object","prototype","toString","call","prop","address","places","Autocomplete","fields","keyCode"],"mappings":"MAAAA,YACAC,WAAA,GACAC,mBAAA,GACAC,aAAA,GACAC,OAAA,GACAC,WAAA,GACAC,eAAA,GACAC,SAAA,GACAC,IAAA,GAOAC,YAAAC,EAAAC,GAaA,IAEAC,EACAC,EAfAC,KAAAb,WAAA,GACAa,KAAAZ,mBAAA,GACAY,KAAAX,aAAA,GACAW,KAAAV,OAAA,IAAAW,OAAAC,KAAAC,aACAH,KAAAT,WAAA,IAAAU,OAAAC,KAAAE,WACAJ,KAAAR,eAAAa,KAAAC,MAAAV,EAAAW,QAAAC,MAAA,MAAA,EACAR,KAAAP,SAAAG,EAAAa,UAAAC,SAAA,YAAA,EAEAV,KAAAW,iBAAAf,EAAAC,EAAAe,QAAA,EAEAZ,KAAAa,UAAAjB,EAAAC,CAAA,EAEA,KAAA,IAAAG,KAAAR,gBAAA,OAAAQ,KAAAR,gBAEAM,EAAAgB,OAAAlB,EAAAW,QAAAQ,QAAA,EACAhB,EAAAe,OAAAlB,EAAAW,QAAAS,SAAA,EACAlB,GAAAC,GACAC,KAAAiB,qBAAAnB,EAAAC,CAAA,EACAC,KAAAN,IAAAwB,UAAA,IAAAjB,OAAAC,KAAAiB,OAAArB,EAAAC,CAAA,CAAA,GAGAC,KAAAN,IAAAwB,UAAA,IAAAjB,OAAAC,KAAAiB,OAAAtB,EAAAuB,QAAAC,gBAAAxB,EAAAuB,QAAAE,gBAAA,CAAA,IAIAtB,KAAAuB,4BAAA3B,EAAAC,CAAA,EAEA,KAAA,IAAAA,EAAAe,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A,IAAAtM,EAAAW,QAAA2L,SAAAtM,EAAAW,QAAA2L,SAAA,KAIA,MAAA7C,EAAA,IAAA8C,KACAlK,IAAAmK,EAAA,GACAC,EAAA,CAAA,EACA7F,EAAA,EACAvE,IAAA2C,EAAAuH,EAAAvH,OAuBA,IApBA,qBAAA0H,OAAAC,UAAAC,SAAAC,KAAAN,EAAA,EAAA,IACAE,EAAAF,EAAA,GACA3F,CAAA,IAkBAA,EAAA5B,EAAA4B,CAAA,GAAA,CACA,IAdAkG,EAcA7E,EAAAsE,EAAA3F,GAfAqB,GACA6E,EAAAA,KAAAA,EAeA7E,GAfA,IAAA6E,KAAA7E,EACAyE,OAAAC,UAAA5G,eAAA8G,KAAA5E,EAAA6E,CAAA,IAEAL,GAAA,oBAAAC,OAAAC,UAAAC,SAAAC,KAAA5E,EAAA6E,EAAA,EACAN,EAAAM,GAAArD,EAAA,CAAA,EAAA+C,EAAAM,GAAA7E,EAAA6E,EAAA,EAEAN,EAAAM,GAAA7E,EAAA6E,GAUA,CAEA,OAAAN,CACA,EAEAJ,gBAAA9F,KAAA,IAAAhH,YACAU,EACAyJ,EAAAhJ,KAAAC,MAAAT,CAAA,EAAAQ,KAAAC,MAAA4L,CAAA,CAAA,CACA,CAAA,CACA,CAAA,EAGAjK,IAAA0K,EAAA/F,SAAAO,cAAA,eAAA,EACA1D,EAAAmD,SAAAO,cAAA,cAAA,EACA,OAAAwF,GAAA,OAAAlJ,IACA,IAAAxD,OAAAC,KAAA0M,OAAAC,aAAAF,EAAA,CACAG,OAAA,CACA,WAEA,CAAA,EAEAH,EAAArF,iBAAA,UAAA6C,IACA,GAAA,KAAAA,EAAA4C,QAAA,MAAA,CAAA,CACA,CAAA,EAEA","file":"GoogleMaps2.min.js","sourcesContent":["class GoogleMaps2 {\n allMarkers = [];\n categorizedMarkers = {};\n pointMarkers = [];\n bounds = {};\n infoWindow = {};\n poiCollections = {};\n editable = {};\n map = {};\n\n /**\n * @param {HTMLElement} element\n * @param {Environment} environment\n * @constructor\n */\n constructor (element, environment) {\n this.allMarkers = [];\n this.categorizedMarkers = {};\n this.pointMarkers = [];\n this.bounds = new google.maps.LatLngBounds();\n this.infoWindow = new google.maps.InfoWindow();\n this.poiCollections = JSON.parse(element.dataset.pois || \"null\");\n this.editable = element.classList.contains('editMarker');\n\n this.setMapDimensions(element, environment.settings);\n\n this.createMap(element, environment);\n\n if (typeof this.poiCollections === 'undefined' || this.poiCollections === null) {\n // Plugin: CityMap\n let lat = Number(element.dataset.latitude);\n let lng = Number(element.dataset.longitude);\n if (lat && lng) {\n this.createMarkerByLatLng(lat, lng);\n this.map.setCenter(new google.maps.LatLng(lat, lng));\n } else {\n // Fallback\n this.map.setCenter(new google.maps.LatLng(environment.extConf.defaultLatitude, environment.extConf.defaultLongitude));\n }\n } else {\n // normal case\n this.createPointByCollectionType(element, environment);\n if (\n typeof environment.settings.markerClusterer !== 'undefined'\n && environment.settings.markerClusterer.enable === 1\n ) {\n new MarkerClusterer(\n this.map,\n this.pointMarkers,\n { imagePath: environment.settings.markerClusterer.imagePath }\n );\n }\n\n if (this.countObjectProperties(this.categorizedMarkers) > 1) {\n this.showSwitchableCategories(element, environment);\n }\n\n if (this.shouldFitBounds(environment.settings)) {\n this.map.fitBounds(this.bounds);\n } else {\n this.map.setCenter(new google.maps.LatLng(this.poiCollections[0].latitude, this.poiCollections[0].longitude));\n }\n }\n }\n\n /**\n * Return a MapOptions object which can be assigned to the Map object of Google\n *\n * @param {Settings} settings\n * @return {object}\n */\n getMapOptions = settings => {\n let mapOptions = {\n mapTypeId: '',\n zoom: parseInt(settings.zoom),\n zoomControl: (parseInt(settings.zoomControl) !== 0),\n mapTypeControl: (parseInt(settings.mapTypeControl) !== 0),\n scaleControl: (parseInt(settings.scaleControl) !== 0),\n streetViewControl: (parseInt(settings.streetViewControl) !== 0),\n fullscreenControl: (parseInt(settings.fullScreenControl) !== 0),\n scrollwheel: settings.activateScrollWheel,\n styles: ''\n };\n\n if (settings.styles) {\n mapOptions.styles = eval(settings.styles);\n }\n\n switch (settings.mapTypeId) {\n case 'google.maps.MapTypeId.HYBRID':\n case 'hybrid':\n mapOptions.mapTypeId = google.maps.MapTypeId.HYBRID;\n break;\n case 'google.maps.MapTypeId.ROADMAP':\n case 'roadmap':\n mapOptions.mapTypeId = google.maps.MapTypeId.ROADMAP;\n break;\n case 'google.maps.MapTypeId.SATELLITE':\n case 'satellite':\n mapOptions.mapTypeId = google.maps.MapTypeId.SATELLITE;\n break;\n case 'google.maps.MapTypeId.TERRAIN':\n case 'terrain':\n mapOptions.mapTypeId = google.maps.MapTypeId.TERRAIN;\n break;\n }\n\n return mapOptions;\n }\n\n /**\n * Returns CircleOptions which can be assigned to the Circle object of Google\n *\n * @param {L.Map} map\n * @param {object} centerPosition\n * @param {PoiCollection} poiCollection\n * @return {object}\n */\n getCircleOptions (map, centerPosition, poiCollection) {\n return {\n map: map,\n center: centerPosition,\n radius: poiCollection.radius,\n strokeColor: poiCollection.strokeColor,\n strokeOpacity: poiCollection.strokeOpacity,\n strokeWeight: poiCollection.strokeWeight,\n fillColor: poiCollection.fillColor,\n fillOpacity: poiCollection.fillOpacity\n };\n }\n\n /**\n * Returns PolygonOptions which can be assigned to the Polygon object of Google\n *\n * @param {object} paths\n * @param {PoiCollection} poiCollection\n * @return {object}\n */\n getPolygonOptions (paths, poiCollection) {\n return {\n paths: paths,\n strokeColor: poiCollection.strokeColor,\n strokeOpacity: poiCollection.strokeOpacity,\n strokeWeight: poiCollection.strokeWeight,\n fillColor: poiCollection.fillColor,\n fillOpacity: poiCollection.fillOpacity\n };\n }\n\n /**\n * Return PolylineOptions which can be assigned to the Polyline object of Google\n *\n * @param {object} paths\n * @param {PoiCollection} poiCollection\n * @return {object}\n */\n getPolylineOptions (paths, poiCollection) {\n return {\n path: paths,\n strokeColor: poiCollection.strokeColor,\n strokeOpacity: poiCollection.strokeOpacity,\n strokeWeight: poiCollection.strokeWeight,\n };\n }\n\n /**\n * Create Map\n *\n * @param {HTMLElement} element\n * @param {Environment} environment\n */\n createMap (element, environment) {\n this.map = new google.maps.Map(\n element,\n this.getMapOptions(environment.settings)\n );\n }\n\n /**\n * @param {string | number} value\n * @return {boolean}\n */\n canBeInterpretedAsNumber(value) {\n return typeof value === 'number' || !isNaN(Number(value));\n }\n\n /**\n * @param {string | number} dimension\n * @returns {string}\n */\n normalizeDimension(dimension) {\n let normalizedDimension = String(dimension);\n\n if (this.canBeInterpretedAsNumber(normalizedDimension)) {\n normalizedDimension += 'px';\n }\n\n return normalizedDimension;\n }\n\n /**\n * @param {Settings} settings\n * @returns {boolean}\n */\n shouldFitBounds(settings) {\n if (settings.forceZoom === true) {\n return false;\n }\n\n if (this.poiCollections === null) {\n return false;\n }\n\n if (this.poiCollections.length > 1) {\n return true;\n }\n\n if (\n this.poiCollections.length === 1\n && (\n this.poiCollections[0].collectionType === \"Area\"\n || this.poiCollections[0].collectionType === \"Route\"\n )\n ) {\n return true;\n }\n\n return false;\n }\n\n /**\n * @param {HTMLElement} element\n * @param {Settings} settings\n */\n setMapDimensions(element, settings) {\n element.style.height = this.normalizeDimension(settings.mapHeight);\n element.style.width = this.normalizeDimension(settings.mapWidth);\n }\n\n /**\n * Group Categories\n *\n * @param {Environment} environment\n */\n groupCategories = environment => {\n let groupedCategories = {};\n let categoryUid = \"0\";\n for (let x = 0; x < this.poiCollections.length; x++) {\n for (let y = 0; y < this.poiCollections[x].categories.length; y++) {\n categoryUid = String(this.poiCollections[x].categories[y].uid);\n if (this.inList(environment.settings.categories, categoryUid) > -1 && !groupedCategories.hasOwnProperty(categoryUid)) {\n groupedCategories[categoryUid] = this.poiCollections[x].categories[y];\n }\n }\n }\n\n return groupedCategories;\n };\n\n /**\n * Get categories of all checkboxes with a given status\n *\n * @param {HTMLElement} form The HTML form element containing the checkboxes\n * @param {boolean} isChecked Get checkboxes of this status only\n */\n getCategoriesOfCheckboxesWithStatus = (form, isChecked) => {\n let categories = [];\n let checkboxes = isChecked ? form.querySelectorAll(\"input:checked\") : form.querySelectorAll(\"input:not(input:checked)\");\n\n checkboxes.forEach(checkbox => {\n categories.push(parseInt(checkbox.value));\n });\n\n return categories;\n }\n\n getMarkersToChangeVisibilityFor = (categoryUid, form, isChecked) => {\n let markers = [];\n if (this.allMarkers.length === 0) {\n return markers;\n }\n\n let marker = null;\n let allCategoriesOfMarker = null;\n let categoriesOfCheckboxesWithStatus = this.getCategoriesOfCheckboxesWithStatus(form, isChecked);\n for (let i = 0; i < this.allMarkers.length; i++) {\n marker = this.allMarkers[i];\n allCategoriesOfMarker = marker.poiCollection.categories;\n if (allCategoriesOfMarker.length === 0) {\n continue;\n }\n\n let markerCategoryHasCheckboxWithStatus;\n for (let j = 0; j < allCategoriesOfMarker.length; j++) {\n markerCategoryHasCheckboxWithStatus = false;\n for (let k = 0; k < categoriesOfCheckboxesWithStatus.length; k++) {\n if (allCategoriesOfMarker[j].uid === categoriesOfCheckboxesWithStatus[k]) {\n markerCategoryHasCheckboxWithStatus = true;\n }\n }\n if (markerCategoryHasCheckboxWithStatus === isChecked) {\n break;\n }\n }\n\n if (markerCategoryHasCheckboxWithStatus) {\n markers.push(marker.marker);\n }\n }\n\n return markers;\n }\n\n /**\n * Show switchable categories\n *\n * @param {HTMLElement} element\n * @param {Environment} environment\n */\n showSwitchableCategories = (element, environment) => {\n let categories = this.groupCategories(environment);\n let form = document.createElement(\"form\");\n let span = {};\n\n form.classList.add(\"txMaps2Form\");\n form.setAttribute(\"id\", \"txMaps2Form-\" + environment.contentRecord.uid);\n\n // Add checkbox for category\n for (let categoryUid in categories) {\n if (categories.hasOwnProperty(categoryUid)) {\n form.appendChild(this.getCheckbox(categories[categoryUid]));\n form.querySelector(\"#checkCategory_\" + categoryUid)?.insertAdjacentHTML(\n \"afterend\",\n `${categories[categoryUid].title}`\n );\n }\n }\n\n // Add listener for checkboxes\n form.querySelectorAll(\"input\").forEach((checkbox) => {\n checkbox.addEventListener(\"click\", () => {\n let isChecked = (checkbox).checked;\n let categoryUid = (checkbox).value;\n let markers = this.getMarkersToChangeVisibilityFor(categoryUid, form, isChecked);\n\n markers.forEach((marker) => {\n marker.setVisible(isChecked);\n });\n });\n });\n\n element.insertAdjacentElement(\"afterend\", form);\n }\n\n /**\n * Get Checkbox for Category\n *\n * @param category\n */\n getCheckbox(category) {\n let div = document.createElement(\"div\");\n div.classList.add(\"form-group\");\n div.innerHTML = `\n
\n \n
`;\n\n return div;\n }\n\n /**\n * Count Object properties\n *\n * @param obj\n */\n countObjectProperties = obj => {\n let count = 0;\n for (let key in obj) {\n if (obj.hasOwnProperty(key)) {\n count++;\n }\n }\n return count;\n }\n\n /**\n * Create Point by CollectionType\n *\n * @param {HTMLElement} element\n * @param {Environment} environment\n */\n createPointByCollectionType = (element, environment) => {\n let marker;\n let categoryUid = 0;\n\n if (this.poiCollections !== null && this.poiCollections.length) {\n this.poiCollections.forEach(poiCollection => {\n if (poiCollection.strokeColor === \"\") {\n poiCollection.strokeColor = environment.extConf.strokeColor;\n }\n if (poiCollection.strokeOpacity === \"\") {\n poiCollection.strokeOpacity = environment.extConf.strokeOpacity;\n }\n if (poiCollection.strokeWeight === \"\") {\n poiCollection.strokeWeight = environment.extConf.strokeWeight;\n }\n if (poiCollection.fillColor === \"\") {\n poiCollection.fillColor = environment.extConf.fillColor;\n }\n if (poiCollection.fillOpacity === \"\") {\n poiCollection.fillOpacity = environment.extConf.fillOpacity;\n }\n\n marker = null;\n switch (poiCollection.collectionType) {\n case \"Point\":\n marker = this.createMarker(poiCollection, element, environment);\n break;\n case \"Area\":\n marker = this.createArea(poiCollection, environment);\n break;\n case \"Route\":\n marker = this.createRoute(poiCollection, environment);\n break;\n case \"Radius\":\n marker = this.createRadius(poiCollection, environment);\n break;\n }\n\n if (marker !== null) {\n this.allMarkers.push({\n marker: marker,\n poiCollection: poiCollection\n });\n\n categoryUid = 0;\n for (let c = 0; c < poiCollection.categories.length; c++) {\n categoryUid = poiCollection.categories[c].uid;\n if (!this.categorizedMarkers.hasOwnProperty(categoryUid)) {\n this.categorizedMarkers[categoryUid] = [];\n }\n this.categorizedMarkers[categoryUid].push({\n marker: marker,\n relatedCategories: poiCollection.categories\n });\n }\n }\n });\n }\n }\n\n /**\n * Create Marker with InfoWindow\n *\n * @param {PoiCollection} poiCollection\n * @param {HTMLElement} element\n * @param {Environment} environment\n */\n createMarker = (poiCollection, element, environment) => {\n let categoryUid = \"0\";\n let marker = new google.maps.Marker({\n position: new google.maps.LatLng(poiCollection.latitude, poiCollection.longitude),\n map: this.map\n });\n marker.setDraggable(this.editable);\n\n // assign first found marker icon, if available\n if (poiCollection.hasOwnProperty(\"markerIcon\") && poiCollection.markerIcon !== \"\") {\n let icon = {\n url: poiCollection.markerIcon,\n scaledSize: new google.maps.Size(poiCollection.markerIconWidth, poiCollection.markerIconHeight),\n anchor: new google.maps.Point(poiCollection.markerIconAnchorPosX, poiCollection.markerIconAnchorPosY)\n };\n marker.setIcon(icon);\n }\n\n this.pointMarkers.push(marker);\n this.bounds.extend(marker.position);\n\n if (this.editable) {\n this.addEditListeners(element, marker, poiCollection, environment);\n } else {\n this.addInfoWindow(marker, poiCollection, environment);\n }\n\n return marker;\n }\n\n /**\n * Create Area\n *\n * @param poiCollection\n * @param environment\n */\n createArea = (poiCollection, environment) => {\n let latLng;\n let paths = [];\n for (let i = 0; i < poiCollection.pois.length; i++) {\n latLng = new google.maps.LatLng(poiCollection.pois[i].latitude, poiCollection.pois[i].longitude);\n this.bounds.extend(latLng);\n paths.push(latLng);\n }\n\n if (paths.length === 0) {\n paths.push(this.mapPosition);\n }\n\n let area = new google.maps.Polygon(this.getPolygonOptions(paths, poiCollection));\n area.setMap(this.map);\n this.addInfoWindow(area, poiCollection, environment);\n\n return area;\n }\n\n /**\n * Create Route\n *\n * @param poiCollection\n * @param environment\n */\n createRoute = (poiCollection, environment) => {\n let latLng;\n let paths = [];\n for (let i = 0; i < poiCollection.pois.length; i++) {\n latLng = new google.maps.LatLng(poiCollection.pois[i].latitude, poiCollection.pois[i].longitude);\n this.bounds.extend(latLng);\n paths.push(latLng);\n }\n\n if (paths.length === 0) {\n paths.push(this.mapPosition);\n }\n\n let route = new google.maps.Polyline(this.getPolylineOptions(paths, poiCollection));\n route.setMap(this.map);\n this.addInfoWindow(route, poiCollection, environment);\n\n return route;\n }\n\n /**\n * Create Radius\n *\n * @param poiCollection\n * @param environment\n */\n createRadius = (poiCollection, environment) => {\n let circle = new google.maps.Circle(\n this.getCircleOptions(\n this.map,\n new google.maps.LatLng(poiCollection.latitude, poiCollection.longitude),\n poiCollection\n )\n );\n\n this.bounds.union(circle.getBounds());\n this.addInfoWindow(circle, poiCollection, environment);\n\n return circle;\n }\n\n /**\n * Add Info Window to element\n *\n * @param element\n * @param poiCollection\n * @param environment\n */\n addInfoWindow = (element, poiCollection, environment) => {\n // we need these both vars to be set global. So that we can access them in Listener\n let infoWindow = this.infoWindow;\n let map = this.map;\n google.maps.event.addListener(element, \"click\", event => {\n fetch(environment.ajaxUrl, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify({\n poiCollection: poiCollection.uid\n })\n })\n .then(response => response.json())\n .then(data => {\n infoWindow.close();\n infoWindow.setContent(data.content);\n\n // Do not set pointer of InfoWindow to the same pointer of the POI icon.\n // In case of Point the pointer of InfoWindow should be at mouse position.\n if (poiCollection.collectionType === \"Point\") {\n infoWindow.setPosition(null);\n infoWindow.open(map, element);\n } else {\n infoWindow.setPosition(new google.maps.LatLng(poiCollection.latitude, poiCollection.longitude));\n infoWindow.open(map);\n }\n })\n .catch(error => console.error('Error:', error));\n });\n }\n\n /**\n * Check for item in list\n * Check if an item exists in a comma-separated list of items.\n *\n * @param list\n * @param item\n */\n inList = (list, item) => {\n let catSearch = ',' + list + ',';\n item = ',' + item + ',';\n return catSearch.search(item);\n };\n\n /**\n * Create Marker with InfoWindow\n *\n * @param latitude\n * @param longitude\n */\n createMarkerByLatLng = (latitude, longitude) => {\n let marker = new google.maps.Marker({\n position: new google.maps.LatLng(latitude, longitude),\n map: this.map\n });\n this.bounds.extend(marker.position);\n };\n\n /**\n * Add Edit Listeners\n * This will only work for Markers (Point)\n *\n * @param mapContainer\n * @param marker\n * @param poiCollection\n * @param environment\n */\n addEditListeners = (mapContainer, marker, poiCollection, environment) => {\n // update fields and marker while dragging\n google.maps.event.addListener(marker, 'dragend', () => {\n let lat = marker.getPosition().lat().toFixed(6);\n let lng = marker.getPosition().lng().toFixed(6);\n mapContainer.prevAll(\"input.latitude-\" + environment.contentRecord.uid).val(lat);\n mapContainer.prevAll(\"input.longitude-\" + environment.contentRecord.uid).val(lng);\n });\n\n // update fields and marker when clicking on the map\n google.maps.event.addListener(this.map, 'click', event => {\n marker.setPosition(event.latLng);\n mapContainer.prevAll(\"input.latitude-\" + environment.contentRecord.uid).val(event.latLng.lat().toFixed(6));\n mapContainer.prevAll(\"input.longitude-\" + environment.contentRecord.uid).val(event.latLng.lng().toFixed(6));\n });\n };\n}\n\nlet maps2GoogleMaps = [];\n\n/**\n * This function will be called by the &callback argument of the Google Maps API library\n */\nfunction initMap () {\n document.querySelectorAll(\".maps2\").forEach(element => {\n const environment = typeof element.dataset.environment !== 'undefined' ? element.dataset.environment : '{}';\n const override = typeof element.dataset.override !== 'undefined' ? element.dataset.override : '{}';\n\n // Pass in the objects to merge as arguments.\n // For a deep extend, set the first argument to `true`.\n const extend = (...args) => {\n let extended = {};\n let deep = false;\n let i = 0;\n let length = args.length;\n\n // Check for deep merge\n if (Object.prototype.toString.call(args[0]) === '[object Boolean]') {\n deep = args[0];\n i++;\n }\n\n // Merge the object into the extended object\n const merge = function (obj) {\n for ( var prop in obj ) {\n if ( Object.prototype.hasOwnProperty.call( obj, prop ) ) {\n // If deep merge and property is an object, merge properties\n if ( deep && Object.prototype.toString.call(obj[prop]) === '[object Object]' ) {\n extended[prop] = extend( true, extended[prop], obj[prop] );\n } else {\n extended[prop] = obj[prop];\n }\n }\n }\n };\n\n // Loop through each object and conduct a merge\n for ( ; i < length; i++ ) {\n var obj = args[i];\n merge(obj);\n }\n\n return extended;\n };\n\n maps2GoogleMaps.push(new GoogleMaps2(\n element,\n extend(JSON.parse(environment), JSON.parse(override))\n ));\n });\n\n // Initialize radius search\n let address = document.querySelector('#maps2Address');\n let radius = document.querySelector('#maps2Radius');\n if (address !== null && radius !== null) {\n let autocomplete = new google.maps.places.Autocomplete(address, {\n fields: [\n \"place_id\"\n ]\n });\n\n address.addEventListener(\"keydown\", event => {\n if (event.keyCode === 13) return false;\n });\n }\n}\n"]} \ No newline at end of file diff --git a/Resources/Public/JavaScript/OpenStreetMap2.min.js b/Resources/Public/JavaScript/OpenStreetMap2.min.js index 51510147..88736899 100644 --- a/Resources/Public/JavaScript/OpenStreetMap2.min.js +++ b/Resources/Public/JavaScript/OpenStreetMap2.min.js @@ -3,5 +3,5 @@ class OpenStreetMap2{element={};environment={};editable=!1;bounds={};allMarkers= - `,e}countObjectProperties(t){let e=0;for(var i in t)t.hasOwnProperty(i)&&e++;return e}createPointByCollectionType(){let i,o=0;null!==this.poiCollections&&this.poiCollections.length&&this.poiCollections.forEach(e=>{switch(""===e.strokeColor&&(e.strokeColor=this.getExtConf().strokeColor),""===e.strokeOpacity&&(e.strokeOpacity=this.getExtConf().strokeOpacity),""===e.strokeWeight&&(e.strokeWeight=this.getExtConf().strokeWeight),""===e.fillColor&&(e.fillColor=this.getExtConf().fillColor),""===e.fillOpacity&&(e.fillOpacity=this.getExtConf().fillOpacity),i=null,e.collectionType){case"Point":i=this.createMarker(e);break;case"Area":i=this.createArea(e);break;case"Route":i=this.createRoute(e);break;case"Radius":i=this.createRadius(e)}this.allMarkers.push({marker:i,poiCollection:e});for(let t=o=0;t{t=[t.latitude,t.longitude];this.bounds.extend(t),e.push(t)});var i=L.polygon(e,{color:t.strokeColor,opacity:t.strokeOpacity,weight:t.strokeWeight,fillColor:t.fillColor,fillOpacity:t.fillOpacity}).addTo(this.map);return this.addInfoWindow(i,t),i}createRoute(t){let e=[];t.pois.forEach(t=>{t=[t.latitude,t.longitude];this.bounds.extend(t),e.push(t)});var i=L.polyline(e,{color:t.strokeColor,opacity:t.strokeOpacity,weight:t.strokeWeight,fillColor:t.fillColor,fillOpacity:t.fillOpacity}).addTo(this.map);return this.addInfoWindow(i,t),i}createRadius(t){var e=L.circle([t.latitude,t.longitude],{color:t.strokeColor,opacity:t.strokeOpacity,weight:t.strokeWeight,fillColor:t.fillColor,fillOpacity:t.fillOpacity,radius:t.radius}).addTo(this.map);return this.bounds.extend(e.getBounds()),this.addInfoWindow(e,t),e}addInfoWindow(e,t){e.addEventListener("click",()=>{fetch(this.environment.ajaxUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({poiCollection:t.uid})}).then(t=>t.json()).then(t=>{e.bindPopup(t.content).openPopup()}).catch(t=>console.error("Error:",t))})}addEditListeners(i,o,t){o.on("dragend",()=>{var t=o.getLatLng().lat.toFixed(6),e=o.getLatLng().lng.toFixed(6);i.previousElementSibling?.querySelector("input.latitude-"+this.getContentRecord().uid).setAttribute("value",t),i.previousElementSibling?.querySelector("input.longitude-"+this.getContentRecord().uid).setAttribute("value",e)}),this.map.on("click",t=>{o.setLatLng(t.latlng),i.previousElementSibling?.querySelector("input.latitude-"+this.getContentRecord().uid).setAttribute("value",t.latlng.lat.toFixed(6)),i.previousElementSibling?.querySelector("input.longitude-"+this.getContentRecord().uid).setAttribute("value",t.latlng.lng.toFixed(6))})}canBeInterpretedAsNumber(t){return"number"==typeof t||!isNaN(Number(t))}getContentRecord(){return this.environment.contentRecord}getExtConf(){return this.environment.extConf}getSettings(){return this.environment.settings}}let maps2OpenStreetMaps=[];document.querySelectorAll(".maps2").forEach(t=>{var e=void 0!==t.dataset.environment?t.dataset.environment:"{}",i=void 0!==t.dataset.override?t.dataset.override:"{}";const n=(...arguments)=>{let t={},e=!1,i=0;var o=arguments.length;for("[object Boolean]"===Object.prototype.toString.call(arguments[0])&&(e=arguments[0],i++);i`,e}countObjectProperties(t){let e=0;for(var i in t)t.hasOwnProperty(i)&&e++;return e}createPointByCollectionType(){let i,o=0;null!==this.poiCollections&&this.poiCollections.length&&this.poiCollections.forEach(e=>{switch(""===e.strokeColor&&(e.strokeColor=this.getExtConf().strokeColor),""===e.strokeOpacity&&(e.strokeOpacity=this.getExtConf().strokeOpacity),""===e.strokeWeight&&(e.strokeWeight=this.getExtConf().strokeWeight),""===e.fillColor&&(e.fillColor=this.getExtConf().fillColor),""===e.fillOpacity&&(e.fillOpacity=this.getExtConf().fillOpacity),i=null,e.collectionType){case"Point":i=this.createMarker(e);break;case"Area":i=this.createArea(e);break;case"Route":i=this.createRoute(e);break;case"Radius":i=this.createRadius(e)}this.allMarkers.push({marker:i,poiCollection:e});for(let t=o=0;t{t=[t.latitude,t.longitude];this.bounds.extend(t),e.push(t)});var i=L.polygon(e,{color:t.strokeColor,opacity:t.strokeOpacity,weight:t.strokeWeight,fillColor:t.fillColor,fillOpacity:t.fillOpacity}).addTo(this.map);return this.addInfoWindow(i,t),i}createRoute(t){let e=[];t.pois.forEach(t=>{t=[t.latitude,t.longitude];this.bounds.extend(t),e.push(t)});var i=L.polyline(e,{color:t.strokeColor,opacity:t.strokeOpacity,weight:t.strokeWeight,fillColor:t.fillColor,fillOpacity:t.fillOpacity}).addTo(this.map);return this.addInfoWindow(i,t),i}createRadius(t){var e=L.circle([t.latitude,t.longitude],{color:t.strokeColor,opacity:t.strokeOpacity,weight:t.strokeWeight,fillColor:t.fillColor,fillOpacity:t.fillOpacity,radius:t.radius}).addTo(this.map);return this.bounds.extend(e.getBounds()),this.addInfoWindow(e,t),e}addInfoWindow(e,t){e.addEventListener("click",()=>{fetch(this.environment.ajaxUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({poiCollection:t.uid})}).then(t=>t.json()).then(t=>{e.bindPopup(t.content).openPopup()}).catch(t=>console.error("Error:",t))})}addEditListeners(i,o,t){o.on("dragend",()=>{var t=o.getLatLng().lat.toFixed(6),e=o.getLatLng().lng.toFixed(6);i.previousElementSibling?.querySelector("input.latitude-"+this.getContentRecord().uid).setAttribute("value",t),i.previousElementSibling?.querySelector("input.longitude-"+this.getContentRecord().uid).setAttribute("value",e)}),this.map.on("click",t=>{o.setLatLng(t.latlng),i.previousElementSibling?.querySelector("input.latitude-"+this.getContentRecord().uid).setAttribute("value",t.latlng.lat.toFixed(6)),i.previousElementSibling?.querySelector("input.longitude-"+this.getContentRecord().uid).setAttribute("value",t.latlng.lng.toFixed(6))})}canBeInterpretedAsNumber(t){return"number"==typeof t||!isNaN(Number(t))}getContentRecord(){return this.environment.contentRecord}getExtConf(){return this.environment.extConf}getSettings(){return this.environment.settings}}let maps2OpenStreetMaps=[];document.querySelectorAll(".maps2").forEach(t=>{var e=void 0!==t.dataset.environment?t.dataset.environment:"{}",i=void 0!==t.dataset.override?t.dataset.override:"{}";const l=(...t)=>{let e={},i=!1,o=0;var r=t.length;for("[object Boolean]"===Object.prototype.toString.call(t[0])&&(i=t[0],o++);o 1) {\n this.showSwitchableCategories();\n }\n this.adjustMapZoom();\n }\n\n adjustMapZoom() {\n if (this.shouldFitBounds()) {\n this.map.fitBounds(this.bounds);\n } else {\n this.map.panTo([this.poiCollections[0].latitude, this.poiCollections[0].longitude]);\n }\n }\n\n /**\n * @returns {boolean}\n */\n shouldFitBounds() {\n if (this.getSettings().forceZoom === true) {\n return false;\n }\n\n if (this.poiCollections === null) {\n return false;\n }\n\n if (this.poiCollections.length > 1) {\n return true;\n }\n\n if (\n this.poiCollections.length === 1\n && (\n this.poiCollections[0].collectionType === \"Area\"\n || this.poiCollections[0].collectionType === \"Route\"\n )\n ) {\n return true;\n }\n\n return false;\n }\n\n setMapDimensions() {\n this.element.style.height = this.normalizeDimension(this.getSettings().mapHeight);\n this.element.style.width = this.normalizeDimension(this.getSettings().mapWidth);\n }\n\n /**\n * @param {string | number} dimension\n * @returns {string}\n */\n normalizeDimension(dimension) {\n let normalizedDimension = String(dimension);\n\n if (this.canBeInterpretedAsNumber(normalizedDimension)) {\n normalizedDimension += 'px';\n }\n\n return normalizedDimension;\n }\n\n createMap() {\n this.map = L.map(\n this.element, {\n center: [this.getExtConf().defaultLatitude, this.getExtConf().defaultLongitude],\n zoom: this.getSettings().zoom ? this.getSettings().zoom : 12,\n editable: this.editable,\n scrollWheelZoom: this.getSettings().activateScrollWheel !== \"0\"\n }\n );\n\n L.tileLayer(this.getSettings().mapTile, {\n attribution: this.getSettings().mapTileAttribution,\n maxZoom: 20\n }).addTo(this.map);\n }\n\n /**\n * @returns {{[p: string]: Category}}\n */\n groupCategories() {\n const groupedCategories = {};\n\n this.poiCollections.forEach((poiCollection) => {\n const categoryUids = poiCollection.categories.map((category) => String(category.uid));\n\n categoryUids\n .filter((categoryUid) => this.getSettings().categories.includes(categoryUid))\n .forEach((categoryUid) => {\n if (!groupedCategories.hasOwnProperty(categoryUid)) {\n groupedCategories[categoryUid] = poiCollection.categories.find((category) => String(category.uid) === categoryUid);\n }\n });\n });\n\n return groupedCategories;\n }\n\n /**\n * @param {HTMLElement} form\n * @param {boolean} isChecked\n * @returns {number[]}\n */\n getCategoriesOfCheckboxesWithStatus(form, isChecked) {\n let categories = [];\n let checkboxes = isChecked\n ? Array.from(form.querySelectorAll(\"input:checked\"))\n : Array.from(form.querySelectorAll(\"input:not(:checked)\"));\n\n checkboxes.forEach((checkbox) => {\n categories.push(parseInt((checkbox).value));\n });\n\n return categories;\n }\n\n /**\n * @param {string} categoryUid\n * @param {HTMLElement} form\n * @param { boolean} isChecked\n * @returns {*[]}\n */\n getMarkersToChangeVisibilityFor(categoryUid, form, isChecked) {\n let markers = [];\n if (this.allMarkers.length === 0) {\n return markers;\n }\n\n let marker = null;\n let allCategoriesOfMarker = null;\n let categoriesOfCheckboxesWithStatus = this.getCategoriesOfCheckboxesWithStatus(form, isChecked);\n for (let i = 0; i < this.allMarkers.length; i++) {\n marker = this.allMarkers[i];\n allCategoriesOfMarker = marker.poiCollection.categories;\n if (allCategoriesOfMarker.length === 0) {\n continue;\n }\n\n let markerCategoryHasCheckboxWithStatus;\n for (let j = 0; j < allCategoriesOfMarker.length; j++) {\n markerCategoryHasCheckboxWithStatus = false;\n for (let k = 0; k < categoriesOfCheckboxesWithStatus.length; k++) {\n if (allCategoriesOfMarker[j].uid === categoriesOfCheckboxesWithStatus[k]) {\n markerCategoryHasCheckboxWithStatus = true;\n }\n }\n if (markerCategoryHasCheckboxWithStatus === isChecked) {\n break;\n }\n }\n\n if (markerCategoryHasCheckboxWithStatus) {\n markers.push(marker.marker);\n }\n }\n\n return markers;\n }\n\n showSwitchableCategories() {\n let categories = this.groupCategories();\n let form = document.createElement(\"form\");\n form.classList.add(\"txMaps2Form\");\n form.setAttribute(\"id\", \"txMaps2Form-\" + this.getContentRecord().uid);\n\n // Add checkbox for category\n for (let categoryUid in categories) {\n if (categories.hasOwnProperty(categoryUid)) {\n form.appendChild(this.getCheckbox(categories[categoryUid]));\n form.querySelector(\"#checkCategory_\" + categoryUid)?.insertAdjacentHTML(\n \"afterend\",\n `${categories[categoryUid].title}`\n );\n }\n }\n\n // Add listener for checkboxes\n form.querySelectorAll(\"input\").forEach((checkbox) => {\n checkbox.addEventListener(\"click\", () => {\n let isChecked = (checkbox).checked;\n let categoryUid = (checkbox).value;\n let markers = this.getMarkersToChangeVisibilityFor(categoryUid, form, isChecked);\n\n markers.forEach((marker) => {\n if (isChecked) {\n this.map.addLayer(marker);\n } else {\n this.map.removeLayer(marker);\n }\n });\n });\n });\n\n this.element.insertAdjacentElement(\"afterend\", form);\n }\n\n /**\n * @param {Category} category\n * @returns {HTMLElement}\n */\n getCheckbox(category) {\n let div = document.createElement(\"div\");\n div.classList.add(\"form-group\");\n div.innerHTML = `\n
\n \n
`;\n\n return div;\n }\n\n /**\n * @param {object} obj\n * @returns {number}\n */\n countObjectProperties(obj) {\n let count = 0;\n for (let key in obj) {\n if (obj.hasOwnProperty(key)) {\n count++;\n }\n }\n return count;\n }\n\n createPointByCollectionType() {\n let marker;\n let categoryUid = 0;\n\n if (this.poiCollections !== null && this.poiCollections.length) {\n this.poiCollections.forEach(poiCollection => {\n if (poiCollection.strokeColor === \"\") {\n poiCollection.strokeColor = this.getExtConf().strokeColor;\n }\n if (poiCollection.strokeOpacity === \"\") {\n poiCollection.strokeOpacity = this.getExtConf().strokeOpacity;\n }\n if (poiCollection.strokeWeight === \"\") {\n poiCollection.strokeWeight = this.getExtConf().strokeWeight;\n }\n if (poiCollection.fillColor === \"\") {\n poiCollection.fillColor = this.getExtConf().fillColor;\n }\n if (poiCollection.fillOpacity === \"\") {\n poiCollection.fillOpacity = this.getExtConf().fillOpacity;\n }\n\n marker = null;\n switch (poiCollection.collectionType) {\n case \"Point\":\n marker = this.createMarker(poiCollection);\n break;\n case \"Area\":\n marker = this.createArea(poiCollection);\n break;\n case \"Route\":\n marker = this.createRoute(poiCollection);\n break;\n case \"Radius\":\n marker = this.createRadius(poiCollection);\n break;\n }\n\n this.allMarkers.push({\n marker: marker,\n poiCollection: poiCollection\n });\n\n categoryUid = 0;\n for (let c = 0; c < poiCollection.categories.length; c++) {\n categoryUid = poiCollection.categories[c].uid;\n if (!this.categorizedMarkers.hasOwnProperty(categoryUid)) {\n this.categorizedMarkers[categoryUid] = [];\n }\n this.categorizedMarkers[categoryUid].push(marker);\n }\n });\n }\n }\n\n /**\n * @param {number} latitude\n * @param {number} longitude\n */\n createMarkerByLatLng(latitude, longitude) {\n let marker = L.marker(\n [latitude, longitude]\n ).addTo(this.map);\n\n this.bounds.extend(marker.getLatLng());\n }\n\n /**\n * @param {PoiCollection} poiCollection\n * @returns {Marker}\n */\n createMarker(poiCollection) {\n let marker = L.marker(\n [poiCollection.latitude, poiCollection.longitude],\n {\n 'draggable': this.editable\n }\n ).addTo(this.map);\n\n if (poiCollection.hasOwnProperty(\"markerIcon\") && poiCollection.markerIcon !== \"\") {\n let icon = L.icon({\n iconUrl: poiCollection.markerIcon,\n iconSize: [poiCollection.markerIconWidth, poiCollection.markerIconHeight],\n iconAnchor: [poiCollection.markerIconAnchorPosX, poiCollection.markerIconAnchorPosY]\n });\n marker.setIcon(icon);\n }\n\n this.bounds.extend(marker.getLatLng());\n\n if (this.editable) {\n this.addEditListeners(this.element, marker, poiCollection);\n } else {\n this.addInfoWindow(marker, poiCollection);\n }\n\n return marker;\n }\n\n /**\n * @param {PoiCollection} poiCollection\n * @returns {Polygon}\n */\n createArea(poiCollection) {\n let latlngs = [];\n\n poiCollection.pois.forEach(poi => {\n let latLng = [poi.latitude, poi.longitude];\n this.bounds.extend(latLng);\n latlngs.push(latLng);\n });\n\n let marker = L.polygon(latlngs, {\n color: poiCollection.strokeColor,\n opacity: poiCollection.strokeOpacity,\n weight: poiCollection.strokeWeight,\n fillColor: poiCollection.fillColor,\n fillOpacity: poiCollection.fillOpacity\n }).addTo(this.map);\n\n this.addInfoWindow(marker, poiCollection);\n\n return marker;\n }\n\n /**\n * @param {PoiCollection} poiCollection\n * @returns {Polyline}\n */\n createRoute(poiCollection) {\n let latlngs = [];\n\n poiCollection.pois.forEach(poi => {\n let latLng = [poi.latitude, poi.longitude];\n this.bounds.extend(latLng);\n latlngs.push(latLng);\n });\n\n let marker = L.polyline(latlngs, {\n color: poiCollection.strokeColor,\n opacity: poiCollection.strokeOpacity,\n weight: poiCollection.strokeWeight,\n fillColor: poiCollection.fillColor,\n fillOpacity: poiCollection.fillOpacity\n }).addTo(this.map);\n\n this.addInfoWindow(marker, poiCollection);\n\n return marker;\n }\n\n /**\n * @param {PoiCollection} poiCollection\n * @returns {Circle}\n */\n createRadius(poiCollection) {\n let marker = L.circle([poiCollection.latitude, poiCollection.longitude], {\n color: poiCollection.strokeColor,\n opacity: poiCollection.strokeOpacity,\n weight: poiCollection.strokeWeight,\n fillColor: poiCollection.fillColor,\n fillOpacity: poiCollection.fillOpacity,\n radius: poiCollection.radius\n }).addTo(this.map);\n\n this.bounds.extend(marker.getBounds());\n\n this.addInfoWindow(marker, poiCollection);\n\n return marker;\n }\n\n /**\n * @param {HTMLElement} element\n * @param {PoiCollection} poiCollection\n */\n addInfoWindow(element, poiCollection) {\n element.addEventListener(\"click\", () => {\n fetch(this.environment.ajaxUrl, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify({\n poiCollection: poiCollection.uid\n })\n })\n .then(response => response.json())\n .then(data => {\n element.bindPopup(data.content).openPopup();\n })\n .catch(error => console.error('Error:', error));\n });\n }\n\n /**\n * @param {HTMLElement} mapContainer\n * @param {L.Marker} marker\n * @param {PoiCollection} poiCollection\n */\n addEditListeners(mapContainer, marker, poiCollection) {\n marker.on('dragend', () => {\n let lat = marker.getLatLng().lat.toFixed(6);\n let lng = marker.getLatLng().lng.toFixed(6);\n mapContainer\n .previousElementSibling\n ?.querySelector(`input.latitude-${this.getContentRecord().uid}`)\n .setAttribute(\"value\", lat);\n mapContainer\n .previousElementSibling\n ?.querySelector(`input.longitude-${this.getContentRecord().uid}`)\n .setAttribute(\"value\", lng);\n });\n\n this.map.on('click', (event) => {\n marker.setLatLng(event.latlng);\n mapContainer\n .previousElementSibling\n ?.querySelector(`input.latitude-${this.getContentRecord().uid}`)\n .setAttribute(\"value\", event.latlng.lat.toFixed(6));\n mapContainer\n .previousElementSibling\n ?.querySelector(`input.longitude-${this.getContentRecord().uid}`)\n .setAttribute(\"value\", event.latlng.lng.toFixed(6));\n });\n }\n\n /**\n * return {boolean}\n */\n canBeInterpretedAsNumber(value) {\n return typeof value === 'number' || !isNaN(Number(value));\n }\n\n /**\n * return {ContentRecord}\n */\n getContentRecord() {\n return this.environment.contentRecord;\n }\n\n /**\n * return {ExtConf}\n */\n getExtConf() {\n return this.environment.extConf;\n }\n\n /**\n * return {Settings}\n */\n getSettings() {\n return this.environment.settings;\n }\n}\n\nlet maps2OpenStreetMaps = [];\n\ndocument.querySelectorAll(\".maps2\").forEach((element) => {\n const environment = typeof element.dataset.environment !== 'undefined' ? element.dataset.environment : '{}';\n const override = typeof element.dataset.override !== 'undefined' ? element.dataset.override : '{}';\n\n // Pass in the objects to merge as arguments.\n // For a deep extend, set the first argument to `true`.\n const extend = (...arguments) => {\n let extended = {};\n let deep = false;\n let i = 0;\n let length = arguments.length;\n\n // Check for deep merge\n if (Object.prototype.toString.call(arguments[0]) === '[object Boolean]') {\n deep = arguments[0];\n i++;\n }\n\n // Merge the object into the extended object\n const merge = function (obj) {\n for ( var prop in obj ) {\n if ( Object.prototype.hasOwnProperty.call( obj, prop ) ) {\n // If deep merge and property is an object, merge properties\n if ( deep && Object.prototype.toString.call(obj[prop]) === '[object Object]' ) {\n extended[prop] = extend( true, extended[prop], obj[prop] );\n } else {\n extended[prop] = obj[prop];\n }\n }\n }\n };\n\n // Loop through each object and conduct a merge\n for ( ; i < length; i++ ) {\n var obj = arguments[i];\n merge(obj);\n }\n\n return extended;\n };\n\n maps2OpenStreetMaps.push(new OpenStreetMap2(\n element,\n extend(true, JSON.parse(environment), JSON.parse(override))\n ));\n});\n"]} \ No newline at end of file +{"version":3,"sources":["OpenStreetMap2.js"],"names":["OpenStreetMap2","element","environment","editable","bounds","allMarkers","categorizedMarkers","poiCollections","map","constructor","this","classList","contains","L","LatLngBounds","preparePoiCollection","setMapDimensions","createMap","setMarkersOnMap","JSON","parse","getAttribute","isPOICollectionsEmpty","createMarkerBasedOnDataAttributes","createMarkerBasedOnPOICollections","length","latitude","getAttributeAsFloat","longitude","isNaN","createMarkerByLatLng","attributeName","parseFloat","createPointByCollectionType","countObjectProperties","showSwitchableCategories","adjustMapZoom","shouldFitBounds","fitBounds","panTo","getSettings","forceZoom","collectionType","style","height","normalizeDimension","mapHeight","width","mapWidth","dimension","let","normalizedDimension","String","canBeInterpretedAsNumber","center","getExtConf","defaultLatitude","defaultLongitude","zoom","scrollWheelZoom","activateScrollWheel","tileLayer","mapTile","attribution","mapTileAttribution","maxZoom","addTo","groupCategories","groupedCategories","forEach","poiCollection","categories","category","uid","filter","includes","categoryUid","hasOwnProperty","find","getCategoriesOfCheckboxesWithStatus","form","isChecked","Array","from","querySelectorAll","push","parseInt","value","getMarkersToChangeVisibilityFor","markers","marker","allCategoriesOfMarker","categoriesOfCheckboxesWithStatus","i","markerCategoryHasCheckboxWithStatus","j","k","document","createElement","add","setAttribute","getContentRecord","appendChild","getCheckbox","querySelector","insertAdjacentHTML","title","checkbox","addEventListener","checked","addLayer","removeLayer","insertAdjacentElement","div","innerHTML","obj","count","key","strokeColor","strokeOpacity","strokeWeight","fillColor","fillOpacity","createMarker","createArea","createRoute","createRadius","c","extend","getLatLng","icon","draggable","markerIcon","iconUrl","iconSize","markerIconWidth","markerIconHeight","iconAnchor","markerIconAnchorPosX","markerIconAnchorPosY","setIcon","addEditListeners","addInfoWindow","latlngs","pois","poi","latLng","polygon","color","opacity","weight","polyline","circle","radius","getBounds","fetch","ajaxUrl","method","headers","Content-Type","body","stringify","then","response","json","data","bindPopup","content","openPopup","catch","error","console","mapContainer","on","lat","toFixed","lng","previousElementSibling","setLatLng","event","latlng","Number","contentRecord","extConf","settings","maps2OpenStreetMaps","dataset","override","args","extended","deep","Object","prototype","toString","call","prop"],"mappings":"MAAAA,eACAC,QAAA,GACAC,YAAA,GACAC,SAAA,CAAA,EACAC,OAAA,GAEAC,WAAA,GACAC,mBAAA,GACAC,eAAA,GACAC,IAAA,GAEAC,YAAAR,EAAAC,GACAQ,KAAAT,QAAAA,EACAS,KAAAR,YAAAA,EACAQ,KAAAP,SAAAO,KAAAT,QAAAU,UAAAC,SAAA,YAAA,EACAF,KAAAN,OAAA,IAAAS,EAAAC,aAEAJ,KAAAK,qBAAA,EACAL,KAAAM,iBAAA,EACAN,KAAAO,UAAA,EACAP,KAAAQ,gBAAA,CACA,CAEAH,uBACAL,KAAAH,eAAAY,KAAAC,MAAAV,KAAAT,QAAAoB,aAAA,WAAA,GAAA,IAAA,CACA,CAEAH,kBACAR,KAAAY,sBAAA,EACAZ,KAAAa,kCAAA,EAEAb,KAAAc,kCAAA,CAEA,CAKAF,wBACA,OAAA,IAAAZ,KAAAH,eAAAkB,MACA,CAEAF,oCACA,IAAAG,EAAAhB,KAAAiB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sB,GACAgF,EAAAA,KAAAA,EAeAhF,GAfA,IAAAgF,KAAAhF,EACA4E,OAAAC,UAAAnH,eAAAqH,KAAA/E,EAAAgF,CAAA,IAEAL,GAAA,oBAAAC,OAAAC,UAAAC,SAAAC,KAAA/E,EAAAgF,EAAA,EACAN,EAAAM,GAAAnE,EAAA,CAAA,EAAA6D,EAAAM,GAAAhF,EAAAgF,EAAA,EAEAN,EAAAM,GAAAhF,EAAAgF,GAUA,CAEA,OAAAN,CACA,EAEAJ,oBAAApG,KAAA,IAAArF,eACAC,EACA+H,EAAA,CAAA,EAAA7G,KAAAC,MAAAlB,CAAA,EAAAiB,KAAAC,MAAAuK,CAAA,CAAA,CACA,CAAA,CACA,CAAA","file":"OpenStreetMap2.min.js","sourcesContent":["class OpenStreetMap2 {\n element = {};\n environment = {};\n editable = false;;\n bounds = {};\n\n allMarkers = [];\n categorizedMarkers = {};\n poiCollections = [];\n map = {};\n\n constructor(element, environment) {\n this.element = element;\n this.environment = environment;\n this.editable = this.element.classList.contains(\"editMarker\");\n this.bounds = new L.LatLngBounds();\n\n this.preparePoiCollection();\n this.setMapDimensions();\n this.createMap();\n this.setMarkersOnMap();\n }\n\n preparePoiCollection() {\n this.poiCollections = JSON.parse(this.element.getAttribute(\"data-pois\") || '[]');\n }\n\n setMarkersOnMap() {\n if (this.isPOICollectionsEmpty()) {\n this.createMarkerBasedOnDataAttributes();\n } else {\n this.createMarkerBasedOnPOICollections();\n }\n }\n\n /**\n * @returns {boolean}\n */\n isPOICollectionsEmpty() {\n return this.poiCollections.length === 0;\n }\n\n createMarkerBasedOnDataAttributes() {\n const latitude = this.getAttributeAsFloat(\"data-latitude\");\n const longitude = this.getAttributeAsFloat(\"data-longitude\");\n\n if (!isNaN(latitude) && !isNaN(longitude)) {\n this.createMarkerByLatLng(latitude, longitude);\n }\n }\n\n /**\n * @param {string} attributeName\n * @returns {number}\n */\n getAttributeAsFloat(attributeName) {\n return parseFloat(this.element.getAttribute(attributeName) || \"\");\n }\n\n createMarkerBasedOnPOICollections() {\n this.createPointByCollectionType();\n if (this.countObjectProperties(this.categorizedMarkers) > 1) {\n this.showSwitchableCategories();\n }\n this.adjustMapZoom();\n }\n\n adjustMapZoom() {\n if (this.shouldFitBounds()) {\n this.map.fitBounds(this.bounds);\n } else {\n this.map.panTo([this.poiCollections[0].latitude, this.poiCollections[0].longitude]);\n }\n }\n\n /**\n * @returns {boolean}\n */\n shouldFitBounds() {\n if (this.getSettings().forceZoom === true) {\n return false;\n }\n\n if (this.poiCollections === null) {\n return false;\n }\n\n if (this.poiCollections.length > 1) {\n return true;\n }\n\n if (\n this.poiCollections.length === 1\n && (\n this.poiCollections[0].collectionType === \"Area\"\n || this.poiCollections[0].collectionType === \"Route\"\n )\n ) {\n return true;\n }\n\n return false;\n }\n\n setMapDimensions() {\n this.element.style.height = this.normalizeDimension(this.getSettings().mapHeight);\n this.element.style.width = this.normalizeDimension(this.getSettings().mapWidth);\n }\n\n /**\n * @param {string | number} dimension\n * @returns {string}\n */\n normalizeDimension(dimension) {\n let normalizedDimension = String(dimension);\n\n if (this.canBeInterpretedAsNumber(normalizedDimension)) {\n normalizedDimension += 'px';\n }\n\n return normalizedDimension;\n }\n\n createMap() {\n this.map = L.map(\n this.element, {\n center: [this.getExtConf().defaultLatitude, this.getExtConf().defaultLongitude],\n zoom: this.getSettings().zoom ? this.getSettings().zoom : 12,\n editable: this.editable,\n scrollWheelZoom: this.getSettings().activateScrollWheel !== \"0\"\n }\n );\n\n L.tileLayer(this.getSettings().mapTile, {\n attribution: this.getSettings().mapTileAttribution,\n maxZoom: 20\n }).addTo(this.map);\n }\n\n /**\n * @returns {{[p: string]: Category}}\n */\n groupCategories() {\n const groupedCategories = {};\n\n this.poiCollections.forEach((poiCollection) => {\n const categoryUids = poiCollection.categories.map((category) => String(category.uid));\n\n categoryUids\n .filter((categoryUid) => this.getSettings().categories.includes(categoryUid))\n .forEach((categoryUid) => {\n if (!groupedCategories.hasOwnProperty(categoryUid)) {\n groupedCategories[categoryUid] = poiCollection.categories.find((category) => String(category.uid) === categoryUid);\n }\n });\n });\n\n return groupedCategories;\n }\n\n /**\n * @param {HTMLElement} form\n * @param {boolean} isChecked\n * @returns {number[]}\n */\n getCategoriesOfCheckboxesWithStatus(form, isChecked) {\n let categories = [];\n let checkboxes = isChecked\n ? Array.from(form.querySelectorAll(\"input:checked\"))\n : Array.from(form.querySelectorAll(\"input:not(:checked)\"));\n\n checkboxes.forEach((checkbox) => {\n categories.push(parseInt((checkbox).value));\n });\n\n return categories;\n }\n\n /**\n * @param {string} categoryUid\n * @param {HTMLElement} form\n * @param { boolean} isChecked\n * @returns {*[]}\n */\n getMarkersToChangeVisibilityFor(categoryUid, form, isChecked) {\n let markers = [];\n if (this.allMarkers.length === 0) {\n return markers;\n }\n\n let marker = null;\n let allCategoriesOfMarker = null;\n let categoriesOfCheckboxesWithStatus = this.getCategoriesOfCheckboxesWithStatus(form, isChecked);\n for (let i = 0; i < this.allMarkers.length; i++) {\n marker = this.allMarkers[i];\n allCategoriesOfMarker = marker.poiCollection.categories;\n if (allCategoriesOfMarker.length === 0) {\n continue;\n }\n\n let markerCategoryHasCheckboxWithStatus;\n for (let j = 0; j < allCategoriesOfMarker.length; j++) {\n markerCategoryHasCheckboxWithStatus = false;\n for (let k = 0; k < categoriesOfCheckboxesWithStatus.length; k++) {\n if (allCategoriesOfMarker[j].uid === categoriesOfCheckboxesWithStatus[k]) {\n markerCategoryHasCheckboxWithStatus = true;\n }\n }\n if (markerCategoryHasCheckboxWithStatus === isChecked) {\n break;\n }\n }\n\n if (markerCategoryHasCheckboxWithStatus) {\n markers.push(marker.marker);\n }\n }\n\n return markers;\n }\n\n showSwitchableCategories() {\n let categories = this.groupCategories();\n let form = document.createElement(\"form\");\n form.classList.add(\"txMaps2Form\");\n form.setAttribute(\"id\", \"txMaps2Form-\" + this.getContentRecord().uid);\n\n // Add checkbox for category\n for (let categoryUid in categories) {\n if (categories.hasOwnProperty(categoryUid)) {\n form.appendChild(this.getCheckbox(categories[categoryUid]));\n form.querySelector(\"#checkCategory_\" + categoryUid)?.insertAdjacentHTML(\n \"afterend\",\n `${categories[categoryUid].title}`\n );\n }\n }\n\n // Add listener for checkboxes\n form.querySelectorAll(\"input\").forEach((checkbox) => {\n checkbox.addEventListener(\"click\", () => {\n let isChecked = (checkbox).checked;\n let categoryUid = (checkbox).value;\n let markers = this.getMarkersToChangeVisibilityFor(categoryUid, form, isChecked);\n\n markers.forEach((marker) => {\n if (isChecked) {\n this.map.addLayer(marker);\n } else {\n this.map.removeLayer(marker);\n }\n });\n });\n });\n\n this.element.insertAdjacentElement(\"afterend\", form);\n }\n\n /**\n * @param {Category} category\n * @returns {HTMLElement}\n */\n getCheckbox(category) {\n let div = document.createElement(\"div\");\n div.classList.add(\"form-group\");\n div.innerHTML = `\n
\n \n
`;\n\n return div;\n }\n\n /**\n * @param {object} obj\n * @returns {number}\n */\n countObjectProperties(obj) {\n let count = 0;\n for (let key in obj) {\n if (obj.hasOwnProperty(key)) {\n count++;\n }\n }\n return count;\n }\n\n createPointByCollectionType() {\n let marker;\n let categoryUid = 0;\n\n if (this.poiCollections !== null && this.poiCollections.length) {\n this.poiCollections.forEach(poiCollection => {\n if (poiCollection.strokeColor === \"\") {\n poiCollection.strokeColor = this.getExtConf().strokeColor;\n }\n if (poiCollection.strokeOpacity === \"\") {\n poiCollection.strokeOpacity = this.getExtConf().strokeOpacity;\n }\n if (poiCollection.strokeWeight === \"\") {\n poiCollection.strokeWeight = this.getExtConf().strokeWeight;\n }\n if (poiCollection.fillColor === \"\") {\n poiCollection.fillColor = this.getExtConf().fillColor;\n }\n if (poiCollection.fillOpacity === \"\") {\n poiCollection.fillOpacity = this.getExtConf().fillOpacity;\n }\n\n marker = null;\n switch (poiCollection.collectionType) {\n case \"Point\":\n marker = this.createMarker(poiCollection);\n break;\n case \"Area\":\n marker = this.createArea(poiCollection);\n break;\n case \"Route\":\n marker = this.createRoute(poiCollection);\n break;\n case \"Radius\":\n marker = this.createRadius(poiCollection);\n break;\n }\n\n this.allMarkers.push({\n marker: marker,\n poiCollection: poiCollection\n });\n\n categoryUid = 0;\n for (let c = 0; c < poiCollection.categories.length; c++) {\n categoryUid = poiCollection.categories[c].uid;\n if (!this.categorizedMarkers.hasOwnProperty(categoryUid)) {\n this.categorizedMarkers[categoryUid] = [];\n }\n this.categorizedMarkers[categoryUid].push(marker);\n }\n });\n }\n }\n\n /**\n * @param {number} latitude\n * @param {number} longitude\n */\n createMarkerByLatLng(latitude, longitude) {\n let marker = L.marker(\n [latitude, longitude]\n ).addTo(this.map);\n\n this.bounds.extend(marker.getLatLng());\n }\n\n /**\n * @param {PoiCollection} poiCollection\n * @returns {Marker}\n */\n createMarker(poiCollection) {\n let marker = L.marker(\n [poiCollection.latitude, poiCollection.longitude],\n {\n 'draggable': this.editable\n }\n ).addTo(this.map);\n\n if (poiCollection.hasOwnProperty(\"markerIcon\") && poiCollection.markerIcon !== \"\") {\n let icon = L.icon({\n iconUrl: poiCollection.markerIcon,\n iconSize: [poiCollection.markerIconWidth, poiCollection.markerIconHeight],\n iconAnchor: [poiCollection.markerIconAnchorPosX, poiCollection.markerIconAnchorPosY]\n });\n marker.setIcon(icon);\n }\n\n this.bounds.extend(marker.getLatLng());\n\n if (this.editable) {\n this.addEditListeners(this.element, marker, poiCollection);\n } else {\n this.addInfoWindow(marker, poiCollection);\n }\n\n return marker;\n }\n\n /**\n * @param {PoiCollection} poiCollection\n * @returns {Polygon}\n */\n createArea(poiCollection) {\n let latlngs = [];\n\n poiCollection.pois.forEach(poi => {\n let latLng = [poi.latitude, poi.longitude];\n this.bounds.extend(latLng);\n latlngs.push(latLng);\n });\n\n let marker = L.polygon(latlngs, {\n color: poiCollection.strokeColor,\n opacity: poiCollection.strokeOpacity,\n weight: poiCollection.strokeWeight,\n fillColor: poiCollection.fillColor,\n fillOpacity: poiCollection.fillOpacity\n }).addTo(this.map);\n\n this.addInfoWindow(marker, poiCollection);\n\n return marker;\n }\n\n /**\n * @param {PoiCollection} poiCollection\n * @returns {Polyline}\n */\n createRoute(poiCollection) {\n let latlngs = [];\n\n poiCollection.pois.forEach(poi => {\n let latLng = [poi.latitude, poi.longitude];\n this.bounds.extend(latLng);\n latlngs.push(latLng);\n });\n\n let marker = L.polyline(latlngs, {\n color: poiCollection.strokeColor,\n opacity: poiCollection.strokeOpacity,\n weight: poiCollection.strokeWeight,\n fillColor: poiCollection.fillColor,\n fillOpacity: poiCollection.fillOpacity\n }).addTo(this.map);\n\n this.addInfoWindow(marker, poiCollection);\n\n return marker;\n }\n\n /**\n * @param {PoiCollection} poiCollection\n * @returns {Circle}\n */\n createRadius(poiCollection) {\n let marker = L.circle([poiCollection.latitude, poiCollection.longitude], {\n color: poiCollection.strokeColor,\n opacity: poiCollection.strokeOpacity,\n weight: poiCollection.strokeWeight,\n fillColor: poiCollection.fillColor,\n fillOpacity: poiCollection.fillOpacity,\n radius: poiCollection.radius\n }).addTo(this.map);\n\n this.bounds.extend(marker.getBounds());\n\n this.addInfoWindow(marker, poiCollection);\n\n return marker;\n }\n\n /**\n * @param {HTMLElement} element\n * @param {PoiCollection} poiCollection\n */\n addInfoWindow(element, poiCollection) {\n element.addEventListener(\"click\", () => {\n fetch(this.environment.ajaxUrl, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify({\n poiCollection: poiCollection.uid\n })\n })\n .then(response => response.json())\n .then(data => {\n element.bindPopup(data.content).openPopup();\n })\n .catch(error => console.error('Error:', error));\n });\n }\n\n /**\n * @param {HTMLElement} mapContainer\n * @param {L.Marker} marker\n * @param {PoiCollection} poiCollection\n */\n addEditListeners(mapContainer, marker, poiCollection) {\n marker.on('dragend', () => {\n let lat = marker.getLatLng().lat.toFixed(6);\n let lng = marker.getLatLng().lng.toFixed(6);\n mapContainer\n .previousElementSibling\n ?.querySelector(`input.latitude-${this.getContentRecord().uid}`)\n .setAttribute(\"value\", lat);\n mapContainer\n .previousElementSibling\n ?.querySelector(`input.longitude-${this.getContentRecord().uid}`)\n .setAttribute(\"value\", lng);\n });\n\n this.map.on('click', (event) => {\n marker.setLatLng(event.latlng);\n mapContainer\n .previousElementSibling\n ?.querySelector(`input.latitude-${this.getContentRecord().uid}`)\n .setAttribute(\"value\", event.latlng.lat.toFixed(6));\n mapContainer\n .previousElementSibling\n ?.querySelector(`input.longitude-${this.getContentRecord().uid}`)\n .setAttribute(\"value\", event.latlng.lng.toFixed(6));\n });\n }\n\n /**\n * return {boolean}\n */\n canBeInterpretedAsNumber(value) {\n return typeof value === 'number' || !isNaN(Number(value));\n }\n\n /**\n * return {ContentRecord}\n */\n getContentRecord() {\n return this.environment.contentRecord;\n }\n\n /**\n * return {ExtConf}\n */\n getExtConf() {\n return this.environment.extConf;\n }\n\n /**\n * return {Settings}\n */\n getSettings() {\n return this.environment.settings;\n }\n}\n\nlet maps2OpenStreetMaps = [];\n\ndocument.querySelectorAll(\".maps2\").forEach((element) => {\n const environment = typeof element.dataset.environment !== 'undefined' ? element.dataset.environment : '{}';\n const override = typeof element.dataset.override !== 'undefined' ? element.dataset.override : '{}';\n\n // Pass in the objects to merge as arguments.\n // For a deep extend, set the first argument to `true`.\n const extend = (...args) => {\n let extended = {};\n let deep = false;\n let i = 0;\n let length = args.length;\n\n // Check for deep merge\n if (Object.prototype.toString.call(args[0]) === '[object Boolean]') {\n deep = args[0];\n i++;\n }\n\n // Merge the object into the extended object\n const merge = function (obj) {\n for ( var prop in obj ) {\n if ( Object.prototype.hasOwnProperty.call( obj, prop ) ) {\n // If deep merge and property is an object, merge properties\n if ( deep && Object.prototype.toString.call(obj[prop]) === '[object Object]' ) {\n extended[prop] = extend( true, extended[prop], obj[prop] );\n } else {\n extended[prop] = obj[prop];\n }\n }\n }\n };\n\n // Loop through each object and conduct a merge\n for ( ; i < length; i++ ) {\n var obj = args[i];\n merge(obj);\n }\n\n return extended;\n };\n\n maps2OpenStreetMaps.push(new OpenStreetMap2(\n element,\n extend(true, JSON.parse(environment), JSON.parse(override))\n ));\n});\n"]} \ No newline at end of file From d147300486c8e9318f2aee266ad04b1bc0583b2c Mon Sep 17 00:00:00 2001 From: Stefan Froemken Date: Wed, 20 Mar 2024 08:44:51 +0100 Subject: [PATCH 4/8] Set storeInSession to false in func. tests as it is CLI context --- Tests/Functional/Helper/MessageHelperTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Tests/Functional/Helper/MessageHelperTest.php b/Tests/Functional/Helper/MessageHelperTest.php index 4545113f..fca9312f 100644 --- a/Tests/Functional/Helper/MessageHelperTest.php +++ b/Tests/Functional/Helper/MessageHelperTest.php @@ -58,7 +58,7 @@ public function addFlashMessageWithMessageCallsEnqueue(): void 'Hello', '', ContextualFeedbackSeverity::OK, - true + false ); $this->subject->addFlashMessage('Hello'); @@ -78,7 +78,7 @@ public function addFlashMessageWithMessageAndSubjectCallsEnqueue(): void 'Hello', 'Subject', ContextualFeedbackSeverity::OK, - true + false ); $this->subject->addFlashMessage('Hello', 'Subject'); @@ -98,7 +98,7 @@ public function addFlashMessageWithAllArgumentsCallsEnqueue(): void 'Hello', 'Subject', ContextualFeedbackSeverity::ERROR, - true + false ); $this->subject->addFlashMessage('Hello', 'Subject', ContextualFeedbackSeverity::ERROR); From 27bfc6830e21cf7a852cfb9ba5696a35ae80e7d2 Mon Sep 17 00:00:00 2001 From: Stefan Froemken Date: Wed, 20 Mar 2024 08:50:16 +0100 Subject: [PATCH 5/8] Add PhpStorm meta file --- .gitattributes | 1 + .phpstorm.meta.php | 151 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 152 insertions(+) create mode 100644 .phpstorm.meta.php diff --git a/.gitattributes b/.gitattributes index ba212a36..f931c76c 100644 --- a/.gitattributes +++ b/.gitattributes @@ -6,3 +6,4 @@ /.editorconfig export-ignore /.gitattributes export-ignore /.gitignore export-ignore +/.phpstorm.meta.php export-ignore diff --git a/.phpstorm.meta.php b/.phpstorm.meta.php new file mode 100644 index 00000000..0ae62982 --- /dev/null +++ b/.phpstorm.meta.php @@ -0,0 +1,151 @@ + \TYPO3\CMS\Core\Context\DateTimeAspect::class, + 'visibility' => \TYPO3\CMS\Core\Context\VisibilityAspect::class, + 'backend.user' => \TYPO3\CMS\Core\Context\UserAspect::class, + 'frontend.user' => \TYPO3\CMS\Core\Context\UserAspect::class, + 'workspace' => \TYPO3\CMS\Core\Context\WorkspaceAspect::class, + 'language' => \TYPO3\CMS\Core\Context\LanguageAspect::class, + 'frontend.preview' => \TYPO3\CMS\Frontend\Context\PreviewAspect::class, + ])); + expectedArguments( + \TYPO3\CMS\Core\Context\DateTimeAspect::get(), + 0, + 'timestamp', + 'iso', + 'timezone', + 'full', + 'accessTime' + ); + expectedArguments( + \TYPO3\CMS\Core\Context\VisibilityAspect::get(), + 0, + 'includeHiddenPages', + 'includeHiddenContent', + 'includeDeletedRecords' + ); + expectedArguments( + \TYPO3\CMS\Core\Context\UserAspect::get(), + 0, + 'id', + 'username', + 'isLoggedIn', + 'isAdmin', + 'groupIds', + 'groupNames' + ); + expectedArguments( + \TYPO3\CMS\Core\Context\WorkspaceAspect::get(), + 0, + 'id', + 'isLive', + 'isOffline' + ); + expectedArguments( + \TYPO3\CMS\Core\Context\LanguageAspect::get(), + 0, + 'id', + 'contentId', + 'fallbackChain', + 'overlayType', + 'legacyLanguageMode', + 'legacyOverlayType' + ); + expectedArguments( + \TYPO3\CMS\Frontend\Context\PreviewAspect::get(), + 0, + 'isPreview' + ); + + expectedArguments( + \Psr\Http\Message\ServerRequestInterface::getAttribute(), + 0, + 'frontend.user', + 'normalizedParams', + 'site', + 'language', + 'routing', + 'module', + 'moduleData', + 'frontend.controller', + 'frontend.typoscript', + 'frontend.cache.instruction', + 'frontend.page.information', + ); + override(\Psr\Http\Message\ServerRequestInterface::getAttribute(), map([ + 'frontend.user' => \TYPO3\CMS\Frontend\Authentication\FrontendUserAuthentication::class, + 'normalizedParams' => \TYPO3\CMS\Core\Http\NormalizedParams::class, + 'site' => \TYPO3\CMS\Core\Site\Entity\SiteInterface::class, + 'language' => \TYPO3\CMS\Core\Site\Entity\SiteLanguage::class, + 'routing' => '\TYPO3\CMS\Core\Routing\SiteRouteResult|\TYPO3\CMS\Core\Routing\PageArguments', + 'module' => \TYPO3\CMS\Backend\Module\ModuleInterface::class, + 'moduleData' => \TYPO3\CMS\Backend\Module\ModuleData::class, + 'frontend.controller' => \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController::class, + 'frontend.typoscript' => \TYPO3\CMS\Core\TypoScript\FrontendTypoScript::class, + 'frontend.cache.instruction' => \TYPO3\CMS\Frontend\Cache\CacheInstruction::class, + 'frontend.page.information' => \TYPO3\CMS\Frontend\Page\PageInformation::class, + ])); + + expectedArguments( + \TYPO3\CMS\Core\Http\ServerRequest::getAttribute(), + 0, + 'frontend.user', + 'normalizedParams', + 'site', + 'language', + 'routing', + 'module', + 'moduleData' + ); + override(\TYPO3\CMS\Core\Http\ServerRequest::getAttribute(), map([ + 'frontend.user' => \TYPO3\CMS\Frontend\Authentication\FrontendUserAuthentication::class, + 'normalizedParams' => \TYPO3\CMS\Core\Http\NormalizedParams::class, + 'site' => \TYPO3\CMS\Core\Site\Entity\SiteInterface::class, + 'language' => \TYPO3\CMS\Core\Site\Entity\SiteLanguage::class, + 'routing' => '\TYPO3\CMS\Core\Routing\SiteRouteResult|\TYPO3\CMS\Core\Routing\PageArguments', + 'module' => \TYPO3\CMS\Backend\Module\ModuleInterface::class, + 'moduleData' => \TYPO3\CMS\Backend\Module\ModuleData::class, + ])); + + override(\TYPO3\CMS\Core\Routing\SiteMatcher::matchRequest(), type( + \TYPO3\CMS\Core\Routing\SiteRouteResult::class, + \TYPO3\CMS\Core\Routing\RouteResultInterface::class, + ) + ); + + override(\TYPO3\CMS\Core\Routing\PageRouter::matchRequest(), type( + \TYPO3\CMS\Core\Routing\PageArguments::class, + \TYPO3\CMS\Core\Routing\RouteResultInterface::class, + )); + + override(\Psr\Container\ContainerInterface::get(0), map([ + '' => '@', + ])); + + override(\Psr\EventDispatcher\EventDispatcherInterface::dispatch(0), map([ + '' => '@', + ])); + + override(\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(0), map([ + '' => '@' + ])); +} From 4966060d31457dc69de186bfa0ac508e722819f2 Mon Sep 17 00:00:00 2001 From: Stefan Froemken Date: Wed, 20 Mar 2024 08:50:34 +0100 Subject: [PATCH 6/8] Update ChangeLog --- Documentation/ChangeLog/Index.rst | 5 +++++ Documentation/Settings.cfg | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Documentation/ChangeLog/Index.rst b/Documentation/ChangeLog/Index.rst index 0df23fc8..4e9b5527 100644 --- a/Documentation/ChangeLog/Index.rst +++ b/Documentation/ChangeLog/Index.rst @@ -7,6 +7,11 @@ ChangeLog ========= +Version 11.0.3 +============== + +* BUGFIX: Implement better `extend` function for JavaScript + Version 11.0.2 ============== diff --git a/Documentation/Settings.cfg b/Documentation/Settings.cfg index c8a4b853..024330cf 100644 --- a/Documentation/Settings.cfg +++ b/Documentation/Settings.cfg @@ -1,7 +1,7 @@ [general] project = maps2 (Maps2) version = 11.0 -release = 11.0.2 +release = 11.0.3 copyright = since 2013 by jweiland.net t3author = Stefan Froemken description = This TYPO3 extension supports the rendering of a map based on Google Maps or From 07d389da18e54a339c87edc26a5aa164d33347fb Mon Sep 17 00:00:00 2001 From: Stefan Froemken Date: Wed, 20 Mar 2024 08:50:55 +0100 Subject: [PATCH 7/8] Update deps to secure TYPO3 version --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 0b645a30..3ed15122 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,7 @@ }, "require": { "ext-json": "*", - "typo3/cms-core": "^12.4.8" + "typo3/cms-core": "^12.4.11" }, "require-dev": { "typo3/testing-framework": "^7.0.2", From fa0aef923e0fb3f4f36f32cd1966a4f8d1ef6482 Mon Sep 17 00:00:00 2001 From: Stefan Froemken Date: Wed, 20 Mar 2024 08:51:08 +0100 Subject: [PATCH 8/8] Update version to 11.0.3 --- ext_emconf.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext_emconf.php b/ext_emconf.php index 7a17a368..20f5ea9f 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -3,7 +3,7 @@ $EM_CONF[$_EXTKEY] = [ 'title' => 'Maps2', 'description' => 'Create maps with Marker, Area, Routes or Radius based on Google Maps or OpenStreetMap', - 'version' => '11.0.2', + 'version' => '11.0.3', 'category' => 'plugin', 'state' => 'stable', 'clearCacheOnLoad' => true, @@ -12,7 +12,7 @@ 'author_company' => 'jweiland.net', 'constraints' => [ 'depends' => [ - 'typo3' => '12.4.8-12.4.99', + 'typo3' => '12.4.11-12.4.99', ], 'conflicts' => [ ],